Title: [Bug]: Schemas in query parameters don't work · Issue #1022 · python-openapi/openapi-core · GitHub
Open Graph Title: [Bug]: Schemas in query parameters don't work · Issue #1022 · python-openapi/openapi-core
X Title: [Bug]: Schemas in query parameters don't work · Issue #1022 · python-openapi/openapi-core
Description: Actual Behavior Query parameters with schemas are ignored when Unmarshalling Expected Behavior Query parameters matching a query parameter with a schema should be included in Unmarshall results. Steps to Reproduce Schema: openapi: 3.1.0 ...
Open Graph Description: Actual Behavior Query parameters with schemas are ignored when Unmarshalling Expected Behavior Query parameters matching a query parameter with a schema should be included in Unmarshall results. St...
X Description: Actual Behavior Query parameters with schemas are ignored when Unmarshalling Expected Behavior Query parameters matching a query parameter with a schema should be included in Unmarshall results. St...
Opengraph URL: https://github.com/python-openapi/openapi-core/issues/1022
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Bug]: Schemas in query parameters don't work","articleBody":"### Actual Behavior\n\nQuery parameters with schemas are ignored when Unmarshalling \n\n### Expected Behavior\n\nQuery parameters matching a query parameter with a schema should be included in Unmarshall results.\n\n### Steps to Reproduce\n\nSchema:\n```yaml\nopenapi: 3.1.0\ninfo:\n title: Example\n version: \"0.0\"\nservers:\n - url: 'http://example.com'\npaths:\n /:\n get:\n parameters:\n - name: tag.{name}\n in: query\n schema:\n type: object\n patternProperties:\n '^tag\\.[A-Za-z0-9]+$':\n type: string\n pattern: '^[A-Za-z0-9]+$'\n additionalProperties: false\n - name: baz\n in: query\n schema:\n type: string\n```\n\nPython script:\n```python\nfrom openapi_core import OpenAPI\nfrom openapi_core.contrib.requests import RequestsOpenAPIRequest\nfrom requests import Request\nimport re\n\noas = OpenAPI.from_file_path('./exampleOas.yaml')\nreq = oas.unmarshal_request(RequestsOpenAPIRequest(Request(\n \"GET\",\n \"http://example.com/\",\n params={\"tag.foo\": \"bar\", \"baz\": \"bat\"})))\n\nprint(req)\n# Returns\n# RequestUnmarshalResult(errors=[], body=None, parameters=Parameters(query={'baz': 'bat'}, header={}, cookie={}, path={}), security={})\n\n# Prove the regex works\nprint(re.search(r\"^tag\\.[A-Za-z0-9]+$\", \"tag.foo\"))\n# Returns\n# \u003cre.Match object; span=(0, 7), match='tag.foo'\u003e\n```\n\n### OpenAPI Core Version\n\n0.19.5\n\n### OpenAPI Core Integration\n\nrequests\n\n### Affected Area(s)\n\nunmarshalling \n\n### References\n\nSuch a pattern is described [here](https://github.com/OAI/OpenAPI-Specification/issues/2622#issuecomment-863916567) and I've had confirmation on the OpenAPI slack [here](https://open-api.slack.com/archives/C0EDH2QKD/p1755211848023869?thread_ts=1754309646.541589\u0026cid=C0EDH2QKD) that this is the current best approach to describing pattern-based query parameter names.\n\nThis may be related to https://github.com/python-openapi/openapi-core/issues/250 but isn't completely related as it should work with the query default style of `form`.\n\n[Example of the use case](https://bbc.github.io/tams/main/index.html#/operations/GET_flows#Query-Parameters) I have for this.\n\n### Anything else we need to know?\n\n_No response_\n\n### Would you like to implement a fix?\n\nNone","author":{"url":"https://github.com/j616","@type":"Person","name":"j616"},"datePublished":"2025-08-21T14:49:54.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":7},"url":"https://github.com/1022/openapi-core/issues/1022"}
| 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:31041d2b-1047-435c-0998-ae15e83306b2 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | EE38:AB4C6:21CA00D:2ED85D3:6977958D |
| html-safe-nonce | 972e02968167dee872805e730891279c221588281f35e5d50c9a3f61d9e83bab |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFRTM4OkFCNEM2OjIxQ0EwMEQ6MkVEODVEMzo2OTc3OTU4RCIsInZpc2l0b3JfaWQiOiIyNjI3MTI4MzcwMjcyOTAwNDkzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 0136d77a36ea1a069650867de0ff74e56aa30faece08d0efd8c28af6c9c59bfc |
| hovercard-subject-tag | issue:3342053489 |
| 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/python-openapi/openapi-core/1022/issue_layout |
| twitter:image | https://opengraph.githubassets.com/428eefbbbebfdbcd08d48b5f80690279b6913fcc90b9e670763c8811d669caf8/python-openapi/openapi-core/issues/1022 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/428eefbbbebfdbcd08d48b5f80690279b6913fcc90b9e670763c8811d669caf8/python-openapi/openapi-core/issues/1022 |
| og:image:alt | Actual Behavior Query parameters with schemas are ignored when Unmarshalling Expected Behavior Query parameters matching a query parameter with a schema should be included in Unmarshall results. St... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | j616 |
| hostname | github.com |
| expected-hostname | github.com |
| None | fc421f20017e1c727052b30a42d36825c29cf12a25e3e3589a184309309fc08a |
| turbo-cache-control | no-preview |
| go-import | github.com/python-openapi/openapi-core git https://github.com/python-openapi/openapi-core.git |
| octolytics-dimension-user_id | 126442889 |
| octolytics-dimension-user_login | python-openapi |
| octolytics-dimension-repository_id | 104200746 |
| octolytics-dimension-repository_nwo | python-openapi/openapi-core |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 104200746 |
| octolytics-dimension-repository_network_root_nwo | python-openapi/openapi-core |
| 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 | 82eac957e166000cbcf5a2f4595b013b0f5a51aa |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width