Skip to content
\n
\n \n\n \n \n \n \n
def body(self) -> Optional[bytes]: ...
\n
\n
\n

\n

the type of the BaseRequest.body property is defined as Optional[bytes]; however, the docstring of the Request protocol (which inherits body from BaseRequest) says:

\n
\n
    body\n       The request body, as string.\n
\n
\n

I'm currently having some issue with the validation, but it's not clear which direction should I go with the solution -- should body be bytes or str? Have I missed something? Thank you!

","upvoteCount":1,"answerCount":2,"acceptedAnswer":{"@type":"Answer","text":"

Hi @berislavlopac

\n

that's definitely an issue with doctoring,Optional[bytes] is expected there

","upvoteCount":1,"url":"https://github.com/python-openapi/openapi-core/discussions/824#discussioncomment-9035097"}}}
Discussion options

You must be logged in to vote

Hi @berislavlopac

that's definitely an issue with doctoring,Optional[bytes] is expected there

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by berislavlopac
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants