-
-
Notifications
You must be signed in to change notification settings - Fork 159
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
tags.Example
type with @samchon/openapi
upgrading.
Upgraded `@samchon/openapi` to the latest version (`1.0.5`) and added `tags.Example` and `tags.Examples` types for following the `@samchon/openapi`'s newly added properties. samchon/openapi#54
- Loading branch information
Showing
16 changed files
with
1,846 additions
and
273 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { ILlmApplication } from "@samchon/openapi"; | ||
import typia from "typia"; | ||
|
||
interface ICalculator { | ||
/** | ||
* @deprecated | ||
*/ | ||
plus(x: number, y: number): number; | ||
} | ||
|
||
const app: ILlmApplication = typia.llm.application<ICalculator>(); | ||
console.log(app.functions[0]?.deprecated); |
This file was deleted.
Oops, something went wrong.
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
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,17 @@ | ||
import { TagBase } from "./TagBase"; | ||
|
||
export type Example< | ||
Value extends boolean | bigint | number | string | Array<unknown> | null, | ||
> = TagBase<{ | ||
target: "boolean" | "bigint" | "number" | "string" | "array"; | ||
kind: "example"; | ||
value: Value; | ||
exclusive: true; | ||
schema: Value extends bigint | ||
? { example: Numeric<Value> } | ||
: { example: Value }; | ||
}>; | ||
|
||
type Numeric<T extends bigint> = `${T}` extends `${infer N extends number}` | ||
? N | ||
: never; |
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,16 @@ | ||
import { TagBase } from "./TagBase"; | ||
|
||
export type Examples< | ||
Dict extends Record< | ||
string, | ||
boolean | bigint | number | string | Array<unknown> | null | ||
>, | ||
> = TagBase<{ | ||
target: "boolean" | "bigint" | "number" | "string" | "array"; | ||
kind: "examples"; | ||
value: Dict; | ||
exclusive: true; | ||
schema: { | ||
examples: Dict; | ||
}; | ||
}>; |
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
Oops, something went wrong.