Skip to content

[Bug]: Error desc not specifying what went wrong #711

@itsMGA

Description

@itsMGA

Actual Behavior

So i use:

from openapi_core import validate_request

To validate request data versus schema:

validate_request(request_data, self.spec)

Here's the snipped for request body:

 getRequest:
  type: object
  properties:
    type_of:
      type: string
    name:
      type: string

My request:
r = requests.post(url='host/something/v012/get', data={'type_of': 'user', 'name': 'test'})
The error message raised is:

E                   Request body validation error

Not sure what's wrong based on the error desc
Do you guys know a better way to see more exact error descriotion (what's wrong with the request data vs yaml?)

Openapi_core version 0.18.1

Expected Behavior

Exected to isolate or relate what was not ok from request data vs yaml schema

Steps to Reproduce

Not sure what is wrong with my request yet

OpenAPI Core Version

0.18.1

OpenAPI Core Integration

requests

Affected Area(s)

No response

References

No response

Anything else we need to know?

No response

Would you like to implement a fix?

None

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