Skip to main content

duplicate_operation_ids

Function duplicate_operation_ids 

Source
pub fn duplicate_operation_ids(spec: &Value) -> Vec<(String, Vec<String>)>
Expand description

Every operationId in the document that is used by more than one operation, with the operations that share it ("METHOD /path"), sorted for stable output. Empty when the document is spec-valid.

OpenAPI requires operationIds to be unique across the whole document; client generators key their emitted method names off them, so a duplicate makes the generated client fail to compile. #[Controller] routes get a controller-qualified id by default, which keeps this empty by construction — duplicates now only arise from hand-written operation_id("…") values.

Exposed so an app can assert on it in a test (or a CI guard) instead of discovering the collision downstream in its generated client.