Skip to content

Handle "true" or "false" for schema type defined as boolean #204

@KevinOl

Description

@KevinOl

Hi,

I've got a schema definition as follow,

OpenApiSpex.schema(%{
...
   should_be_a_boolean: %Schema{
           type: :boolean,
           description: "some description"
         },
...
})

In my test, when 'should_be_a_boolean' is "some_string" it fails because it should be a boolean. This is fine.

However, when 'should_be_a_boolean' is "true" or "false" then I would like it to also fails but it does not.

Is there a way to prevent this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions