-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ILlmSchema.IParameters.additionalProperties
to be false
.
- Loading branch information
Showing
6 changed files
with
67 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { TestValidator } from "@nestia/e2e"; | ||
import { ILlmSchema, OpenApi } from "@samchon/openapi"; | ||
import { LlmSchemaConverter } from "@samchon/openapi/lib/converters/LlmSchemaConverter"; | ||
import typia, { IJsonSchemaCollection } from "typia"; | ||
|
||
export const test_llm_v30_parameters_dynamic = (): void => { | ||
const errors: string[] = []; | ||
const collection: IJsonSchemaCollection = | ||
typia.json.schemas<[Record<string, number>]>(); | ||
const parameters: ILlmSchema.IParameters<"3.0"> | null = | ||
LlmSchemaConverter.parameters("3.0")({ | ||
errors, | ||
accessor: "$input", | ||
config: LlmSchemaConverter.defaultConfig("3.0"), | ||
components: collection.components, | ||
schema: typia.assert< | ||
OpenApi.IJsonSchema.IReference | OpenApi.IJsonSchema.IObject | ||
>(collection.schemas[0]), | ||
}); | ||
TestValidator.equals("parameters")(parameters)(null); | ||
TestValidator.equals("errors")(errors.map((e) => e.split(":")[0]).sort())( | ||
["$input.additionalProperties"].sort(), | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { TestValidator } from "@nestia/e2e"; | ||
import { ILlmSchema, OpenApi } from "@samchon/openapi"; | ||
import { LlmSchemaConverter } from "@samchon/openapi/lib/converters/LlmSchemaConverter"; | ||
import typia, { IJsonSchemaCollection } from "typia"; | ||
|
||
export const test_llm_v31_parameters_dynamic = (): void => { | ||
const errors: string[] = []; | ||
const collection: IJsonSchemaCollection = | ||
typia.json.schemas<[Record<string, number>]>(); | ||
const parameters: ILlmSchema.IParameters<"3.1"> | null = | ||
LlmSchemaConverter.parameters("3.1")({ | ||
errors, | ||
accessor: "$input", | ||
config: LlmSchemaConverter.defaultConfig("3.1"), | ||
components: collection.components, | ||
schema: typia.assert< | ||
OpenApi.IJsonSchema.IReference | OpenApi.IJsonSchema.IObject | ||
>(collection.schemas[0]), | ||
}); | ||
TestValidator.equals("parameters")(parameters)(null); | ||
TestValidator.equals("errors")(errors.map((e) => e.split(":")[0]).sort())( | ||
["$input.additionalProperties"].sort(), | ||
); | ||
}; |
File renamed without changes.