fastapi
fastapi copied to clipboard
Generate unique operation id with multiple methods (Fixes #4740)
When providing multiple methods on a single route, the same operation id is generated on routes for each methods, using the first method in the list.
This PR adds a different route for each method, ensuring the proper method name is used for generating the operation id.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Comparison is base (
cf73051
) 100.00% compared to head (fbe1b2e
) 100.00%. Report is 1038 commits behind head on master.
:exclamation: Current head fbe1b2e differs from pull request most recent head ecc913a. Consider uploading reports for the commit ecc913a to get more accurate results
Additional details and impacted files
@@ Coverage Diff @@
## master #4851 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 540 540
Lines 13969 13962 -7
=========================================
- Hits 13969 13962 -7
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
📝 Docs preview for commit 86dcc65f3a81d3c46e93e086dc263f6ec4510a37 at: https://626fe66ba152cf4199375d66--fastapi.netlify.app
📝 Docs preview for commit adb93a7dd2e63f273b6bd9beec8131f5c1bee03d at: https://626fe85427fc404c2b356063--fastapi.netlify.app
📝 Docs preview for commit fbe1b2e8d802e8178aa7096decc0c61aa2086469 at: https://631e525fb9acb87b275ae2d7--fastapi.netlify.app
📝 Docs preview for commit ecc913ad090d88b907c5254f7be367a99df43363 at: https://639cd642712b181a594d7c61--fastapi.netlify.app
@bruchar1 I pulled this in locally to work with an @router.api_route
decorator and it works perfectly! Thanks for the fix!