Skip to content

Commit

Permalink
Every JSON and LLM schema starts from the OpenAPI v3.1 emended specif…
Browse files Browse the repository at this point in the history
…ication.
  • Loading branch information
samchon committed Oct 22, 2024
1 parent c64ac47 commit 6943536
Show file tree
Hide file tree
Showing 152 changed files with 756 additions and 1,901 deletions.
2 changes: 1 addition & 1 deletion benchmark/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,6 @@
"suppress-warnings": "^1.0.2",
"tstl": "^3.0.0",
"uuid": "^9.0.1",
"typia": "../typia-7.0.0-dev.20241022-2.tgz"
"typia": "../typia-7.0.0-dev.20241022-3.tgz"
}
}
2 changes: 1 addition & 1 deletion errors/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@
"typescript": "^5.3.2"
},
"dependencies": {
"typia": "../typia-7.0.0-dev.20241022-2.tgz"
"typia": "../typia-7.0.0-dev.20241022-3.tgz"
}
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "typia",
"version": "7.0.0-dev.20241022-2",
"version": "7.0.0-dev.20241022-3",
"description": "Superfast runtime validators with only one line",
"main": "lib/index.js",
"typings": "lib/index.d.ts",
Expand Down
4 changes: 2 additions & 2 deletions packages/typescript-json/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "typescript-json",
"version": "7.0.0-dev.20241022-2",
"version": "7.0.0-dev.20241022-3",
"description": "Superfast runtime validators with only one line",
"main": "lib/index.js",
"typings": "lib/index.d.ts",
Expand Down Expand Up @@ -64,7 +64,7 @@
},
"homepage": "https://typia.io",
"dependencies": {
"typia": "7.0.0-dev.20241022-2"
"typia": "7.0.0-dev.20241022-3"
},
"peerDependencies": {
"typescript": ">=4.8.0 <5.7.0"
Expand Down
28 changes: 10 additions & 18 deletions src/programmers/RandomProgrammer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,11 @@ import { StringUtil } from "../utils/StringUtil";
import { FeatureProgrammer } from "./FeatureProgrammer";
import { FunctionProgrammer } from "./helpers/FunctionProgrammer";
import { RandomJoiner } from "./helpers/RandomJoiner";
import { application_array } from "./internal/application_array";
import { application_bigint } from "./internal/application_bigint";
import { application_boolean } from "./internal/application_boolean";
import { application_number } from "./internal/application_number";
import { application_string } from "./internal/application_string";
import { application_v31_schema } from "./internal/application_v31_schema";
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 interface IProps {
Expand Down Expand Up @@ -470,12 +469,12 @@ export namespace RandomProgrammer {
}) => {
const schemaList: OpenApi.IJsonSchema[] =
props.atomic.type === "boolean"
? application_boolean<"3.1">(props.atomic)
? json_schema_boolean(props.atomic)
: props.atomic.type === "string"
? application_string<"3.1">(props.atomic)
? json_schema_string(props.atomic)
: props.atomic.type === "bigint"
? application_bigint<"3.1">(props.atomic)
: application_number<"3.1">(props.atomic);
? json_schema_bigint(props.atomic)
: json_schema_number(props.atomic);
return schemaList.map((schema) => {
interface IComposed {
method: string;
Expand Down Expand Up @@ -577,14 +576,7 @@ export namespace RandomProgrammer {
array: MetadataArray;
}): ts.Expression[] => {
const components: OpenApi.IComponents = {};
const schemaList: OpenApi.IJsonSchema.IArray[] = application_array<"3.1">({
generator: (value) =>
application_v31_schema({
blockNever: true,
components,
attribute: {},
metadata: value,
})!,
const schemaList: OpenApi.IJsonSchema.IArray[] = json_schema_array({
components,
array: props.array,
}) as OpenApi.IJsonSchema.IArray[];
Expand Down
56 changes: 0 additions & 56 deletions src/programmers/internal/application_array.ts

This file was deleted.

25 changes: 0 additions & 25 deletions src/programmers/internal/application_bigint.ts

This file was deleted.

25 changes: 0 additions & 25 deletions src/programmers/internal/application_boolean.ts

This file was deleted.

96 changes: 0 additions & 96 deletions src/programmers/internal/application_escaped.ts

This file was deleted.

25 changes: 0 additions & 25 deletions src/programmers/internal/application_number.ts

This file was deleted.

25 changes: 0 additions & 25 deletions src/programmers/internal/application_string.ts

This file was deleted.

Loading

0 comments on commit 6943536

Please sign in to comment.