Skip to content

Remove validation logic for duplicate route paths in rest library #984

Description

@daviwil

When you have two operations in a Cadl file which result in the same route path, the rest library raises a duplicate-operation diagnostic (Playground):

import "@cadl-lang/rest";

op fooOne(): { age: int32 };
op fooOnePrime(): { name: string; };

@johanste correctly pointed out to me that in the case of a route path which might have multiple request/response pairs (an overloaded operation), this diagnostic is undesired. It seems we should depend on the emitters to decide whether they support duplicate route paths and raise their own diagnostics in that case.

It is possible for us to update the openapi3 and autorest emitters to support this, so we should consider removing the restriction and adding emitter support for operation overloads like this.

Metadata

Metadata

Assignees

Labels

design:neededA design request has been raised that needs a proposal

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions