Skip to content

Conversation

samchon
Copy link
Owner

@samchon samchon commented Jul 10, 2025

export interface Something {
  /**
   * The first line is not title.
   *
   * The title field can be filled only by `@title` tag.
   */
  first: string;

  /**
   * The title value only comes from JSDocTag like below.
   *
   * @title this is the title
   */
  second: number;
}

```typescript
export interface Something {
  /**
   * The first line is not title.
   *
   * The title field can be filled only by `@title` tag.
   */
  first: string;

  /**
   * The title value only comes from JSDocTag like below.
   *
   * @title this is the title
   */
  second: number;
}
```
@samchon samchon requested a review from Copilot July 10, 2025 03:29
@samchon samchon self-assigned this Jul 10, 2025
@samchon samchon added documentation Improvements or additions to documentation enhancement New feature or request labels Jul 10, 2025
Copy link

socket-security bot commented Jul 10, 2025

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updated@​samchon/​openapi@​4.4.1 ⏵ 4.5.010010010096100

View full report

Copy link

pkg-pr-new bot commented Jul 10, 2025

Open in StackBlitz

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

commit: 9927c83

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 updates the JSON schema title generation so that titles are emitted only when an explicit @title JSDoc tag is used, and the tag’s text is appended into the description instead of populating the title property.

  • Added a test in test/src/debug/title.ts to validate the new @title behavior.
  • Removed automatic "title" properties from all generated JSON schema snapshots.
  • Updated schema descriptions to include @title markers where tags were present.

Reviewed Changes

Copilot reviewed 73 out of 74 changed files in this pull request and generated no comments.

File Description
test/src/debug/title.ts New test for verifying @title-only schema titles
test/schemas/**/*.json Snapshots: removed auto-generated title props, added @title annotations in descriptions
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported
Comments suppressed due to low confidence (2)

test/src/debug/title.ts:37

  • This test currently only logs the schema; consider adding assertions to automatically verify that no title fields appear for NoTitleTag and that the correct @title values appear in descriptions.
console.log(JSON.stringify(r, null, 2));

test/schemas/llm.schema/gemini/ObjectJsonTag.json:14

  • [nitpick] Consider standardizing the order of description segments: if some schemas prepend the tag block while others append, it can be confusing and make diffs noisy.
      "description": "Titled property.\n\n@title something"

@samchon samchon merged commit 745ede3 into master Jul 10, 2025
9 checks passed
@samchon samchon deleted the feat/title branch July 10, 2025 03:36
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 enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant