Skip to content

[Bug]: openapi same name inner namespaces results in duplicate operationId #8511

@artsiommiksiuk

Description

@artsiommiksiuk

Describe the bug

When declaring operations in namespaces in hierarchies and having same namespace names, because openapi-emitter uses only one immediate parent namespace or interface, this results in underspecified operationId's generated in final OAS document.

I think for explicit operationId resolution, OAS emitter should see full namespaces chain and resolve whole path.

Reproduction

https://typespec.io/playground/?options=%7B%22linterRuleSet%22%3A%7B%22extends%22%3A%5B%22%40typespec%2Fhttp%2Fall%22%5D%7D%7D&e=%40typespec%2Fopenapi3&vs=%7B%7D&c=aW1wb3J0ICJAdHlwZXNwZWMvaHR0cCI7Cgp1c2luZyBIdHRwOwoKQHNlcnZpY2UoI3sgdGl0bGU6ICJTxhMiIH0pCm5hbWVzcGFjZSBPdXRlciB7CiAgb3AgdGVzdCgpOiB2b2lkOwoKICBAcm91dGUoImlubmVyIikKICDKOknEFMU61jzUPthA00LEFX0KxAR9Cgo%3D

Checklist

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions