Title: Confusion with the Request.body type · python-openapi/openapi-core · Discussion #824 · GitHub
Open Graph Title: Confusion with the Request.body type · python-openapi/openapi-core · Discussion #824
X Title: Confusion with the Request.body type · python-openapi/openapi-core · Discussion #824
Description: Confusion with the Request.body type
Open Graph Description: On this line: openapi-core/openapi_core/protocols.py Line 20 in 44b8b3c def body(self) -> Optional[bytes]: ... the type of the BaseRequest.body property is defined as Optional[bytes]; however, the ...
X Description: On this line: openapi-core/openapi_core/protocols.py Line 20 in 44b8b3c def body(self) -> Optional[bytes]: ... the type of the BaseRequest.body property is defined as Optional[bytes]; however, t...
Opengraph URL: https://github.com/python-openapi/openapi-core/discussions/824
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"QAPage","mainEntity":{"@type":"Question","name":"Confusion with the Request.body type","text":"On this line:
\n \n \n openapi-core/openapi_core/protocols.py\n
\n \n Line 20\n in\n 44b8b3c\n
\n \n \n \n\n \n \n def body(self) -> Optional[bytes]: ... \n \n
\n \n\n\nthe 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
\nI'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":"\nthat'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"}}}
| route-pattern | /_view_fragments/Voltron::DiscussionsFragmentsController/show/:user_id/:repository/:discussion_number/discussion_layout(.:format) |
| route-controller | voltron_discussions_fragments |
| route-action | discussion_layout |
| fetch-nonce | v2:b7fda935-5011-c7b9-985d-582e1f427154 |
| current-catalog-service-hash | 9f0abe34da433c9b6db74bffa2466494a717b579a96b30a5d252e5090baea7be |
| request-id | 9162:3BE04B:27DBCC8:378609A:6977A649 |
| html-safe-nonce | 974e9dcc8d3a37f6fc682623f89e9cc7aed6637a40a870d43877d17331770b1f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MTYyOjNCRTA0QjoyN0RCQ0M4OjM3ODYwOUE6Njk3N0E2NDkiLCJ2aXNpdG9yX2lkIjoiNjU5ODI2Mjk2OTIxNDk5MjA5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | d0062ed9b803061f20afacff454a7423eabd8329f4df3b3eedcf4cede3f48259 |
| hovercard-subject-tag | discussion:6468423 |
| github-keyboard-shortcuts | repository,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/Voltron::DiscussionsFragmentsController/show/python-openapi/openapi-core/824/discussion_layout |
| twitter:image | https://opengraph.githubassets.com/42c287518598ddfe18bdc25a0adfd6f5b94692de95ddff47b2112db12f30cede/python-openapi/openapi-core/discussions/824 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/42c287518598ddfe18bdc25a0adfd6f5b94692de95ddff47b2112db12f30cede/python-openapi/openapi-core/discussions/824 |
| og:image:alt | On this line: openapi-core/openapi_core/protocols.py Line 20 in 44b8b3c def body(self) -> Optional[bytes]: ... the type of the BaseRequest.body property is defined as Optional[bytes]; however, the ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | e8b91803a5fc7ac066710509c57c636dab6ed4620bd9213b470a4617c79989c9 |
| turbo-cache-control | no-preview |
| go-import | github.com/python-openapi/openapi-core git https://github.com/python-openapi/openapi-core.git |
| octolytics-dimension-user_id | 126442889 |
| octolytics-dimension-user_login | python-openapi |
| octolytics-dimension-repository_id | 104200746 |
| octolytics-dimension-repository_nwo | python-openapi/openapi-core |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 104200746 |
| octolytics-dimension-repository_network_root_nwo | python-openapi/openapi-core |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 9b4562e3c5c60b38349a7d80ec8e160c11fe84b6 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width