Title: Support for Free-Form Query Parameters · Issue #295 · openapi-generators/openapi-python-client · GitHub
Open Graph Title: Support for Free-Form Query Parameters · Issue #295 · openapi-generators/openapi-python-client
X Title: Support for Free-Form Query Parameters · Issue #295 · openapi-generators/openapi-python-client
Description: Is your feature request related to a problem? Please describe. Given an API that accepts arbitrarily-named query parameters like: /my-endpoint/?dynamic_param1=value&dynamic_param2=value2 We'd like to be able to append arbitrary key/value...
Open Graph Description: Is your feature request related to a problem? Please describe. Given an API that accepts arbitrarily-named query parameters like: /my-endpoint/?dynamic_param1=value&dynamic_param2=value2 We'd like ...
X Description: Is your feature request related to a problem? Please describe. Given an API that accepts arbitrarily-named query parameters like: /my-endpoint/?dynamic_param1=value&dynamic_param2=value2 We'...
Opengraph URL: https://github.com/openapi-generators/openapi-python-client/issues/295
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Support for Free-Form Query Parameters","articleBody":"**Is your feature request related to a problem? Please describe.**\r\n\r\nGiven an API that accepts arbitrarily-named query parameters like:\r\n\r\n/my-endpoint/?dynamic_param1=value\u0026dynamic_param2=value2\r\n\r\nWe'd like to be able to append arbitrary key/values to the query string search.\r\n\r\nGiven a current YAML snippet like:\r\n\r\n```yaml\r\n parameters:\r\n - in: query\r\n name: dynamicFields\r\n schema:\r\n type: object\r\n additionalProperties: true\r\n```\r\n\r\nThe parameter generated is `schema_field: Union[Unset, ModelNameSchemaField] = UNSET`, and it's also sent as the parameter named `schema_field` instead of using the arbitrary keys.\r\n\r\n**Describe the solution you'd like**\r\n\r\nGenerate the parameter above with `additionalProperties` as `schema_field: Union[Unset, None, Dict[str, Any]] = UNSET`. When `schema_field` is a `dict`, it will then send values for all keys in the query parameters instead of as `schema_field`.\r\n\r\nIf multiple parameters are defined having `additionalProperties`, it will treat all of them as arbitrary keys. If two parameters were to define the same dynamically named key, we make no guarantees about which one is sent. I imagine it would be the last parameter encountered with `additionalProperties`. Alternatively, we could raise an exception instead of making silent assumptions about the collision.\r\n\r\n**Describe alternatives you've considered**\r\n\r\nRather than modeling the field in Open API, allow every GET method to accept an `additional_properties: Dict[str, str]` parameter which would append all the keys as query parameters. The name `additional_properties` might need to be configurable to avoid collision with APIs using that parameter name already.\r\n","author":{"url":"https://github.com/bowenwr","@type":"Person","name":"bowenwr"},"datePublished":"2021-01-12T16:14:40.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":8},"url":"https://github.com/295/openapi-python-client/issues/295"}
| 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:33d5187e-b161-cfc7-389f-8ea4f7fd5a01 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E83A:F4C68:10C395A:15A6468:697F8588 |
| html-safe-nonce | 8a6b691396d9dc39563154fc0be465884109559f37a2cd8598e26be393eb357b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFODNBOkY0QzY4OjEwQzM5NUE6MTVBNjQ2ODo2OTdGODU4OCIsInZpc2l0b3JfaWQiOiIyMDk4ODAzODk3NzMxNjE0MDg4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 5026a2264719056759e624b23efb2d67b9390e88895f7bbce88184195f446ac6 |
| hovercard-subject-tag | issue:784378940 |
| 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/295/issue_layout |
| twitter:image | https://opengraph.githubassets.com/6068eb3eec438c6fbbffa987514673266735e71d2f6d0a109faecf346458d984/openapi-generators/openapi-python-client/issues/295 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/6068eb3eec438c6fbbffa987514673266735e71d2f6d0a109faecf346458d984/openapi-generators/openapi-python-client/issues/295 |
| og:image:alt | Is your feature request related to a problem? Please describe. Given an API that accepts arbitrarily-named query parameters like: /my-endpoint/?dynamic_param1=value&dynamic_param2=value2 We'd like ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | bowenwr |
| 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