Search code examples
swaggeropenapiautorest

AutoRest error : (Duplicate Operation detected (This is most likely due to 2 operation using the same 'operationId' or 'tags')


I am trying to automatically generate a REST client (C#) from swagger.json file. The generation ends up with an error:

node.exe : ERROR (DuplicateOperation): Duplicate Operation '' > 'Exports' detected(This is most likely due to 2 operation using the same 'operationId' or 'tags'). Duplicates have those paths:

I find this error little bit strange, as we are not using operationId's at all (I can confirm that there are no operationId's in swagger.json). We are using duplicate 'tags', yes. But as far as I understand, tags are used by SwaggerUI to group related methods together.

Does AutoRest really require "tags" to be unique, or it is a misleading error message?


Solution

  • I added unique operationId's to my swagger.json (did not have operationId's at all previously) and that solved the issue.