Skip to content

Commit

Permalink
Merge pull request #1440 from samchon/feat/openapi
Browse files Browse the repository at this point in the history
Adapt `@samchon/openapi@2.3.0`.
  • Loading branch information
samchon authored Dec 18, 2024
2 parents 2d0ec1c + 166d49c commit ca6db7d
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 6 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "typia",
"version": "7.4.2",
"version": "7.5.0",
"description": "Superfast runtime validators with only one line",
"main": "lib/index.js",
"typings": "lib/index.d.ts",
Expand Down Expand Up @@ -41,7 +41,7 @@
},
"homepage": "https://typia.io",
"dependencies": {
"@samchon/openapi": "^2.2.1",
"@samchon/openapi": "^2.3.0",
"commander": "^10.0.0",
"comment-json": "^4.2.3",
"inquirer": "^8.2.5",
Expand All @@ -50,7 +50,7 @@
},
"peerDependencies": {
"typescript": ">=4.8.0 <5.8.0",
"@samchon/openapi": ">=2.2.1 <3.0.0"
"@samchon/openapi": ">=2.3.0 <3.0.0"
},
"devDependencies": {
"@rollup/plugin-commonjs": "^26.0.1",
Expand Down
6 changes: 3 additions & 3 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.4.2-dev.20241217",
"version": "7.5.0-dev.20241218",
"description": "Superfast runtime validators with only one line",
"main": "lib/index.js",
"typings": "lib/index.d.ts",
Expand Down Expand Up @@ -37,11 +37,11 @@
},
"homepage": "https://typia.io",
"dependencies": {
"typia": "7.4.2-dev.20241217"
"typia": "7.5.0-dev.20241218"
},
"peerDependencies": {
"typescript": ">=4.8.0 <5.8.0",
"@samchon/openapi": ">=2.2.1 <3.0.0"
"@samchon/openapi": ">=2.3.0-dev.20241218 <3.0.0"
},
"stackblitz": {
"startCommand": "npm install && npm run test"
Expand Down
4 changes: 4 additions & 0 deletions src/programmers/llm/LlmApplicationProgrammer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,10 @@ export namespace LlmApplicationProgrammer {
output.push(
`${prefix}'s return type must not be union type with undefined.`,
);
if (/^[0-9]/.test(name[0] ?? "") === true)
output.push(`name must not start with a number.`);
if (/^[a-zA-Z0-9_-]+$/.test(name) === false)
output.push(`name must be alphanumeric with underscore or hypen.`);
if (func.parameters.length !== 1)
output.push(`${prefix} must have a single parameter.`);
if (func.parameters.length !== 0) {
Expand Down
41 changes: 41 additions & 0 deletions test-error/src/llm/llm.application.name.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import typia from "typia";

// APPLICATION FUNCTION
typia.llm.application<
{
"0create"(p: {}): void;
},
"chatgpt"
>();
typia.llm.application<
{
"a.b.c"(p: {}): void;
},
"chatgpt"
>();
typia.llm.application<
{
"&x"(p: {}): void;
},
"chatgpt"
>();

// APPLICATION-OF-VALIDATE
typia.llm.applicationOfValidate<
{
"0create"(p: {}): void;
},
"chatgpt"
>();
typia.llm.applicationOfValidate<
{
"a.b.c"(p: {}): void;
},
"chatgpt"
>();
typia.llm.applicationOfValidate<
{
"&x"(p: {}): void;
},
"chatgpt"
>();

0 comments on commit ca6db7d

Please sign in to comment.