Currently Tapir is rendering specs with duplicate operationId’s. According the OpenAPI specification this should not be allowed, they should be unique. I think spec generation should fail, right?
Reusing endpoint definitions and patching them is not uncommon (at least how I am using them).
I have a set of endpoints which I want to duplicate with some different paths/options. I can prefix the endpoint-paths easily by mapping a list of endpoints and call prependIn.
However, the operationId I cannot patch, only override. What if endpoint names (operation-ids) can be prefixed/suffixed/tweaked? Is it currently possible? Is there any reason why this cannot be implemented?
schemaName is not what I am looking for I think. That is how the schemas are named, this is purely about operationId’s. If the spec has duplicate operationId’s then e.g. my Zodios client generators fails to generator all of the endpoints, it silently drops the duplicates.
The EndpointVerifier test does also not catch duplicate operationId’s.
Is there a specific test in the repo for these operationId’s? Then I can perhaps fiddle a bit with that to see if I can demonstrate it (and fix it perhaps).
So here I guess the solution would be “do not use duplicate endpoint names”, as they are then used for operation ids (and I think that’s their only usage). Unless you have a use-case for using the same name multiple times?
And you are right of course that this should be caught by the EndpointVerifier - thanks for the test - maybe you could contribute the implementation as well?