Skip to content

[Bug]: Boolean type is not strict #998

Open
@afonsocraposo

Description

@afonsocraposo

Actual Behavior

I have this in my api spec:

"properties": {
	"active": {
		"type": "boolean"
	}
}

If in my request body I pass:

{
	"active": "invalid"
}

I get a CastError.

Expected Behavior

If in my request body I pass:

{
	"active": "invalid"
}

I get an InvalidSchemaValue because the field active is not of type boolean.

Steps to Reproduce

Have a field of type boolean. Pass a invalid string in the request body.

OpenAPI Core Version

0.19.5

OpenAPI Core Integration

django

Affected Area(s)

No response

References

No response

Anything else we need to know?

No response

Would you like to implement a fix?

No

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugIndicates an issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy