Fix unsigned integer known format serialization - #1554
Open
MukundaKatta wants to merge 1 commit into
Open
Conversation
juhaku
reviewed
May 15, 2026
Comment on lines
+2034
to
+2049
| #[serde(rename = "uint8")] | ||
| UInt8, | ||
| /// 16 bit unsigned integer. | ||
| #[cfg(feature = "non_strict_integers")] | ||
| #[cfg_attr(doc_cfg, doc(cfg(feature = "non_strict_integers")))] | ||
| #[serde(rename = "uint16")] | ||
| UInt16, | ||
| /// 32 bit unsigned integer. | ||
| #[cfg(feature = "non_strict_integers")] | ||
| #[cfg_attr(doc_cfg, doc(cfg(feature = "non_strict_integers")))] | ||
| #[serde(rename = "uint32")] | ||
| UInt32, | ||
| /// 64 bit unsigned integer. | ||
| #[cfg(feature = "non_strict_integers")] | ||
| #[cfg_attr(doc_cfg, doc(cfg(feature = "non_strict_integers")))] | ||
| #[serde(rename = "uint64")] |
Owner
There was a problem hiding this comment.
Instead of this, I would rather change the rename_all to lowercase if possible.
There was a problem hiding this comment.
It won't be possible, because other types require kebab case. It's either one or another :/
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Snapshot Summary ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Snapshot file: utoipa-gen/tests/snapshots/path_derive__derive_path_with_datetime_format_path_parameter.snap
Snapshot: derive_path_with_datetime_format_path_parameter
Source: utoipa-gen/tests/path_derive.rs:447
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Expression: parameters
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
-old snapshot
+new results
────────────┬───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
14 14 │ "in": "query",
15 15 │ "name": "start",
16 16 │ "required": true,
17 17 │ "schema": {
18 │- "format": "date-time",
18 │+ "format": "datetime",
19 19 │ "type": "string"
20 20 │ }
21 21 │ }
22 22 │ ]
────────────┴───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
To update snapshots run `cargo insta review`
Stopped on the first failure. Run `cargo insta test` to run all snapshots.
Owner
There was a problem hiding this comment.
Oh, you are right. Well this is good to merge. Just needs CHANGELOG.md entry.
juhaku
approved these changes
Aug 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
uint8,uint16,uint32, anduint64u32andu64Closes #1527
Verification
cargo test -p utoipa test_partial_schema_strict_integerscargo test -p utoipa test_partial_schema_non_strict_integers --features non_strict_integerscargo test -p utoipa serialize_unsigned_integer_known_formats --features non_strict_integerscargo fmt --all --checkgit diff --check