Skip to content

Conversation

samchon
Copy link
Owner

@samchon samchon commented Mar 30, 2025

This pull request introduces a set of new example code files and updates to demonstrate the usage of the typia library. The changes include adding new JSON schema examples, functional examples, and LLM (Large Language Models) application examples. Below are the most important changes grouped by theme:

JSON Schema Examples:

  • Added assertParse, createAssertStringify, createIsParse, isStringify, schemas-comment-tags, schemas-type-tags, and schemas examples to demonstrate various JSON schema functionalities using typia (examples/src/json/assertParse.ts [1] examples/src/json/createAssertStringify.ts [2] examples/src/json/createIsParse.ts [3] examples/src/json/isStringify.ts [4] examples/src/json/schemas-comment-tags.ts [5] examples/src/json/schemas-type-tags.ts [6] examples/src/json/schemas.ts [7]).

Functional Examples:

  • Added assertFunction, isFunction, and validateFunction examples to demonstrate functional programming with type assertions and validations using typia (examples/src/functional/assertFunction.ts [1] examples/src/functional/isFunction.ts [2] examples/src/functional/validateFunction.ts [3]).

LLM Application Examples:

  • Added BbsArticleService, IBbsArticle, IMember, application-separate, application, and namespace examples to demonstrate the integration of typia with LLM applications like ChatGPT and Claude (examples/src/llm/BbsArticleService.ts [1] examples/src/llm/IBbsArticle.ts [2] examples/src/llm/IMember.ts [3] examples/src/llm/application-separate.ts [4] examples/src/llm/application.ts [5] examples/src/llm/namespace.ts [6]).

Configuration:

  • Added a new package.json file in the examples directory to manage dependencies and scripts for building and running the examples (examples/package.json).

@samchon samchon added the documentation Improvements or additions to documentation label Mar 30, 2025
@samchon samchon requested a review from Copilot March 30, 2025 15:19
@samchon samchon self-assigned this Mar 30, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a comprehensive set of example codes to demonstrate the usage of the typia library across JSON schema validations, functional utilities, and LLM-based applications.

  • Introduces new examples for JSON schema validations (assertParse, createAssertStringify, etc.).
  • Adds functional examples demonstrating function validation and assertion.
  • Provides LLM application examples including namespace, application, and service implementations.

Reviewed Changes

Copilot reviewed 68 out of 69 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
examples/src/llm/namespace.ts Defines an LLM application using a controller interface with documentation.
examples/src/llm/application.ts Implements a basic LLM application example with ChatGPT.
examples/src/llm/application-separate.ts Demonstrates schema separation for a Claude-based application.
examples/src/llm/IMember.ts Provides IMember interface with typia tag validations.
examples/src/llm/IBbsArticle.ts Defines article interfaces for a bulletin board system, with comments.
examples/src/llm/BbsArticleService.ts Implements a service to handle article CRUD operations.
examples/src/json/schemas.ts Provides a JSON schema example for member objects.
examples/src/json/schemas-type-tags.ts Shows usage of custom type tags with placeholder messages.
examples/src/json/schemas-comment-tags.ts Demonstrates JSON schema definitions using comment tags.
examples/src/json/isStringify.ts Example of converting an object to a JSON string using typia.
examples/src/json/createIsParse.ts Provides an example of creating a custom isParse function.
examples/src/json/createAssertStringify.ts Demonstrates assertion and stringification for department objects.
examples/src/json/assertParse.ts Example of asserting JSON parse results for member objects.
examples/src/functional/validateFunction.ts Validates a given function using typia's functional utilities.
examples/src/functional/isFunction.ts Checks if a provided function is valid using typia.
examples/src/functional/assertFunction.ts Asserts function correctness with typia utility.
Files not reviewed (1)
  • examples/package.json: Language not supported

Copy link

pkg-pr-new bot commented Mar 30, 2025

Open in Stackblitz

npm i https://pkg.pr.new/typia@1558

commit: 2e365c7

Copy link

socket-security bot commented Mar 30, 2025

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@types/uuid@10.0.0 None 0 7.82 kB types
npm/openai@4.90.0 environment, network Transitive: eval, filesystem +34 5.55 MB dschnurr-openai

View full report↗︎

samchon and others added 5 commits March 31, 2025 00:24
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@samchon samchon merged commit 5636809 into master Mar 30, 2025
10 checks passed
@samchon samchon deleted the doc/nextra branch March 30, 2025 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant