Browse Source

📝 Clarify multi-method operation_id note in docs

pull/15271/head
wwenrr 3 months ago
parent
commit
3f9f1fd648
  1. 6
      docs/en/docs/advanced/path-operation-advanced-configuration.md

6
docs/en/docs/advanced/path-operation-advanced-configuration.md

@ -18,11 +18,11 @@ You would have to make sure that it is unique for each operation.
If you register the same endpoint function for multiple HTTP methods with If you register the same endpoint function for multiple HTTP methods with
`api_route()` / `add_api_route(..., methods=[...])`, OpenAPI operation IDs can `api_route()` / `add_api_route(..., methods=[...])`, OpenAPI operation IDs can
conflict unless you set explicit unique `operation_id` values. still conflict.
If you need unique operation IDs in generated OpenAPI clients, prefer separate If you need unique operation IDs in generated OpenAPI clients, prefer separate
path operation decorators (for example `@app.get()` and `@app.post()`) or set path operation decorators (for example `@app.get()` and `@app.post()`) so each
an explicit `operation_id` per operation. operation can define its own `operation_id`.
/// ///

Loading…
Cancel
Save