Skip to content

Is openapi_core compatible with falcon 3.0.0? #311

Closed
@igorkaplan

Description

@igorkaplan

I am getting the error while using openapi_core with falcon as middleware. All requests without body give error code 400 and following error message:
{'title': 'Invalid JSON', 'description': 'Could not parse an empty JSON body'}
Looks like fixing the following code fixes this error:
https://github.com/p1c2u/openapi-core/blob/master/openapi_core/contrib/falcon/requests.py#26
body = (
dumps(request.json) if getattr(request, "json", None)

  •        else dumps(request.media)                                                                                    
    
  •        else dumps(request.get_media({}))
    

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/contribIndicates an issue on contrib area.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions