Title: $ref in path parameters doesn't seem to work · Issue #605 · openapi-generators/openapi-python-client · GitHub
Open Graph Title: $ref in path parameters doesn't seem to work · Issue #605 · openapi-generators/openapi-python-client
X Title: $ref in path parameters doesn't seem to work · Issue #605 · openapi-generators/openapi-python-client
Description: Describe the bug If a get path has a parameter using $ref to point to #/components/parameters, the generated API lacks the corresponding kwarg. If one "hoists" the indirect parameter up into the path's parameters, it works as expected. T...
Open Graph Description: Describe the bug If a get path has a parameter using $ref to point to #/components/parameters, the generated API lacks the corresponding kwarg. If one "hoists" the indirect parameter up into the pa...
X Description: Describe the bug If a get path has a parameter using $ref to point to #/components/parameters, the generated API lacks the corresponding kwarg. If one "hoists" the indirect parameter up i...
Opengraph URL: https://github.com/openapi-generators/openapi-python-client/issues/605
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"$ref in path parameters doesn't seem to work","articleBody":"**Describe the bug**\r\nIf a `get` path has a parameter using `$ref` to point to `#/components/parameters`, the generated API lacks the corresponding `kwarg`. If one \"hoists\" the indirect parameter up into the path's `parameters`, it works as expected.\r\n\r\n**To Reproduce**\r\nSee [this repo](https://github.com/jrobbins-LiveData/openapi-ref-issue) for a reproducible example.\r\nAnd see [this repo](https://github.com/jrobbins-LiveData/openapi-noref/blob/main/test-schema.yaml) for the same schema without the `$ref`, working as expected.\r\n\r\n**Expected behavior**\r\nI expect to see the optional `page` `kwarg` in both generated APIs.\r\n\r\nI see this in the `$ref` example:\r\n\r\n```python\r\ndef sync(\r\n *,\r\n client: Client,\r\n) -\u003e Optional[List[str]]:\r\n```\r\n\r\nand this in the `noref` example:\r\n\r\n```python\r\ndef sync(\r\n *,\r\n client: Client,\r\n page: Union[Unset, None, GetTestPage] = UNSET,\r\n) -\u003e Optional[List[str]]:\r\n```\r\n\r\n**OpenAPI Spec File**\r\n[A link to your openapi.json which produces this issue.](https://github.com/jrobbins-LiveData/openapi-ref-issue/blob/main/test-schema.yaml)\r\n\r\n**Desktop (please complete the following information):**\r\n - OS: Microsoft Windows 10 Pro 10.0.19044 Build 19044\r\n - Python Version: 3.9.12\r\n - openapi-python-client version 0.11.1\r\n","author":{"url":"https://github.com/jrobbins-LiveData","@type":"Person","name":"jrobbins-LiveData"},"datePublished":"2022-04-30T20:56:37.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/605/openapi-python-client/issues/605"}
| 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:3d8c8def-8d98-59f0-ba5b-2191dbdc51a8 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A2C8:3A361F:57714E:71C9FE:697F73CA |
| html-safe-nonce | 38346a80af1df817558cd1e0d24a38c6a1f61faa4156bfe612d4fefd02d79739 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMkM4OjNBMzYxRjo1NzcxNEU6NzFDOUZFOjY5N0Y3M0NBIiwidmlzaXRvcl9pZCI6IjcyNDYzNDA0NTk4OTM1ODQ4NDIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | f9a85ef40c8d1d6bedd02e4b33d6a7bc11cde0890b0b0246b24b77f879379d0d |
| hovercard-subject-tag | issue:1221919524 |
| 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/605/issue_layout |
| twitter:image | https://opengraph.githubassets.com/7bfc602e9beb5d6deff37e437dc8e0ba57c47ee51de11a0dc28eb7e1fabe3f6c/openapi-generators/openapi-python-client/issues/605 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/7bfc602e9beb5d6deff37e437dc8e0ba57c47ee51de11a0dc28eb7e1fabe3f6c/openapi-generators/openapi-python-client/issues/605 |
| og:image:alt | Describe the bug If a get path has a parameter using $ref to point to #/components/parameters, the generated API lacks the corresponding kwarg. If one "hoists" the indirect parameter up into the pa... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | jrobbins-LiveData |
| 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