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
:not
Reproductible example:
defmodule MySchema do alias OpenApiSpex.Schema require OpenApiSpex OpenApiSpex.schema(%{ title: "Object", type: :object, not: %Schema{type: :object, properties: %{code: %Schema{enum: ["bad_code", type: :string]}}}, properties: %{code: %Schema{type: :string}} }) end defmodule MySpec do alias OpenApiSpex.Components alias OpenApiSpex.Info alias OpenApiSpex.OpenApi def spec do %OpenApi{ servers: [], info: %Info{ title: to_string(Application.spec(:my_app, :description)), version: to_string(Application.spec(:my_app, :vsn)) }, paths: %{}, components: %Components{ schemas: %{"MySchema" => MySchema.schema()} } } |> OpenApiSpex.resolve_schema_modules() end end OpenApiSpex.TestAssertions.assert_schema(%{"code" => "good_code"}, "MySchema", MySpec.spec()) |> dbg() OpenApiSpex.TestAssertions.assert_schema(%{"code" => "bad_code"}, "MySchema", MySpec.spec()) |> dbg()
Bot calls at the bottom return the valid data, while the second one should raise because "bad_code" is forbidden.
"bad_code"
EDIT: Well, looking at the 3.0 specification, it seems that not is not a supported keyword. What is it supposed to do in OpenApiSpex?
not
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Reproductible example:
Bot calls at the bottom return the valid data, while the second one should raise because
"bad_code"
is forbidden.EDIT: Well, looking at the 3.0 specification, it seems that
not
is not a supported keyword. What is it supposed to do in OpenApiSpex?The text was updated successfully, but these errors were encountered: