Skip to content

Commit

Permalink
Fix Open API documentation spawning multiple ApiKey/ApiSecret fields (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
jonashendrickx committed Jul 30, 2024
1 parent b66156e commit b067f79
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/Api/Endpoints/AuthenticationConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ public static void MapAuthenticationConfigurationEndpoints(this WebApplication a
{
var group = app.MapGroup("/auth-configs")
.RequireCors("default")
.WithOpenApi()
.WithTags(OpenApiTags.AuthConfigs);

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

return Created();
})
.WithOpenApi()
.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")
.Produces(StatusCodes.Status201Created)
.Produces(StatusCodes.Status400BadRequest)
Expand All @@ -56,6 +57,7 @@ public static void MapAuthenticationConfigurationEndpoints(this WebApplication a

return NoContent();
})
.WithOpenApi()
.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")
.Produces(StatusCodes.Status204NoContent)
.Produces(StatusCodes.Status404NotFound)
Expand All @@ -77,6 +79,7 @@ public static void MapAuthenticationConfigurationEndpoints(this WebApplication a

return NoContent();
})
.WithOpenApi()
.WithSummary("Deletes an authentication configuration for the provided purpose.")
.Produces(StatusCodes.Status204NoContent)
.Produces(StatusCodes.Status400BadRequest)
Expand Down
1 change: 0 additions & 1 deletion src/Api/Endpoints/Signin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ public static void MapSigninEndpoints(this WebApplication app)
{
var group = app.MapGroup("/signin")
.RequireCors("default")
.WithOpenApi()
.WithTags(OpenApiTags.SignIn);

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

0 comments on commit b067f79

Please sign in to comment.