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
Hi, I could not use for a string pattern and nullable, is it normal ?
OpenApiSpex.schema(%{ title: "mySchema", type: :object, properties: %{ dummy: %Schema{ type: :string, nullable: true, pattern: "^[0-9]{3}$" }
}
I would like to allow :
{dummy: null} and {dummy: "010"}
The text was updated successfully, but these errors were encountered:
I have same problem here, nullable: true does not work with pattern, an workaround is "accept null" in your regex.
nullable: true
adding |^$ to end of your regex should works.
|^$
some like pattern: "^[0-9]{3}$|^$"
pattern: "^[0-9]{3}$|^$"
Sorry, something went wrong.
No branches or pull requests
Hi,
I could not use for a string pattern and nullable, is it normal ?
}
I would like to allow :
{dummy: null}
and {dummy: "010"}
The text was updated successfully, but these errors were encountered: