You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I hacked together the code below so that I could test this library in isolation, but for context we are using it inside of a Pyramid app. When I run the case below, I get the following exception:
openapi_core.validation.response.exceptions.InvalidData: InvalidData: Value b'<pdf_content>' not valid for schema of type string: (<ValidationError: "b'<pdf_content>' is not of type 'string'">,)
If I then try to wrap it inside of a str(), I get is not of type 'binary' so I believe there is an issue with the formatter understanding the bytes as a string.
Expected Behavior
If I return a binary object (pdf file) it should pass validation.
Actual Behavior
I hacked together the code below so that I could test this library in isolation, but for context we are using it inside of a Pyramid app. When I run the case below, I get the following exception:
If I then try to wrap it inside of a
str()
, I getis not of type 'binary'
so I believe there is an issue with the formatter understanding the bytes as a string.Expected Behavior
If I return a binary object (pdf file) it should pass validation.
Steps to Reproduce
OpenAPI Core Version
0.19.1
OpenAPI Core Integration
Natively using openapi-core
Affected Area(s)
Validation
References
No response
Anything else we need to know?
No response
Would you like to implement a fix?
None
The text was updated successfully, but these errors were encountered: