Title: Add support for recursively defined schemas · Issue #338 · openapi-generators/openapi-python-client · GitHub
Open Graph Title: Add support for recursively defined schemas · Issue #338 · openapi-generators/openapi-python-client
X Title: Add support for recursively defined schemas · Issue #338 · openapi-generators/openapi-python-client
Description: Describe the bug I tried to create a python client from an OpenApi-Spec with the command openapi-python-client generate --path secret_server_openapi3.json. Then I got multple warnings: invalid data in items of array settings Could not fi...
Open Graph Description: Describe the bug I tried to create a python client from an OpenApi-Spec with the command openapi-python-client generate --path secret_server_openapi3.json. Then I got multple warnings: invalid data...
X Description: Describe the bug I tried to create a python client from an OpenApi-Spec with the command openapi-python-client generate --path secret_server_openapi3.json. Then I got multple warnings: invalid data...
Opengraph URL: https://github.com/openapi-generators/openapi-python-client/issues/338
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Add support for recursively defined schemas","articleBody":"**Describe the bug**\r\nI tried to create a python client from an OpenApi-Spec with the command `openapi-python-client generate --path secret_server_openapi3.json`. Then I got multple warnings:\r\n- invalid data in items of array settings\r\n- Could not find reference in parsed models or enums\r\n- Cannot parse response for status code 200, response will be ommitted from generated client\r\nI searched the schemas, which are responsible for the errors and they all had in common, that they either reference another schema which is recursively defined or reference themself.\r\nFor example one of the problematic schemas:\r\n```\r\n{\r\n \"SecretDependencySetting\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"active\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Indicates the setting is active.\"\r\n },\r\n \"childSettings\": {\r\n \"type\": \"array\",\r\n \"description\": \"The Child Settings that would be used for list of options.\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/SecretDependencySetting\"\r\n }\r\n }\r\n },\r\n \"description\": \"Secret Dependency Settings - Mostly used internally\"\r\n }\r\n}\r\n```\r\n\r\n**To Reproduce**\r\nDefine a schema recursively and then try to create a client from it.\r\n\r\n**Expected behavior**\r\nThe software can also parse a recursively defined schema.\r\n\r\n**OpenAPI Spec File**\r\nIt's 66000 Lines, so I'm not sure if this will help you, or github will allow me to post it :smile: \r\nJust ask if you need specific parts of the spec, aside from what I already provided above.\r\n\r\n**Desktop (please complete the following information):**\r\n - OS: Linux Manjaro \r\n - Python Version: 3.9.1\r\n - openapi-python-client version 0.7.3\r\n","author":{"url":"https://github.com/sp-schoen","@type":"Person","name":"sp-schoen"},"datePublished":"2021-02-17T13:27:58.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":13},"url":"https://github.com/338/openapi-python-client/issues/338"}
| 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:e183978d-8971-76b0-bc02-8a4d6e4726c4 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | EA2A:68060:1AF053:254D20:6981D71F |
| html-safe-nonce | 0ef365da0fb2024ac5e01383f53c41d1306151cbb47af7002d4d8fd4a06b34d4 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQTJBOjY4MDYwOjFBRjA1MzoyNTREMjA6Njk4MUQ3MUYiLCJ2aXNpdG9yX2lkIjoiNDEwNTQxMjA2NzQxODMzNTAzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 59c7436004a409316bc1ba8e0f2311c46e505d050f3d018453b85f7a063af5df |
| hovercard-subject-tag | issue:810184260 |
| 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/338/issue_layout |
| twitter:image | https://opengraph.githubassets.com/81e6981317b5b5299c63ae5d3ed7e4dc9bfb7bde90802f909d0f0a37180ea823/openapi-generators/openapi-python-client/issues/338 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/81e6981317b5b5299c63ae5d3ed7e4dc9bfb7bde90802f909d0f0a37180ea823/openapi-generators/openapi-python-client/issues/338 |
| og:image:alt | Describe the bug I tried to create a python client from an OpenApi-Spec with the command openapi-python-client generate --path secret_server_openapi3.json. Then I got multple warnings: invalid data... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | sp-schoen |
| hostname | github.com |
| expected-hostname | github.com |
| None | ebfdf8d3e0fd17b103f41cc6696d84938694ebebdfecaf11fe00dbe4a9785801 |
| 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 | 471ae8701b77c1bf177c58019d2e6fd65ae89141 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width