forked from github/dataease
fix: api文档优化
This commit is contained in:
parent
03ab93664d
commit
238ce0f27a
@ -11,6 +11,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<artifactId>backend</artifactId>
|
<artifactId>backend</artifactId>
|
||||||
|
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
<shiro.version>1.7.1</shiro.version>
|
<shiro.version>1.7.1</shiro.version>
|
||||||
@ -270,11 +271,16 @@
|
|||||||
<includes>
|
<includes>
|
||||||
<include>**/*</include>
|
<include>**/*</include>
|
||||||
</includes>
|
</includes>
|
||||||
<filtering>false</filtering>
|
<filtering>true</filtering>
|
||||||
</resource>
|
</resource>
|
||||||
</resources>
|
</resources>
|
||||||
<plugins>
|
<plugins>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-resources-plugin</artifactId>
|
||||||
|
<version>3.1.0</version>
|
||||||
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||||
|
@ -19,6 +19,6 @@ public class LoginDto implements Serializable {
|
|||||||
* 1:ldap登录
|
* 1:ldap登录
|
||||||
* 2:单点登录
|
* 2:单点登录
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "登录方式", required = true, allowableValues = "0, 1, 2")
|
@ApiModelProperty(value = "登录方式{0:普通登录, 1:ldap登录}", required = true, allowableValues = "0, 1")
|
||||||
private int loginType;
|
private int loginType;
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package io.dataease.config;
|
package io.dataease.config;
|
||||||
|
|
||||||
import com.github.xiaoymin.knife4j.spring.extension.OpenApiExtensionResolver;
|
import com.github.xiaoymin.knife4j.spring.extension.OpenApiExtensionResolver;
|
||||||
import io.dataease.commons.condition.LicStatusCondition;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
|
import org.springframework.beans.factory.config.BeanPostProcessor;
|
||||||
import org.springframework.context.annotation.*;
|
import org.springframework.context.annotation.*;
|
||||||
import springfox.bean.validators.configuration.BeanValidatorPluginsConfiguration;
|
import springfox.bean.validators.configuration.BeanValidatorPluginsConfiguration;
|
||||||
import springfox.documentation.builders.*;
|
import springfox.documentation.builders.*;
|
||||||
@ -12,19 +12,17 @@ import springfox.documentation.service.*;
|
|||||||
import springfox.documentation.spi.DocumentationType;
|
import springfox.documentation.spi.DocumentationType;
|
||||||
import springfox.documentation.spi.service.contexts.SecurityContext;
|
import springfox.documentation.spi.service.contexts.SecurityContext;
|
||||||
import springfox.documentation.spring.web.plugins.Docket;
|
import springfox.documentation.spring.web.plugins.Docket;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@EnableOpenApi
|
@EnableOpenApi
|
||||||
@Configuration
|
@Configuration
|
||||||
@Import(BeanValidatorPluginsConfiguration.class)
|
@Import(BeanValidatorPluginsConfiguration.class)
|
||||||
public class Knife4jConfiguration {
|
public class Knife4jConfiguration implements BeanPostProcessor{
|
||||||
|
|
||||||
private final OpenApiExtensionResolver openApiExtensionResolver;
|
private final OpenApiExtensionResolver openApiExtensionResolver;
|
||||||
|
|
||||||
@Value("${app.version}")
|
@Value("${version}")
|
||||||
private String version;
|
private String version;
|
||||||
|
|
||||||
|
|
||||||
|
@ -43,8 +43,8 @@ public class IndexController {
|
|||||||
return "doc.html";
|
return "doc.html";
|
||||||
default:
|
default:
|
||||||
// DataEaseException.throwException("Invalid License.");
|
// DataEaseException.throwException("Invalid License.");
|
||||||
return "nolic.html";
|
//return "nolic.html";
|
||||||
// return "doc.html";
|
return "doc.html";
|
||||||
}
|
}
|
||||||
// return "index.html";
|
// return "index.html";
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,6 @@ import io.dataease.commons.utils.AuthUtils;
|
|||||||
import io.dataease.commons.utils.PageUtils;
|
import io.dataease.commons.utils.PageUtils;
|
||||||
import io.dataease.commons.utils.Pager;
|
import io.dataease.commons.utils.Pager;
|
||||||
import io.dataease.controller.sys.base.BaseGridRequest;
|
import io.dataease.controller.sys.base.BaseGridRequest;
|
||||||
import io.dataease.controller.sys.request.LdapAddRequest;
|
|
||||||
import io.dataease.controller.sys.request.SysUserCreateRequest;
|
import io.dataease.controller.sys.request.SysUserCreateRequest;
|
||||||
import io.dataease.controller.sys.request.SysUserPwdRequest;
|
import io.dataease.controller.sys.request.SysUserPwdRequest;
|
||||||
import io.dataease.controller.sys.request.SysUserStateRequest;
|
import io.dataease.controller.sys.request.SysUserStateRequest;
|
||||||
@ -130,11 +129,11 @@ public class SysUserController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ApiOperation("同步用户")
|
/* @ApiOperation("同步用户")
|
||||||
@PostMapping("/sync")
|
@PostMapping("/sync")
|
||||||
public void importLdap(@RequestBody LdapAddRequest request) {
|
public void importLdap(@RequestBody LdapAddRequest request) {
|
||||||
sysUserService.saveLdapUsers(request);
|
sysUserService.saveLdapUsers(request);
|
||||||
}
|
} */
|
||||||
|
|
||||||
@ApiOperation("已同步用户")
|
@ApiOperation("已同步用户")
|
||||||
@PostMapping("/existLdapUsers")
|
@PostMapping("/existLdapUsers")
|
||||||
|
@ -34,7 +34,7 @@ knife4j.setting.enableSearch=false
|
|||||||
knife4j.setting.enableOpenApi=false
|
knife4j.setting.enableOpenApi=false
|
||||||
knife4j.setting.enableAfterScript=false
|
knife4j.setting.enableAfterScript=false
|
||||||
|
|
||||||
app.version=@project.version@
|
version=@project.version@
|
||||||
|
|
||||||
logging.file.path=/opt/dataease/logs/${spring.application.name}
|
logging.file.path=/opt/dataease/logs/${spring.application.name}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user