openapi 3.0

This commit is contained in:
Captain.B 2020-06-23 11:13:17 +08:00
parent 7f6a2e0e41
commit c480483858
3 changed files with 31 additions and 5 deletions

View File

@ -128,13 +128,19 @@
<groupId>org.slf4j</groupId> <groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId> <artifactId>slf4j-simple</artifactId>
</dependency> </dependency>
<!-- openapi -->
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-ui</artifactId>
<version>1.2.32</version>
</dependency>
<!-- jmeter --> <!-- jmeter -->
<!-- <dependency>--> <!-- <dependency>-->
<!-- <groupId>org.apache.jmeter</groupId>--> <!-- <groupId>org.apache.jmeter</groupId>-->
<!-- <artifactId>ApacheJMeter_core</artifactId>--> <!-- <artifactId>ApacheJMeter_core</artifactId>-->
<!-- <version>${jmeter.version}</version>--> <!-- <version>${jmeter.version}</version>-->
<!-- </dependency>--> <!-- </dependency>-->
<dependency> <dependency>
<groupId>org.apache.jmeter</groupId> <groupId>org.apache.jmeter</groupId>

View File

@ -0,0 +1,15 @@
package io.metersphere.config;
import io.swagger.v3.oas.annotations.OpenAPIDefinition;
import io.swagger.v3.oas.annotations.info.Info;
import org.springframework.context.annotation.Configuration;
@OpenAPIDefinition(
info = @Info(
title = "MeterSphere",
version = "1.0"
)
)
@Configuration
public class OpenApiConfig {
}

View File

@ -51,6 +51,11 @@ public class ShiroConfig {
filterChainDefinitionMap.put("/img/**", "anon"); filterChainDefinitionMap.put("/img/**", "anon");
filterChainDefinitionMap.put("/fonts/**", "anon"); filterChainDefinitionMap.put("/fonts/**", "anon");
// for swagger
filterChainDefinitionMap.put("/swagger-ui.html", "anon");
filterChainDefinitionMap.put("/swagger-ui/**", "anon");
filterChainDefinitionMap.put("/v3/api-docs/**", "anon");
filterChainDefinitionMap.put("/api/**", "anon"); filterChainDefinitionMap.put("/api/**", "anon");
filterChainDefinitionMap.put("/403", "anon"); filterChainDefinitionMap.put("/403", "anon");
filterChainDefinitionMap.put("/anonymous/**", "anon"); filterChainDefinitionMap.put("/anonymous/**", "anon");