Skip to content

Conversation

samchon
Copy link
Owner

@samchon samchon commented Aug 6, 2025

This pull request adds comprehensive JSDoc documentation to all validation tag types in the src/tags directory. The new comments explain the purpose, usage, and examples for each tag, improving code readability and making it easier for developers to understand and use these tags correctly. The documentation also highlights important constraints and relationships between tags (such as mutual exclusivity), and provides author attribution.

The most important changes are grouped below:

Core Documentation Improvements

  • Added detailed JSDoc comments to all tag types (Constant, Default, Example, Examples, ExclusiveMaximum, ExclusiveMinimum, Format, JsonSchemaPlugin, MaxItems, MaxLength, Maximum, MinItems, MinLength, Minimum, MultipleOf, Pattern, Sequence, and TagBase). Each comment explains the tag's purpose, usage, supported types, and includes practical code examples. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18]

TagBase Foundation

  • Added a top-level JSDoc comment to the TagBase type and its IProps interface, describing their role as the foundation for all validation tags and providing a custom tag example. [1] [2]

Usage Guidance and Constraints

  • Documented mutual exclusivity between certain tags (e.g., Maximum vs. ExclusiveMaximum, Minimum vs. ExclusiveMinimum, Format vs. Pattern) to help prevent incorrect usage. [1] [2] [3] [4] [5] [6]

Practical Examples

  • Included multiple code examples for each tag, demonstrating real-world scenarios and best practices for using the tags in type definitions and interfaces. (All tag documentation changes)

Author Attribution

  • Added @author attribution for Jeongho Nam in all new documentation comments. (All tag documentation changes)

These changes significantly improve the developer experience by making the validation tags self-documenting and easier to discover and use correctly.

@samchon samchon requested a review from Copilot August 6, 2025 17:41
@samchon samchon self-assigned this Aug 6, 2025
@samchon samchon added the documentation Improvements or additions to documentation label Aug 6, 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 pull request adds comprehensive JSDoc documentation to all validation tag types in the src/tags directory. The documentation provides detailed explanations of each tag's purpose, usage examples, constraints, and relationships with other tags to improve developer experience and code maintainability.

  • Added JSDoc comments to 19 tag types with detailed descriptions, usage examples, and author attribution
  • Documented mutual exclusivity constraints between related tags (e.g., Maximum vs. ExclusiveMaximum)
  • Included practical code examples showing real-world usage scenarios for each validation tag

Reviewed Changes

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

Show a summary per file
File Description
TagBase.ts Added foundational documentation explaining the base type for all validation tags
Constant.ts Documented tag for adding metadata to literal types with title/description
ContentMediaType.ts Added documentation for MIME type specification tag
Default.ts Documented default value assignment tag for optional properties
Example.ts Added documentation for single example value tag
Examples.ts Documented multiple named examples tag
ExclusiveMaximum.ts Added documentation for strict maximum constraint tag
ExclusiveMinimum.ts Documented strict minimum constraint tag
Format.ts Added documentation for predefined string format validation
JsonSchemaPlugin.ts Documented custom JSON Schema property injection tag
Maximum.ts Added documentation for inclusive maximum constraint tag
MaxItems.ts Documented array maximum length validation tag
MaxLength.ts Added documentation for string maximum length constraint
Minimum.ts Documented inclusive minimum constraint tag
MinItems.ts Added documentation for array minimum length validation tag
MinLength.ts Documented string minimum length constraint tag
MultipleOf.ts Added documentation for numeric multiple constraint tag
Pattern.ts Documented regular expression validation tag
Sequence.ts Added documentation for Protocol Buffer field numbering tag
Type.ts Documented numeric bit-width representation tag
UniqueItems.ts Added documentation for array uniqueness validation tag

Copy link

pkg-pr-new bot commented Aug 6, 2025

Open in StackBlitz

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

commit: f1ce938

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@samchon samchon merged commit c5bf7ca into master Aug 8, 2025
10 checks passed
@samchon samchon deleted the feat/tags branch August 8, 2025 15:22
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