Title: Support of recursive and circular references · Issue #466 · openapi-generators/openapi-python-client · GitHub
Open Graph Title: Support of recursive and circular references · Issue #466 · openapi-generators/openapi-python-client
X Title: Support of recursive and circular references · Issue #466 · openapi-generators/openapi-python-client
Description: Is your feature request related to a problem? Please describe. References to schemas that have not been processed yet are not supported now. See the example. Describe the solution you'd like I suggest to add models that are referenced wi...
Open Graph Description: Is your feature request related to a problem? Please describe. References to schemas that have not been processed yet are not supported now. See the example. Describe the solution you'd like I sugg...
X Description: Is your feature request related to a problem? Please describe. References to schemas that have not been processed yet are not supported now. See the example. Describe the solution you'd like I ...
Opengraph URL: https://github.com/openapi-generators/openapi-python-client/issues/466
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Support of recursive and circular references","articleBody":"**Is your feature request related to a problem? Please describe.**\r\nReferences to schemas that have not been processed yet are not supported now. See the example.\r\n\r\n**Describe the solution you'd like**\r\n I suggest to add models that are referenced without properties. And fill in the properties later. This adds the ability to refer to schemas that have not been processed yet.\r\n\r\n**Describe alternatives you've considered**\r\nAlso it may also be easier to create all models without properties first, then add properties with second pass.\r\n\r\n**Additional context**\r\nExample OpenAPI:\r\n```yaml\r\nopenapi: 3.0.3\r\ninfo:\r\n title: 'Example'\r\n version: 0.1.0\r\nservers:\r\n - url: 'http://example.com'\r\npaths:\r\n '/foo':\r\n delete:\r\n responses:\r\n '200':\r\n description: OK\r\ncomponents:\r\n schemas:\r\n Brother:\r\n type: object\r\n properties:\r\n sister:\r\n $ref: '#/components/schemas/Sister'\r\n Sister:\r\n type: object\r\n properties:\r\n brother:\r\n $ref: '#/components/schemas/Brother'\r\n```\r\nGenerator produces warnings and models package is empty.\r\n```bash\r\nCould not find reference in parsed models or enums\r\nReference(ref='#/components/schemas/Sister')\r\n\r\nCould not find reference in parsed models or enums\r\nReference(ref='#/components/schemas/Brother')\r\n```\r\n\r\nI expect the generated models for `Brother` and `Sister`. Something like:\r\n```python\r\n# models/brother.py\r\nclass Brother:\r\n sister: Union[Unset, Sister] = UNSET\r\n\r\n# models/sister.py\r\nclass Sister:\r\n brother: Union[Unset, Brother] = UNSET\r\n```\r\n","author":{"url":"https://github.com/mtovts","@type":"Person","name":"mtovts"},"datePublished":"2021-08-13T08:30:26.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":11},"url":"https://github.com/466/openapi-python-client/issues/466"}
| 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:0f15abbe-478c-3d48-1cf2-551dca29b244 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B46E:104A8D:BF4EF:1090AD:6981BCDD |
| html-safe-nonce | 5f2af487014f937a762c3b53b7fefc673173127c8aad02ffb22e7b13b7bc2889 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNDZFOjEwNEE4RDpCRjRFRjoxMDkwQUQ6Njk4MUJDREQiLCJ2aXNpdG9yX2lkIjoiMzM5Mjc1ODM2NjAxNTE1MjI5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 985c2cce7fc700def6feb60bb67aa6cf69ca27d4d2d813c6cb485e4d8d23c05a |
| hovercard-subject-tag | issue:970182076 |
| 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/466/issue_layout |
| twitter:image | https://opengraph.githubassets.com/cdd9618939f2b5d7d20651821aeb44720a9d8d99ee204fde588fccfcb2340b31/openapi-generators/openapi-python-client/issues/466 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/cdd9618939f2b5d7d20651821aeb44720a9d8d99ee204fde588fccfcb2340b31/openapi-generators/openapi-python-client/issues/466 |
| og:image:alt | Is your feature request related to a problem? Please describe. References to schemas that have not been processed yet are not supported now. See the example. Describe the solution you'd like I sugg... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | mtovts |
| hostname | github.com |
| expected-hostname | github.com |
| None | e137814e266030874fd2c86863529d0622b13889eeda04148c57654b6ea84ad6 |
| 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 | dd58d68a7813bbec9c91422c8c35f4af33832d70 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width