We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I have a query parameter defined like so:
#[oai(validator(max_items = "10"))] Query(fragment_ids): Query<Vec<FragmentId>>,
FragmentId is a NewType, defined as:
#[derive(NewType)] #[oai(example = true)] /// Unique ID of a fragment. pub(crate) struct FragmentId(String); impl Example for FragmentId { fn example() -> Self { Self("0x7db6f91f3c92c0aef7b3dd497e9ea275229d2ab4dba6a1b30ce6b32db9c9c3b2".into()) } }
How do I set the maxLength and pattern properties on this string type that's inside the array?
maxLength
pattern
I want pattern to enforce the hex string, and length to enforce the maximum size of this id.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I have a query parameter defined like so:
FragmentId is a NewType, defined as:
How do I set the
maxLength
andpattern
properties on this string type that's inside the array?I want pattern to enforce the hex string, and length to enforce the maximum size of this id.
The text was updated successfully, but these errors were encountered: