[backend/swagger] Set SwaggerDoc versions correctly (ISH-350)

This commit is contained in:
Laura Hausmann 2024-05-27 15:21:43 +02:00
parent d3aed20843
commit 55250e59f0
No known key found for this signature in database
GPG key ID: D044E84C5BE01605

View file

@ -174,9 +174,10 @@ public static class ServiceExtensions
{
options.SupportNonNullableReferenceTypes();
options.SwaggerDoc("iceshrimp", new OpenApiInfo { Title = "Iceshrimp.NET" });
options.SwaggerDoc("federation", new OpenApiInfo { Title = "Federation" });
options.SwaggerDoc("mastodon", new OpenApiInfo { Title = "Mastodon" });
var version = new Config.InstanceSection().Version;
options.SwaggerDoc("iceshrimp", new OpenApiInfo { Title = "Iceshrimp.NET", Version = version });
options.SwaggerDoc("federation", new OpenApiInfo { Title = "Federation", Version = version });
options.SwaggerDoc("mastodon", new OpenApiInfo { Title = "Mastodon", Version = version });
options.AddSecurityDefinition("iceshrimp",
new OpenApiSecurityScheme