Skip to content

Commit b9b261c

Browse files
committed
Set OpenAPI document version and title
Signed-off-by: Yasumasa Suenaga <[email protected]>
1 parent 421f14e commit b9b261c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/CarbonAware.WebApi/src/Program.cs

+5
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,11 @@
4646
c.EnableAnnotations();
4747
c.OperationFilter<CarbonAwareParametersBaseDtoOperationFilter>();
4848
c.SchemaFilter<CarbonAwareParametersBaseDtoSchemaFilter>();
49+
c.SwaggerDoc("v1", new OpenApiInfo
50+
{
51+
Version = serviceVersion,
52+
Title = serviceName,
53+
});
4954
});
5055

5156
builder.Services.Configure<CarbonAwareVariablesConfiguration>(builder.Configuration.GetSection(CarbonAwareVariablesConfiguration.Key));

0 commit comments

Comments
 (0)