I have a C# asp.net project based on .NET 6 and I want to generate swagger json file to implement client based on this file
In this situation I need to specify host variable to determine client how to connect server.
But my question is how to do this?
You can use below code to add
hostvariable into the json filethis options is for
SwaggerGenOptionsand you can set this inprogram.csorstartup.cstypically.