-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
77 additions
and
132 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ on: | |
branches: | ||
- master | ||
paths: | ||
- README.md | ||
- 'src/**' | ||
- 'website/**' | ||
- 'package.json' | ||
|
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
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,60 @@ | ||
/** | ||
* Common attributes for JSON schema types. | ||
* | ||
* `IJsonSchemaAttribute` is a common interface for all JSON schema types | ||
* supported in here `@samchon/openapi`. Here is the list of affected JSON | ||
* schema types in `@samchon/openapi`, and you can extend the interface by | ||
* declaring module augmentation. | ||
* | ||
* - {@link OpenApi.IJsonSchema} | ||
* - {@link IChatGptSchema} | ||
* - {@link IClaudeSchema} | ||
* - {@link IGeminiSchema} | ||
* - {@link ILlmSchemaV3} | ||
* - {@link ILlmSchemaV3_1} | ||
* | ||
* For example, if you extend the `IJsonSchemaAttribute` interface like | ||
* below, every JSON schema types in `@samchon/openapi` will have a new | ||
* custom attribute `x-wrtn-placeholder`. | ||
* | ||
* ```typescript | ||
* declare module "@samchon/openapi" { | ||
* export interface IJsonSchemaAttribute { | ||
* /// Placeholder value for frontend application | ||
* /// | ||
* /// Placeholder ia label shown in the input field as a hint. | ||
* /// For example, when an email input field exists, the label | ||
* /// value would be "Insert your email address here". | ||
* "x-wrtn-placeholder"?: string; | ||
* } | ||
* } | ||
* ``` | ||
* | ||
* @author Jeongho Nam - https://github.com/samchon | ||
*/ | ||
export interface IJsonSchemaAttribute { | ||
/** | ||
* Title of the schema. | ||
*/ | ||
title?: string; | ||
|
||
/** | ||
* Detailed description of the schema. | ||
*/ | ||
description?: string; | ||
|
||
/** | ||
* Whether the type is deprecated or not. | ||
*/ | ||
deprecated?: boolean; | ||
|
||
/** | ||
* Example value. | ||
*/ | ||
example?: any; | ||
|
||
/** | ||
* List of example values as key-value pairs. | ||
*/ | ||
examples?: Record<string, any>; | ||
} |
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