Title: Add support for plain text request body · Issue #542 · openapi-generators/openapi-python-client · GitHub
Open Graph Title: Add support for plain text request body · Issue #542 · openapi-generators/openapi-python-client
X Title: Add support for plain text request body · Issue #542 · openapi-generators/openapi-python-client
Description: Is your feature request related to a problem? Please describe. It should be possible to have endpoint with a full plain text request body like /dummy: post: requestBody: description: (to be documented) content: text/plain: schema: type: ...
Open Graph Description: Is your feature request related to a problem? Please describe. It should be possible to have endpoint with a full plain text request body like /dummy: post: requestBody: description: (to be documen...
X Description: Is your feature request related to a problem? Please describe. It should be possible to have endpoint with a full plain text request body like /dummy: post: requestBody: description: (to be documen...
Opengraph URL: https://github.com/openapi-generators/openapi-python-client/issues/542
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Add support for plain text request body","articleBody":"**Is your feature request related to a problem? Please describe.**\r\nIt should be possible to have endpoint with a full plain text request body like\r\n```\r\n /dummy:\r\n post:\r\n requestBody:\r\n description: (to be documented)\r\n content:\r\n text/plain:\r\n schema:\r\n type: string\r\n required: true\r\n```\r\nToday it is completely ignored\r\n\r\n**Describe the solution you'd like**\r\nIn openapi._add_body() we should have a additional line\r\n```\r\n text_body, schemas = Endpoint.parse_request_text_body(\r\n body=data.requestBody, schemas=schemas, parent_name=endpoint.name, config=config\r\n )\r\n```\r\nAnd\r\n```\r\n @staticmethod\r\n def parse_request_text_body(\r\n *, body: oai.RequestBody, schemas: Schemas, parent_name: str, config: Config\r\n ) -\u003e Tuple[Union[Property, PropertyError, None], Schemas]:\r\n \"\"\"Return text_body\"\"\"\r\n body_content = body.content\r\n text_body = body_content.get(\"text/plain\")\r\n if text_body is not None and text_body.media_type_schema is not None:\r\n return property_from_data(\r\n name=\"text_body\",\r\n required=True,\r\n data=text_body.media_type_schema,\r\n schemas=schemas,\r\n parent_name=parent_name,\r\n config=config,\r\n )\r\n return None, schemas\r\n```\r\n**Describe alternatives you've considered**\r\n \r\n\r\n**Additional context**\r\n","author":{"url":"https://github.com/kairntech","@type":"Person","name":"kairntech"},"datePublished":"2021-12-03T14:28:26.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/542/openapi-python-client/issues/542"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:8ebbc6fc-9573-1591-4982-06599ea0d5aa |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8830:335FF6:AD176E5:DFB7939:697F28CF |
| html-safe-nonce | 3cf8b5a7da66539a20778090768f4c759a1851d33f91bd2f298c7f4c636da42d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4ODMwOjMzNUZGNjpBRDE3NkU1OkRGQjc5Mzk6Njk3RjI4Q0YiLCJ2aXNpdG9yX2lkIjoiNDA4MjY0MDEzMDU4ODc0Nzk4MyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 1629d0dceab5bb44d048e03611528e983824d9aa42180526c3c28d5b88c891c8 |
| hovercard-subject-tag | issue:1070647553 |
| github-keyboard-shortcuts | repository,issues,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/issues/show/openapi-generators/openapi-python-client/542/issue_layout |
| twitter:image | https://opengraph.githubassets.com/dacd82b7d40396e8969f2e0e6394923810cf8b51228d15ded1091774dfd857b3/openapi-generators/openapi-python-client/issues/542 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/dacd82b7d40396e8969f2e0e6394923810cf8b51228d15ded1091774dfd857b3/openapi-generators/openapi-python-client/issues/542 |
| og:image:alt | Is your feature request related to a problem? Please describe. It should be possible to have endpoint with a full plain text request body like /dummy: post: requestBody: description: (to be documen... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | kairntech |
| hostname | github.com |
| expected-hostname | github.com |
| None | 60279d4097367e16897439d16d6bbe4180663db828c666eeed2656988ffe59f6 |
| turbo-cache-control | no-preview |
| go-import | github.com/openapi-generators/openapi-python-client git https://github.com/openapi-generators/openapi-python-client.git |
| octolytics-dimension-user_id | 84925606 |
| octolytics-dimension-user_login | openapi-generators |
| octolytics-dimension-repository_id | 240776275 |
| octolytics-dimension-repository_nwo | openapi-generators/openapi-python-client |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 240776275 |
| octolytics-dimension-repository_network_root_nwo | openapi-generators/openapi-python-client |
| 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 | 7c85641c598ad130c74f7bcc27f58575cac69551 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width