Open davidpetric opened 9 months ago
I'm searching for the exact same thing. I did not find anything yet, there is pipeline support which does something related:
Another thing I've tried is the nswag aspnetcore2openapi command, but that is barely documented and used. Couldn't get it to work properly on my function project.
https://github.com/RicoSuter/NSwag/wiki/AspNetCoreToOpenApiCommand
Another option seems to be OpenApiReference, but after a few tries, this doesn't seem to be the answer here as well.
https://learn.microsoft.com/en-us/aspnet/core/web-api/microsoft.dotnet-openapi?view=aspnetcore-6.0
Description
I am wondering if there is a way to generate the swagger file at BUILD time from OpenApi attributes.
We are working on a project that involves a lot of Azure Functions and we use NSwag to generate HttpClients for them. However, we have to do this manually every time because we need to run the functions and get the OpenAPI document first.
Is there a better solution for this? I would appreciate any suggestions or tips. Thank you very much.