Title: Support references to non-object types · Issue #371 · openapi-generators/openapi-python-client · GitHub
Open Graph Title: Support references to non-object types · Issue #371 · openapi-generators/openapi-python-client
X Title: Support references to non-object types · Issue #371 · openapi-generators/openapi-python-client
Description: Describe the bug root component schemas do not get parsed correctly, resolved to None To Reproduce Steps to reproduce the behavior: openapi-python-client generate --path path_to_test.yaml Expected behavior The generated model Link should...
Open Graph Description: Describe the bug root component schemas do not get parsed correctly, resolved to None To Reproduce Steps to reproduce the behavior: openapi-python-client generate --path path_to_test.yaml Expected ...
X Description: Describe the bug root component schemas do not get parsed correctly, resolved to None To Reproduce Steps to reproduce the behavior: openapi-python-client generate --path path_to_test.yaml Expected ...
Opengraph URL: https://github.com/openapi-generators/openapi-python-client/issues/371
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Support references to non-object types","articleBody":"**Describe the bug**\r\nroot component schemas do not get parsed correctly, resolved to None\r\n\r\n**To Reproduce**\r\nSteps to reproduce the behavior:\r\n`openapi-python-client generate --path path_to_test.yaml`\r\n\r\n**Expected behavior**\r\nThe generated model Link should have `href: Union[Unset, str] = UNSET` as attribute\r\ninstead we have `href: Union[Unset, None] = UNSET`\r\n\r\n**OpenAPI Spec File**\r\n```\r\nopenapi: 3.0.0\r\n\r\ninfo:\r\n version: '1'\r\n title: 'test file'\r\n description: 'description'\r\n\r\npaths: {}\r\n\r\ncomponents:\r\n schemas:\r\n Link:\r\n type: object\r\n properties:\r\n href:\r\n Uri:\r\n type: string\r\n```\r\n\r\n**Desktop (please complete the following information):**\r\n - OS: Ubuntu 20.04\r\n - Python Version: 3.8.5\r\n - openapi-python-client version: up to date with main\r\n\r\n**Additional context**\r\n\r\nI am trying to build a 5g stack with the open source 5g api. This file in particular contains a lot of components schemas that get resolved to None\r\n\r\nhttps://github.com/jdegre/5GC_APIs/blob/master/TS29571_CommonData.yaml\r\n\r\nFor example the `Uri` components is translated to \r\n```\r\n@attr.s(auto_attribs=True)\r\nclass Uri:\r\n \"\"\" \"\"\"\r\n\r\n additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)\r\n```\r\nwhich does not seem right as it is only a `type:string` component\r\n","author":{"url":"https://github.com/p1-alexandrevaney","@type":"Person","name":"p1-alexandrevaney"},"datePublished":"2021-03-31T12:24:54.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/371/openapi-python-client/issues/371"}
| 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:1715208d-de83-c080-f728-d3ac7cf8be34 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 93A0:37FA71:3ECEC4A:50DF368:69802DB9 |
| html-safe-nonce | 766d2c512bd566726d15c888f94ad6ceee381758daa4aa7a374437ac2cd877b0 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5M0EwOjM3RkE3MTozRUNFQzRBOjUwREYzNjg6Njk4MDJEQjkiLCJ2aXNpdG9yX2lkIjoiMjIwNjg2MTI2MzM5OTU2MjY4MSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 47bb9dfc31cf20decdb070d8a446f6fb5c0d96bafa39dfa3b951a2dbb989a80e |
| hovercard-subject-tag | issue:846564363 |
| 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/371/issue_layout |
| twitter:image | https://opengraph.githubassets.com/3909bf8550584aaddd689756b9491b6211913fd4ee40dd926df8b5334c6d6ea9/openapi-generators/openapi-python-client/issues/371 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/3909bf8550584aaddd689756b9491b6211913fd4ee40dd926df8b5334c6d6ea9/openapi-generators/openapi-python-client/issues/371 |
| og:image:alt | Describe the bug root component schemas do not get parsed correctly, resolved to None To Reproduce Steps to reproduce the behavior: openapi-python-client generate --path path_to_test.yaml Expected ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | p1-alexandrevaney |
| 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