Is your feature request related to a problem? Please describe.
The generated swagger documents don't copy the API metadata (OpenAPI info object) from the configured swagger specifications. Currently, the ConfigureSwaggerOptions.cs just set up a title and version via options.SwaggerDoc(cluster.Key, new OpenApiInfo {Title = cluster.Key, Version = cluster.Key});.
There is currently no way to copy metadata over into the generated swagger document without manually copying the information into the OpenApiInfo object. But this solution is error-prone as the YARP metadata will need to be manually updated every time there is a change to the swagger document.
Describe the solution you'd like
There should be an option in the appsettings.json file where you can specify which swagger path to use to copy over the metadata into the generated swagger document.
Describe alternatives you've considered
The only alternative right now would be to manually set up the OpenApiInfo object with all of the necessary metadata in the ConfigureSwaggerOptions file.
Additional context
Ultimately, I'm looking for a way to be able to copy over the (OpenAPI info object) into the YARP swagger without having to manually set it up.
Is your feature request related to a problem? Please describe.
The generated swagger documents don't copy the API metadata (OpenAPI info object) from the configured swagger specifications. Currently, the ConfigureSwaggerOptions.cs just set up a title and version via
options.SwaggerDoc(cluster.Key, new OpenApiInfo {Title = cluster.Key, Version = cluster.Key});
.There is currently no way to copy metadata over into the generated swagger document without manually copying the information into the
OpenApiInfo
object. But this solution is error-prone as the YARP metadata will need to be manually updated every time there is a change to the swagger document.Describe the solution you'd like
There should be an option in the
appsettings.json
file where you can specify which swagger path to use to copy over the metadata into the generated swagger document.Describe alternatives you've considered
The only alternative right now would be to manually set up the
OpenApiInfo
object with all of the necessary metadata in theConfigureSwaggerOptions
file.Additional context
Ultimately, I'm looking for a way to be able to copy over the (OpenAPI info object) into the YARP swagger without having to manually set it up.