Skip to content

Add ULID and Email format documentation#2886

Merged
koxudaxi merged 1 commit intomainfrom
feature/ulid-dependency-hints
Jan 1, 2026
Merged

Add ULID and Email format documentation#2886
koxudaxi merged 1 commit intomainfrom
feature/ulid-dependency-hints

Conversation

@koxudaxi
Copy link
Copy Markdown
Owner

@koxudaxi koxudaxi commented Jan 1, 2026

Fixes: #2819

Summary by CodeRabbit

Documentation

  • Added comprehensive documentation for ULID format support, including dependency information, installation instructions, and usage examples.
  • Enhanced Email format documentation with detailed setup guidance and schema examples for both standard and Pydantic-integrated usage.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jan 1, 2026

📝 Walkthrough

Walkthrough

This PR adds documentation for ULID and email string format types, including dependency notes, installation references, and usage examples. The changes span two documentation files to provide comprehensive guidance on these supported formats.

Changes

Cohort / File(s) Summary
Documentation: Format Support
docs/supported-data-types.md
Added ulid to String Formats list with dependency note linking to python-ulid package; updated email and idn-email entries with dependency notes linking to email-validator.
Documentation: Format Mappings
docs/type-mappings.md
Added email and ulid format entries in Quick Overview and Type Mapping Reference sections; introduced dedicated subsections "Email Format Support" and "ULID Format Support" with dependency details, installation instructions, schema examples, Python output, and guidance for optional dependency usage.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • #2820: Implements ULID and email type support in the code generator, which is the functional complement to this documentation PR.

Poem

🐰 A hop through formats new and bright,
ULID and email, shining bright!
Dependencies are now in sight,
With docs to guide, all feels so right—
The rabbit cheers this knowledge light!

Pre-merge checks

❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning The PR adds ULID format documentation and dependency hints as requested in issue #2819, but the changes are documentation-only without code implementation for actual ULID type handling. Implement code changes to recognize and handle properties with 'format': 'ulid' as ULID types in the generator, beyond documentation updates.
Out of Scope Changes check ⚠️ Warning The PR adds Email format documentation alongside ULID, which extends beyond the scope of issue #2819 that only requests ULID support. Either update the linked issue to include Email format support objectives, or remove Email-related documentation changes to maintain scope alignment.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main changes: adding documentation for ULID and Email format support with dependency hints.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2814f56 and 47deb1e.

📒 Files selected for processing (2)
  • docs/supported-data-types.md
  • docs/type-mappings.md
🔇 Additional comments (5)
docs/type-mappings.md (4)

16-17: ✓ Quick Overview additions are clear and concise.

The new rows for email and ULID formats in the table maintain consistency with existing entries and properly indicate their dependency requirements.


235-283: ✓ Email Format Support section is well-documented.

The section provides comprehensive guidance with accurate installation instructions, a clear schema example, correct output code using EmailStr, and practical advice for avoiding the dependency via --type-mappings. EmailStr requires email-validator to be installed, which is clearly communicated in the warning box.


285-338: ✓ ULID Format Support section is comprehensive and accurate.

The section correctly documents:

  • ULID works with Pydantic via from pydantic import BaseModel and from ulid import ULID
  • Installation instructions for both basic and Pydantic integration (lines 290-296) match the python-ulid package API
  • Accurate ULID characteristics: lexicographic sorting, 26-character encoding, Crockford's Base32, timestamp-encoded
  • Clear use cases and when to adopt ULID

The output example (lines 313-321) correctly shows the import structure and Pydantic integration.


429-429: ✓ Type Mapping Reference update is consistent.

ULID entry correctly reflects the default type and the mapping option, maintaining consistency with the new Email Format Support section.

docs/supported-data-types.md (1)

30-34: ✓ String Format entries are updated with accurate dependency information and links.

The email and ULID entries now include:

  • Clear dependency indicators following the existing format pattern
  • Correct repository links pointing to the maintainer repositories
  • Consistency with the more detailed guidance in type-mappings.md

EmailStr requires email-validator to be installed, and python-ulid similarly requires the python-ulid package, both of which are now properly documented.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jan 1, 2026

📚 Docs Preview: https://pr-2886.datamodel-code-generator.pages.dev

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented Jan 1, 2026

CodSpeed Performance Report

Merging #2886 will not alter performance

Comparing feature/ulid-dependency-hints (47deb1e) with main (636d9e8)

⚠️ Unknown Walltime execution environment detected

Using the Walltime instrument on standard Hosted Runners will lead to inconsistent data.

For the most accurate results, we recommend using CodSpeed Macro Runners: bare-metal machines fine-tuned for performance measurement consistency.

Summary

✅ 11 untouched
⏩ 98 skipped1

Footnotes

  1. 98 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 1, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.37%. Comparing base (636d9e8) to head (47deb1e).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2886   +/-   ##
=======================================
  Coverage   99.37%   99.37%           
=======================================
  Files          92       92           
  Lines       16046    16046           
  Branches     1893     1893           
=======================================
  Hits        15945    15945           
  Misses         52       52           
  Partials       49       49           
Flag Coverage Δ
unittests 99.37% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@koxudaxi koxudaxi marked this pull request as draft January 1, 2026 07:41
@koxudaxi koxudaxi force-pushed the feature/ulid-dependency-hints branch from 2814f56 to 264d79f Compare January 1, 2026 13:15
@koxudaxi koxudaxi changed the title Add ULID documentation and dependency hints for external packages Add ULID format documentation Jan 1, 2026
@koxudaxi koxudaxi force-pushed the feature/ulid-dependency-hints branch from 264d79f to 47deb1e Compare January 1, 2026 14:36
@koxudaxi koxudaxi changed the title Add ULID format documentation Add ULID and Email format documentation Jan 1, 2026
@koxudaxi koxudaxi marked this pull request as ready for review January 1, 2026 14:40
@koxudaxi koxudaxi merged commit 6ab97df into main Jan 1, 2026
36 checks passed
@koxudaxi koxudaxi deleted the feature/ulid-dependency-hints branch January 1, 2026 15:02
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jan 1, 2026

Breaking Change Analysis

Result: No breaking changes detected

Reasoning: PR #2886 only modifies documentation files (docs/supported-data-types.md and docs/type-mappings.md). The changes add documentation for existing ULID and Email format support, including dependency information, installation instructions, and usage examples. No source code, templates, CLI options, default behavior, or code generation logic was changed. Documentation-only changes do not constitute breaking changes.


This analysis was performed by Claude Code Action

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jan 2, 2026

🎉 Released in 0.52.0

This PR is now available in the latest release. See the release notes for details.

@github-actions github-actions Bot mentioned this pull request Jan 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support ULID type

1 participant