I have encountered some issues adding the securityScheme to an api
After the line fuego.Use(restricted, util.MiddlewareJWT), I would like to add support for configuring OpenAPI security schemas, so that I can easily document the authentication requirements for the /ping endpoint.
Specifically, I'd like to be able to do something like this if is not possible directly inside the middleware:
goCopyrestricted := fuego.Group(s, "/")
fuego.Use(restricted, util.MiddlewareJWT)
// Add support for configuring OpenAPI security schemas
fuego.WithOpenAPISecuritySchemas(map[string]fuego.SecuritySchemaInfo{
"jwt": {
Type: "http",
Scheme: "bearer",
BearerFormat: "JWT",
Description: "JWT Authorization header using the Bearer scheme.",
},
})
fuego.Get(restricted, "/ping", c.Ping, fuego.WithOpenAPISecurity("jwt"))
This would allow me to clearly define the security requirements for the /ping endpoint in the OpenAPI documentation, making it easier for API consumers to understand how to authenticate and use the endpoint.
I have encountered some issues adding the securityScheme to an api
After the line
fuego.Use(restricted, util.MiddlewareJWT),
I would like to add support for configuring OpenAPI security schemas, so that I can easily document the authentication requirements for the/ping
endpoint. Specifically, I'd like to be able to do something like this if is not possible directly inside the middleware:This would allow me to clearly define the security requirements for the
/ping
endpoint in the OpenAPI documentation, making it easier for API consumers to understand how to authenticate and use the endpoint.