Fix names for open api spec (#1582)

Names must not contain spaces, therefore we replace
them with underscores.
This commit is contained in:
René Pfeuffer
2021-03-15 15:26:54 +01:00
committed by GitHub
parent b339dd068f
commit 5bb6b73526
3 changed files with 8 additions and 6 deletions

View File

@@ -0,0 +1,2 @@
- type: fixed
description: Authentication names in open api spec ([#1582](https://github.com/scm-manager/scm-manager/issues/1582))

View File

@@ -21,7 +21,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package sonia.scm.api.v2.resources;
import com.google.inject.Inject;
@@ -66,13 +66,13 @@ import java.util.Optional;
@SecuritySchemes({
@SecurityScheme(
name = "Basic Authentication",
name = "Basic_Authentication",
description = "HTTP Basic authentication with username and password",
scheme = "basic",
type = SecuritySchemeType.HTTP
),
@SecurityScheme(
name = "Bearer Token Authentication",
name = "Bearer_Token_Authentication",
description = "Authentication with a jwt bearer token",
scheme = "bearer",
bearerFormat = "JWT",

View File

@@ -21,7 +21,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package sonia.scm.api.v2.resources;
import io.swagger.v3.oas.annotations.OpenAPIDefinition;
@@ -41,8 +41,8 @@ import javax.ws.rs.Produces;
@OpenAPIDefinition(
security = {
@SecurityRequirement(name = "Basic Authentication"),
@SecurityRequirement(name = "Bearer Token Authentication")
@SecurityRequirement(name = "Basic_Authentication"),
@SecurityRequirement(name = "Bearer_Token_Authentication")
},
tags = {
@Tag(name = "Index", description = "SCM-Manager Index")