-
Notifications
You must be signed in to change notification settings - Fork 204
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support ULID #733
Support ULID #733
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems otherwise good, just a test missing from schema_derive_test.rs
for the ulid case.
Also perhaps the known format thingy could be bit refactored.
#[cfg(not(any(feature = "uuid", feature = "ulid")))]
{
true
}
#[cfg(all(feature = "uuid", not(feature = "ulid")))]
{
format != "Ulid"
}
#[cfg(all(feature = "ulid", not(feature = "uuid")))]
{
format != "Uuid"
}
Can you help with the test? I'm not sure how to write one |
utoipa/utoipa-gen/tests/schema_derive_test.rs Lines 4707 to 4730 in 56b6326
Just like in above one but it it should test a type that has the #[test]
#[cfg(feature = "ulid")]
fn test {
#[derive(ToSchema)]
struct Foo {
value: Ulid,
}
// ... and so on the assertion
} |
I added test. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great 🏆
This PR adds support for ulid.