Skip to content

Conversation

@samchon
Copy link
Owner

@samchon samchon commented Jan 23, 2026

This pull request updates the handling of jsDoc tags in the JSON schema plugin to support proper casting of the string "null" to the JavaScript null value. It also adds corresponding tests to ensure this behavior is correctly validated.

Enhancements to jsDoc tag value casting:

  • Updated the cast function in src/programmers/internal/json_schema_jsDocTags.ts to convert the string "null" to the JavaScript null value, in addition to existing conversions for booleans and numbers.

Testing improvements:

  • Added a test in test/src/features/issues/test_pr_1714_json_schema_plugin_by_jsDocTags.ts to verify that the new @x-null-value null jsDoc tag is correctly cast to null in the generated schema.
  • Modified the ISomething interface in the same test file to include the @x-null-value null jsDoc tag for the id property.

Version update:

  • Bumped the package version in package.json from 11.0.1 to 11.0.2 to reflect these changes.

@samchon samchon self-assigned this Jan 23, 2026
@samchon samchon added the enhancement New feature or request label Jan 23, 2026
@pkg-pr-new
Copy link

pkg-pr-new bot commented Jan 23, 2026

Open in StackBlitz

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

commit: 0bed945

@samchon samchon marked this pull request as ready for review January 23, 2026 08:32
Copilot AI review requested due to automatic review settings January 23, 2026 08:32
Copy link
Contributor

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

Updates JSON schema jsDoc tag handling so extension tags can cast the literal string "null" into the JSON null value, and adds a regression test for the behavior.

Changes:

  • Trim jsDoc tag text values before casting and add "null"null casting for x-* tags.
  • Add a test asserting @x-null-value null is emitted as null in the generated schema.
  • Bump package version from 11.0.1 to 11.0.2.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/programmers/internal/json_schema_jsDocTags.ts Trims jsDoc tag text and extends casting logic to support null.
test/src/features/issues/test_pr_1714_json_schema_plugin_by_jsDocTags.ts Adds coverage for @x-null-value null producing null in schema output.
package.json Version bump to reflect the change.

@samchon samchon merged commit 3c8e60a into master Jan 23, 2026
16 checks passed
@samchon samchon deleted the feat/x-plugin-null branch January 23, 2026 08:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants