Browse Source
When a route is defined with multiple HTTP methods (e.g., methods=['POST', 'DELETE']), the operation_id generation was only using the first method name, causing all methods to get the same operation_id suffix. This resulted in duplicate operation IDs in the OpenAPI schema and incorrect warnings. Changes: - Modified generate_unique_id() to accept an optional 'method' parameter - When a specific method is provided, it includes that method in the operation_id - Updated get_openapi_operation_metadata() in openapi/utils.py to pass the method - Each HTTP method now gets its own unique operation_id Fixes #13175pull/15245/head
2 changed files with 10 additions and 3 deletions
Loading…
Reference in new issue