Title: Support `allOf` of compatible types · Issue #379 · openapi-generators/openapi-python-client · GitHub
Open Graph Title: Support `allOf` of compatible types · Issue #379 · openapi-generators/openapi-python-client
X Title: Support `allOf` of compatible types · Issue #379 · openapi-generators/openapi-python-client
Description: Is your feature request related to a problem? Please describe. Currently, allOf requires all schemas in the list to have the same type, and to have the same properties (besides nullable and required). However, we have a number of instanc...
Open Graph Description: Is your feature request related to a problem? Please describe. Currently, allOf requires all schemas in the list to have the same type, and to have the same properties (besides nullable and require...
X Description: Is your feature request related to a problem? Please describe. Currently, allOf requires all schemas in the list to have the same type, and to have the same properties (besides nullable and require...
Opengraph URL: https://github.com/openapi-generators/openapi-python-client/issues/379
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Support `allOf` of compatible types","articleBody":"**Is your feature request related to a problem? Please describe.**\r\nCurrently, `allOf` requires all schemas in the list to have the same `type`, and to have the same properties (besides `nullable` and `required`). However, we have a number of instances of schema inheritance, where we are using an enum key to distinguish the subclasses. For example:\r\n\r\n```\r\n Parent:\r\n additionalProperties: false\r\n properties:\r\n type:\r\n type: string\r\n Child1:\r\n additionalProperties: false\r\n\t allOf:\r\n\t\t- $ref: \"#/components/schemas/Parent\"\r\n - type: object\r\n properties:\r\n\t type:\r\n\t type: string\r\n\t\t\t enum:\r\n\t \t\t - child1\r\n Child1:\r\n additionalProperties: false\r\n\t allOf:\r\n\t\t- $ref: \"#/components/schemas/Parent\"\r\n - type: object\r\n properties:\r\n\t type:\r\n\t type: string\r\n\t\t\t enum:\r\n\t \t\t - child1\r\n```\r\n\r\n**Describe the solution you'd like**\r\nWe would like `allOf` to be able to combine two enums, or a string and an enum, and take the more restrictive type.\r\n\r\n**Describe alternatives you've considered**\r\nWe could refactor out another schema, which consists of everything in `Parent` besides the `type`.\r\n\r\n**Additional context**\r\n","author":{"url":"https://github.com/forest-benchling","@type":"Person","name":"forest-benchling"},"datePublished":"2021-04-07T13:42:04.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/379/openapi-python-client/issues/379"}
| 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:3449ac9a-dcc5-6384-ebf3-dfdaa71a931a |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B8C8:108B01:2082214:2B5E11A:698161A4 |
| html-safe-nonce | a5cbffe606aada8b3d6f8c423f55b40348861d4ed9faff0192285adba90bba61 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCOEM4OjEwOEIwMToyMDgyMjE0OjJCNUUxMUE6Njk4MTYxQTQiLCJ2aXNpdG9yX2lkIjoiNTcwNzUyMjQzMTU3MzM4NTYzNiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | b70f0ec922ad5889c7f83c84c7e8eb720e92f9873efadeff49104d90abfa12f7 |
| hovercard-subject-tag | issue:852423113 |
| 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/379/issue_layout |
| twitter:image | https://opengraph.githubassets.com/da83e1f070137a0160f1fb771540ed97760d7b87c6699add729620eb723404df/openapi-generators/openapi-python-client/issues/379 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/da83e1f070137a0160f1fb771540ed97760d7b87c6699add729620eb723404df/openapi-generators/openapi-python-client/issues/379 |
| og:image:alt | Is your feature request related to a problem? Please describe. Currently, allOf requires all schemas in the list to have the same type, and to have the same properties (besides nullable and require... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | forest-benchling |
| 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