Closes #2616 - Make OpenAPI/Swagger UI docs public
This commit is contained in:
parent
712abf4fa0
commit
bbad969a9b
|
@ -1,7 +1,10 @@
|
||||||
package pro.taskana.example.boot;
|
package pro.taskana.example.boot;
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.OpenAPIDefinition;
|
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.info.Info;
|
||||||
|
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||||
|
import io.swagger.v3.oas.annotations.security.SecurityScheme;
|
||||||
import io.swagger.v3.oas.models.media.ArraySchema;
|
import io.swagger.v3.oas.models.media.ArraySchema;
|
||||||
import io.swagger.v3.oas.models.media.ObjectSchema;
|
import io.swagger.v3.oas.models.media.ObjectSchema;
|
||||||
import io.swagger.v3.oas.models.media.StringSchema;
|
import io.swagger.v3.oas.models.media.StringSchema;
|
||||||
|
@ -18,8 +21,7 @@ import org.springframework.context.annotation.Configuration;
|
||||||
title = "TASKANA RESTful API Documentation",
|
title = "TASKANA RESTful API Documentation",
|
||||||
version = "8.2.0",
|
version = "8.2.0",
|
||||||
description =
|
description =
|
||||||
""
|
"<h1>Overview</h1>"
|
||||||
+ "<h1>Overview</h1>"
|
|
||||||
+ "<p>"
|
+ "<p>"
|
||||||
+ "This is the REST documentation for [TASKANA](http://taskana.pro) - the "
|
+ "This is the REST documentation for [TASKANA](http://taskana.pro) - the "
|
||||||
+ "world’s first open source solution for Enterprise Task Management."
|
+ "world’s first open source solution for Enterprise Task Management."
|
||||||
|
@ -340,7 +342,9 @@ import org.springframework.context.annotation.Configuration;
|
||||||
+ "<td>String</td>"
|
+ "<td>String</td>"
|
||||||
+ "</tr>"
|
+ "</tr>"
|
||||||
+ "</tbody>"
|
+ "</tbody>"
|
||||||
+ "</table>"))
|
+ "</table>"),
|
||||||
|
security = {@SecurityRequirement(name = "basicAuth")})
|
||||||
|
@SecurityScheme(name = "basicAuth", type = SecuritySchemeType.HTTP, scheme = "basic")
|
||||||
public class OpenApiConfiguration {
|
public class OpenApiConfiguration {
|
||||||
@Bean
|
@Bean
|
||||||
public OpenApiCustomizer openApiCustomizer() {
|
public OpenApiCustomizer openApiCustomizer() {
|
||||||
|
|
|
@ -73,8 +73,14 @@ public class BootWebSecurityConfigurer {
|
||||||
authorizeHttpRequests
|
authorizeHttpRequests
|
||||||
.requestMatchers("/css/**", "/img/**")
|
.requestMatchers("/css/**", "/img/**")
|
||||||
.permitAll()
|
.permitAll()
|
||||||
|
.requestMatchers(HttpMethod.GET, "/docs/**")
|
||||||
|
.permitAll()
|
||||||
.requestMatchers(
|
.requestMatchers(
|
||||||
HttpMethod.GET, "/docs/**", "/api-docs*")
|
HttpMethod.GET,
|
||||||
|
"/api-docs",
|
||||||
|
"/api-docs/**",
|
||||||
|
"/swagger-ui",
|
||||||
|
"/swagger-ui/**")
|
||||||
.permitAll())
|
.permitAll())
|
||||||
.cors(Customizer.withDefaults())
|
.cors(Customizer.withDefaults())
|
||||||
.addFilter(jaasApiIntegrationFilter())
|
.addFilter(jaasApiIntegrationFilter())
|
||||||
|
|
|
@ -33,7 +33,7 @@ taskana.schemaName=TASKANA
|
||||||
####### property that control rest api security deploy use true for no security.
|
####### property that control rest api security deploy use true for no security.
|
||||||
devMode=false
|
devMode=false
|
||||||
# This property enables the support of XSRF tokens. This will not work together with devMode.
|
# This property enables the support of XSRF tokens. This will not work together with devMode.
|
||||||
enableCsrf=true
|
enableCsrf=false
|
||||||
####### property that control if the database is cleaned and sample data is generated
|
####### property that control if the database is cleaned and sample data is generated
|
||||||
generateSampleData=true
|
generateSampleData=true
|
||||||
####### cache static resources properties
|
####### cache static resources properties
|
||||||
|
|
Loading…
Reference in New Issue