Skip to content

feat: support for openapi formats (int64, int32, date, date time) - #1553

Open
hazrid93 wants to merge 1 commit into
open-circle:mainfrom
hazrid93:hazrid93/26_1239
Open

feat: support for openapi formats (int64, int32, date, date time)#1553
hazrid93 wants to merge 1 commit into
open-circle:mainfrom
hazrid93:hazrid93/26_1239

Conversation

@hazrid93

@hazrid93 hazrid93 commented Jul 20, 2026

Copy link
Copy Markdown

Closes #1239.

Add an int32(message?) action that validates a number is within [ 2147483648, 2147483647] (the OpenAPI int32 range). It accepts any number in range (including decimals); pair with integer to require an integer. The existing integer/safeInteger/minValue/maxValue actions are unchanged.

Summary by CodeRabbit

  • New Features
    • Added int32 validation for signed 32-bit integer values.
    • Validation reports an issue when a value falls outside the supported range.
    • Made the new validation action available through the package’s actions entry point.
    • Added support for custom validation error messages.

Closes open-circle#1239.

Add an `int32(message?)` action that validates a number is within [ 2147483648, 2147483647] (the OpenAPI int32 range). It accepts any number in range (including decimals); pair with `integer` to require an integer. The existing integer/safeInteger/minValue/maxValue actions are unchanged.
@dosubot dosubot Bot added size:M This PR changes 30-99 lines, ignoring generated files. enhancement New feature or request labels Jul 20, 2026
@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: c93cf4f4-e4de-4e79-b7d3-a490cc568c8a

📥 Commits

Reviewing files that changed from the base of the PR and between 90bc2c7 and 51b26b9.

📒 Files selected for processing (3)
  • library/src/actions/index.ts
  • library/src/actions/int32/index.ts
  • library/src/actions/int32/int32.ts

Walkthrough

Adds an int32 validation action for signed 32-bit integer bounds, including typed issue and action interfaces, factory overloads, configurable messages, and runtime issue creation. Adds barrel exports at the int32 module and actions entry points.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning The PR only adds int32 support and does not address the linked issue's int64, date, and date-time format support or schema conversion needs. Add the remaining OpenAPI format mappings for int64, date, and date-time, including the tojsonschema/OpenAPI generation behavior.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title matches the OpenAPI format work, though it overstates the scope by listing formats not added in this PR.
Out of Scope Changes check ✅ Passed The changes stay focused on int32 exports and the new validation action, with no unrelated feature additions.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

No issues found across 3 files

Re-trigger cubic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support for openapi formats (int64, int32, date, date-time)

1 participant