Skip to content
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

Nullable and patern #595

Open
ntnchrrn07 opened this issue Feb 15, 2024 · 0 comments
Open

Nullable and patern #595

ntnchrrn07 opened this issue Feb 15, 2024 · 0 comments

Comments

@ntnchrrn07
Copy link

ntnchrrn07 commented Feb 15, 2024

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"}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant