Skip to content

Commit b067f79

Browse files
author
Jonas Hendrickx
committed
Fix Open API documentation spawning multiple ApiKey/ApiSecret fields (#653)
1 parent b66156e commit b067f79

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/Api/Endpoints/AuthenticationConfiguration.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ public static void MapAuthenticationConfigurationEndpoints(this WebApplication a
1414
{
1515
var group = app.MapGroup("/auth-configs")
1616
.RequireCors("default")
17-
.WithOpenApi()
1817
.WithTags(OpenApiTags.AuthConfigs);
1918

2019
group.MapGet("/list", async (
@@ -29,6 +28,7 @@ public static void MapAuthenticationConfigurationEndpoints(this WebApplication a
2928
.Select(dto => dto.ToResponse())
3029
});
3130
})
31+
.WithOpenApi()
3232
.WithSummary("A list of authentication scope configurations for your application. This will include the two default scopes of SignIn and StepUp.")
3333
.Produces<GetAuthenticationConfigurationsResult>()
3434
.RequireSecretKey();
@@ -41,6 +41,7 @@ public static void MapAuthenticationConfigurationEndpoints(this WebApplication a
4141

4242
return Created();
4343
})
44+
.WithOpenApi()
4445
.WithSummary("Creates an authentication configuration for the authentication process. In order to use this, it will have to be provided to the `stepup` client method via the purpose field")
4546
.Produces(StatusCodes.Status201Created)
4647
.Produces(StatusCodes.Status400BadRequest)
@@ -56,6 +57,7 @@ public static void MapAuthenticationConfigurationEndpoints(this WebApplication a
5657

5758
return NoContent();
5859
})
60+
.WithOpenApi()
5961
.WithSummary("Updates an authentication configuration for the authentication process. In order to use this, it will have to be provided to the `stepup` client method via the purpose field")
6062
.Produces(StatusCodes.Status204NoContent)
6163
.Produces(StatusCodes.Status404NotFound)
@@ -77,6 +79,7 @@ public static void MapAuthenticationConfigurationEndpoints(this WebApplication a
7779

7880
return NoContent();
7981
})
82+
.WithOpenApi()
8083
.WithSummary("Deletes an authentication configuration for the provided purpose.")
8184
.Produces(StatusCodes.Status204NoContent)
8285
.Produces(StatusCodes.Status400BadRequest)

src/Api/Endpoints/Signin.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ public static void MapSigninEndpoints(this WebApplication app)
2222
{
2323
var group = app.MapGroup("/signin")
2424
.RequireCors("default")
25-
.WithOpenApi()
2625
.WithTags(OpenApiTags.SignIn);
2726

2827
group.MapPost("/generate-token", GenerateTokenAsync)

0 commit comments

Comments
 (0)