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

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
620 changes: 296 additions & 324 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

12 changes: 0 additions & 12 deletions test-esm/generate/output/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ const application: ILlmApplication<"chatgpt"> = {
{
name: "establishCompany",
parameters: {
description: "",
type: "object",
properties: {
company: {
Expand All @@ -28,7 +27,6 @@ const application: ILlmApplication<"chatgpt"> = {
additionalProperties: false,
$defs: {
"default.o1": {
description: "",
type: "object",
properties: {
id: {
Expand All @@ -55,7 +53,6 @@ const application: ILlmApplication<"chatgpt"> = {
required: ["id", "serial", "name", "established_at", "departments"],
},
"default.o2": {
description: "",
type: "object",
properties: {
id: {
Expand Down Expand Up @@ -400,7 +397,6 @@ const application: ILlmApplication<"chatgpt"> = {
{
name: "createDepartment",
parameters: {
description: "",
type: "object",
properties: {
company: {
Expand All @@ -414,7 +410,6 @@ const application: ILlmApplication<"chatgpt"> = {
additionalProperties: false,
$defs: {
"default.o1": {
description: "",
type: "object",
properties: {
id: {
Expand All @@ -441,7 +436,6 @@ const application: ILlmApplication<"chatgpt"> = {
required: ["id", "serial", "name", "established_at", "departments"],
},
"default.o2": {
description: "",
type: "object",
properties: {
id: {
Expand Down Expand Up @@ -806,7 +800,6 @@ const application: ILlmApplication<"chatgpt"> = {
{
name: "hire",
parameters: {
description: "",
type: "object",
properties: {
company: {
Expand All @@ -823,7 +816,6 @@ const application: ILlmApplication<"chatgpt"> = {
additionalProperties: false,
$defs: {
"default.o1": {
description: "",
type: "object",
properties: {
id: {
Expand All @@ -850,7 +842,6 @@ const application: ILlmApplication<"chatgpt"> = {
required: ["id", "serial", "name", "established_at", "departments"],
},
"default.o2": {
description: "",
type: "object",
properties: {
id: {
Expand Down Expand Up @@ -1232,7 +1223,6 @@ const application: ILlmApplication<"chatgpt"> = {
{
name: "erase",
parameters: {
description: "",
type: "object",
properties: {
entity: {
Expand All @@ -1250,7 +1240,6 @@ const application: ILlmApplication<"chatgpt"> = {
additionalProperties: false,
$defs: {
"default.o1": {
description: "",
type: "object",
properties: {
id: {
Expand All @@ -1277,7 +1266,6 @@ const application: ILlmApplication<"chatgpt"> = {
required: ["id", "serial", "name", "established_at", "departments"],
},
"default.o2": {
description: "",
type: "object",
properties: {
id: {
Expand Down
8 changes: 4 additions & 4 deletions test/build/internal/TestJsonSchemaGenerator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export namespace TestJsonSchemaGenerator {
export async function generate(
structures: TestStructure<any>[],
): Promise<void> {
await mkdir(`${__dirname}/../../src/features/json.schema`);
await mkdir(`${__dirname}/../../src/features/json.schemas`);
for (const version of ["3.0", "3.1"] as const)
await functor(structures, version);
}
Expand All @@ -16,7 +16,7 @@ export namespace TestJsonSchemaGenerator {
version: "3.0" | "3.1",
): Promise<void> {
const title: string = `v${version.replace(".", "_")}`;
const path: string = `${__dirname}/../../src/features/json.schema/${title}`;
const path: string = `${__dirname}/../../src/features/json.schemas/${title}`;
await fs.promises.mkdir(path);

for (const s of structures) {
Expand All @@ -42,7 +42,7 @@ export namespace TestJsonSchemaGenerator {
}

export async function schemas(): Promise<void> {
const location: string = `${__dirname}/../../schema/json.schema`;
const location: string = `${__dirname}/../../schemas/json.schema`;
await mkdir(location);

for (const version of ["3.0", "3.1"] as const) await iterate(version);
Expand All @@ -57,7 +57,7 @@ export namespace TestJsonSchemaGenerator {
async function iterate(version: "3.0" | "3.1") {
const title: string = `v${version.replace(".", "_")}`;
const path: string = `${__dirname}/../../src/features/json.schema/${title}`;
const schemaPath: string = `${__dirname}/../../schema/json.schema/${title}`;
const schemaPath: string = `${__dirname}/../../schemas/json.schema/${title}`;
await mkdir(schemaPath);

for (const file of await fs.promises.readdir(path)) {
Expand Down
3 changes: 0 additions & 3 deletions test/generate/output/generate_llm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ export const schema = ((props: {
if (undefined !== props?.$defs)
Object.assign(props.$defs, {
ICompany: {
description: "",
type: "object",
properties: {
id: {
Expand All @@ -40,7 +39,6 @@ export const schema = ((props: {
required: ["id", "serial", "name", "established_at", "departments"],
},
IDepartment: {
description: "",
type: "object",
properties: {
id: {
Expand Down Expand Up @@ -80,7 +78,6 @@ export const schema = ((props: {
],
},
IEmployee: {
description: "",
type: "object",
properties: {
id: {
Expand Down
3 changes: 0 additions & 3 deletions test/schemas/llm.application/chatgpt/ArrayAny.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
{
"name": "insert",
"parameters": {
"description": "",
"type": "object",
"properties": {
"first": {
Expand Down Expand Up @@ -106,7 +105,6 @@
{
"name": "reduce",
"parameters": {
"description": "",
"type": "object",
"properties": {
"first": {
Expand Down Expand Up @@ -377,7 +375,6 @@
{
"name": "coalesce",
"parameters": {
"description": "",
"type": "object",
"properties": {
"first": {
Expand Down
3 changes: 0 additions & 3 deletions test/schemas/llm.application/chatgpt/ArrayHierarchical.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
{
"name": "insert",
"parameters": {
"description": "",
"type": "object",
"properties": {
"first": {
Expand Down Expand Up @@ -150,7 +149,6 @@
{
"name": "reduce",
"parameters": {
"description": "",
"type": "object",
"properties": {
"first": {
Expand Down Expand Up @@ -553,7 +551,6 @@
{
"name": "coalesce",
"parameters": {
"description": "",
"type": "object",
"properties": {
"first": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
{
"name": "insert",
"parameters": {
"description": "",
"type": "object",
"properties": {
"first": {
Expand Down Expand Up @@ -158,7 +157,6 @@
{
"name": "reduce",
"parameters": {
"description": "",
"type": "object",
"properties": {
"first": {
Expand Down Expand Up @@ -585,7 +583,6 @@
{
"name": "coalesce",
"parameters": {
"description": "",
"type": "object",
"properties": {
"first": {
Expand Down
3 changes: 0 additions & 3 deletions test/schemas/llm.application/chatgpt/ArrayMatrix.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
{
"name": "insert",
"parameters": {
"description": "",
"type": "object",
"properties": {
"first": {
Expand All @@ -36,7 +35,6 @@
{
"name": "reduce",
"parameters": {
"description": "",
"type": "object",
"properties": {
"first": {
Expand Down Expand Up @@ -97,7 +95,6 @@
{
"name": "coalesce",
"parameters": {
"description": "",
"type": "object",
"properties": {
"first": {
Expand Down
6 changes: 0 additions & 6 deletions test/schemas/llm.application/chatgpt/ArrayRecursive.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
{
"name": "insert",
"parameters": {
"description": "",
"type": "object",
"properties": {
"first": {
Expand All @@ -22,7 +21,6 @@
"additionalProperties": false,
"$defs": {
"ArrayRecursive.ICategory": {
"description": "",
"type": "object",
"properties": {
"children": {
Expand Down Expand Up @@ -71,7 +69,6 @@
{
"name": "reduce",
"parameters": {
"description": "",
"type": "object",
"properties": {
"first": {
Expand All @@ -95,7 +92,6 @@
"additionalProperties": false,
"$defs": {
"ArrayRecursive.ICategory": {
"description": "",
"type": "object",
"properties": {
"children": {
Expand Down Expand Up @@ -147,7 +143,6 @@
{
"name": "coalesce",
"parameters": {
"description": "",
"type": "object",
"properties": {
"first": {
Expand Down Expand Up @@ -188,7 +183,6 @@
"additionalProperties": false,
"$defs": {
"ArrayRecursive.ICategory": {
"description": "",
"type": "object",
"properties": {
"children": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
{
"name": "insert",
"parameters": {
"description": "",
"type": "object",
"properties": {
"first": {
Expand Down Expand Up @@ -170,7 +169,6 @@
]
},
"ArrayRecursiveUnionExplicit.IDirectory": {
"description": "",
"type": "object",
"properties": {
"id": {
Expand Down Expand Up @@ -204,7 +202,6 @@
]
},
"ArrayRecursiveUnionExplicit.IShortcut": {
"description": "",
"type": "object",
"properties": {
"id": {
Expand Down Expand Up @@ -247,7 +244,6 @@
{
"name": "reduce",
"parameters": {
"description": "",
"type": "object",
"properties": {
"first": {
Expand Down Expand Up @@ -423,7 +419,6 @@
]
},
"ArrayRecursiveUnionExplicit.IDirectory": {
"description": "",
"type": "object",
"properties": {
"id": {
Expand Down Expand Up @@ -457,7 +452,6 @@
]
},
"ArrayRecursiveUnionExplicit.IShortcut": {
"description": "",
"type": "object",
"properties": {
"id": {
Expand Down Expand Up @@ -507,7 +501,6 @@
{
"name": "coalesce",
"parameters": {
"description": "",
"type": "object",
"properties": {
"first": {
Expand Down Expand Up @@ -704,7 +697,6 @@
]
},
"ArrayRecursiveUnionExplicit.IDirectory": {
"description": "",
"type": "object",
"properties": {
"id": {
Expand Down Expand Up @@ -738,7 +730,6 @@
]
},
"ArrayRecursiveUnionExplicit.IShortcut": {
"description": "",
"type": "object",
"properties": {
"id": {
Expand Down
Loading