Fixed OpenAPI configuration
This commit is contained in:
+10
-10
@@ -1,18 +1,18 @@
|
||||
package de.twomartens.wahlrecht.configuration;
|
||||
|
||||
import org.springdoc.core.models.GroupedOpenApi;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import io.swagger.v3.oas.annotations.OpenAPIDefinition;
|
||||
import io.swagger.v3.oas.annotations.enums.SecuritySchemeType;
|
||||
import io.swagger.v3.oas.annotations.info.Info;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityScheme;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
@OpenAPIDefinition(info = @Info(title = "Wahlrecht API", version = "v1"))
|
||||
@SecurityScheme(
|
||||
name = "basicAuth",
|
||||
type = SecuritySchemeType.HTTP,
|
||||
scheme = "basic"
|
||||
)
|
||||
@Configuration
|
||||
public class OpenApiConfiguration {
|
||||
|
||||
@Bean
|
||||
public GroupedOpenApi swaggerApi10() {
|
||||
return GroupedOpenApi.builder()
|
||||
.group("1.0")
|
||||
.pathsToMatch("/wahlrecht/v1/**")
|
||||
.build();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -30,21 +30,21 @@ spring:
|
||||
default: dev
|
||||
|
||||
# properties for application
|
||||
de.twomartens.template:
|
||||
de.twomartens.wahlrecht:
|
||||
defaultTimeZone: Europe/Berlin
|
||||
greeting: "Hello %s"
|
||||
|
||||
springdoc:
|
||||
swagger-ui:
|
||||
path: '/template/doc/'
|
||||
path: '/wahlrecht/v1/doc/'
|
||||
api-docs:
|
||||
path: '/template/api-docs/'
|
||||
path: '/wahlrecht/v1/api-docs/'
|
||||
default-produces-media-type: 'application/json'
|
||||
|
||||
openapi:
|
||||
#TODO write description/ changelog
|
||||
description: |
|
||||
Open API Documentation for the Template
|
||||
Open API Documentation for the Wahlrecht
|
||||
|
||||
## Header 2
|
||||
|
||||
@@ -57,7 +57,7 @@ openapi:
|
||||
| 1.0 | added API Versioning (and changelog) | Jim | 28.05.2023 |
|
||||
|
||||
version: 1.0
|
||||
title: 'Template API'
|
||||
title: 'Wahlrecht API'
|
||||
|
||||
resttemplate:
|
||||
timeout:
|
||||
|
||||
Reference in New Issue
Block a user