Title: [Bug]: PathNotFound exception if templated path parameter contains "-" character · Issue #672 · python-openapi/openapi-core · GitHub
Open Graph Title: [Bug]: PathNotFound exception if templated path parameter contains "-" character · Issue #672 · python-openapi/openapi-core
X Title: [Bug]: PathNotFound exception if templated path parameter contains "-" character · Issue #672 · python-openapi/openapi-core
Description: Actual Behavior when trying to validate my request, I encountered an error: ..\venv\Lib\site-packages\openapi_core\templating\paths\finders.py:35: PathNotFound seems to be a problem with the search function from openapi_core.templating.u...
Open Graph Description: Actual Behavior when trying to validate my request, I encountered an error: ..\venv\Lib\site-packages\openapi_core\templating\paths\finders.py:35: PathNotFound seems to be a problem with the search...
X Description: Actual Behavior when trying to validate my request, I encountered an error: ..\venv\Lib\site-packages\openapi_core\templating\paths\finders.py:35: PathNotFound seems to be a problem with the search...
Opengraph URL: https://github.com/python-openapi/openapi-core/issues/672
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Bug]: PathNotFound exception if templated path parameter contains \"-\" character","articleBody":"### Actual Behavior\n\nwhen trying to validate my request, I encountered an error:\r\n`..\\venv\\Lib\\site-packages\\openapi_core\\templating\\paths\\finders.py:35: PathNotFound`\r\n\r\nseems to be a problem with the `search` function from `openapi_core.templating.util`\n\n### Expected Behavior\n\n`print(search(path_pattern_fail, name)) # \u003cResult () {'user-id': '1647222638'}\u003e`\n\n### Steps to Reproduce\n\n```\r\nfrom openapi_core.templating.util import search\r\n\r\npath_pattern_pass = '/local/sub/{user_id}/duration'\r\npath_pattern_fail = '/local/sub/{user-id}/duration'\r\nname = 'https://dummy_server.com/local/sub/1647222638/duration'\r\n\r\nprint(search(path_pattern_pass, name)) # \u003cResult () {'user_id': '1647222638'}\u003e\r\nprint(search(path_pattern_fail, name)) # None\r\n```\n\n### OpenAPI Core Version\n\n0.18.1\n\n### OpenAPI Core Integration\n\nRequests\n\n### Affected Area(s)\n\n_No response_\n\n### References\n\n_No response_\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/balchugovg","@type":"Person","name":"balchugovg"},"datePublished":"2023-09-20T00:44:24.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/672/openapi-core/issues/672"}
| 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:0df2aaec-cff8-f7a4-4432-c22114b932c2 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D4FA:272E5B:F15D76:14C32CE:69776ACD |
| html-safe-nonce | 3c5c352da35bc967c190b09bfe3639f6cca04a3cc094973d077caa0f3bde0ca9 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENEZBOjI3MkU1QjpGMTVENzY6MTRDMzJDRTo2OTc3NkFDRCIsInZpc2l0b3JfaWQiOiIxODExMzg3NzI3MTE5NjA4NTI1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | b84d6a38385503b3a1b7a8d2865261f4c17c06d233bb763b2d49d877903f12a2 |
| hovercard-subject-tag | issue:1903902596 |
| 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/672/issue_layout |
| twitter:image | https://opengraph.githubassets.com/e90a191f3f6d4a8a0586ed79c2c43a2000c2c511792a9575c2932cb7247c97b1/python-openapi/openapi-core/issues/672 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/e90a191f3f6d4a8a0586ed79c2c43a2000c2c511792a9575c2932cb7247c97b1/python-openapi/openapi-core/issues/672 |
| og:image:alt | Actual Behavior when trying to validate my request, I encountered an error: ..\venv\Lib\site-packages\openapi_core\templating\paths\finders.py:35: PathNotFound seems to be a problem with the search... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | balchugovg |
| hostname | github.com |
| expected-hostname | github.com |
| None | 425384cc392ce2ddd1a7a0c1e7043ab4192d4c04452a2ed7f2f38d2fa9293b5a |
| 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 | 72de26f7ca9bdb0559ebf1e63e6c685ee2c520ce |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width