RicoSuter / NSwag

The Swagger/OpenAPI toolchain for .NET, ASP.NET Core and TypeScript.
http://NSwag.org
MIT License
6.73k stars 1.29k forks source link

Nswag 14 is not generating multiversioned controllers on OpenApiDefinition #4774

Open Dexiion opened 8 months ago

Dexiion commented 8 months ago

Hello,

We have encountered a problem when generating the auto-generated clients from NSWAG version 14, to reproduce the error we have used a default template from Microsoft adding versioning to the controllers and tested with version 14.0.3 and version 13.20.0.

The code can be found here, the main branch contains version 14 and there is another branch with version 13.

Trying to generate the document containing the OpenApi definition we have seen the following, using version 13 we can see how the OpenApi specs are generated for both versions of the controllers

image (3)

However, if we update the NSWAG version and make the corresponding changes to comply with the breaking changes the OpenApi document only generates one version, the first one, as can be seen in the following picture

image (4)

This is causing us a lot of problems when generating our autogenerated clients and being able to use the latest version of Nswag. Is this a Breaking Change for the version 14 or a bug?

Thanks in advance!

Dexiion commented 5 months ago

Hi!

This still happens on the 14.0.7, any info about this?

Thanks!