fix: api文档优化

This commit is contained in:
fit2cloud-chenyw 2021-10-14 17:17:43 +08:00
parent 03ab93664d
commit 238ce0f27a
7 changed files with 25 additions and 13 deletions

View File

@ -10,6 +10,7 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>backend</artifactId>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
@ -270,11 +271,16 @@
<includes>
<include>**/*</include>
</includes>
<filtering>false</filtering>
<filtering>true</filtering>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.1.0</version>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>

View File

@ -19,6 +19,6 @@ public class LoginDto implements Serializable {
* 1ldap登录
* 2单点登录
*/
@ApiModelProperty(value = "登录方式", required = true, allowableValues = "0, 1, 2")
@ApiModelProperty(value = "登录方式{0:普通登录, 1:ldap登录}", required = true, allowableValues = "0, 1")
private int loginType;
}

View File

@ -1,9 +1,9 @@
package io.dataease.config;
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.Value;
import org.springframework.beans.factory.config.BeanPostProcessor;
import org.springframework.context.annotation.*;
import springfox.bean.validators.configuration.BeanValidatorPluginsConfiguration;
import springfox.documentation.builders.*;
@ -12,19 +12,17 @@ import springfox.documentation.service.*;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spi.service.contexts.SecurityContext;
import springfox.documentation.spring.web.plugins.Docket;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
@EnableOpenApi
@Configuration
@Import(BeanValidatorPluginsConfiguration.class)
public class Knife4jConfiguration {
public class Knife4jConfiguration implements BeanPostProcessor{
private final OpenApiExtensionResolver openApiExtensionResolver;
@Value("${app.version}")
@Value("${version}")
private String version;

View File

@ -43,8 +43,8 @@ public class IndexController {
return "doc.html";
default:
// DataEaseException.throwException("Invalid License.");
return "nolic.html";
// return "doc.html";
//return "nolic.html";
return "doc.html";
}
// return "index.html";
}

View File

@ -10,7 +10,6 @@ import io.dataease.commons.utils.AuthUtils;
import io.dataease.commons.utils.PageUtils;
import io.dataease.commons.utils.Pager;
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.SysUserPwdRequest;
import io.dataease.controller.sys.request.SysUserStateRequest;
@ -130,11 +129,11 @@ public class SysUserController {
}
@ApiOperation("同步用户")
/* @ApiOperation("同步用户")
@PostMapping("/sync")
public void importLdap(@RequestBody LdapAddRequest request) {
sysUserService.saveLdapUsers(request);
}
} */
@ApiOperation("已同步用户")
@PostMapping("/existLdapUsers")

View File

@ -34,7 +34,7 @@ knife4j.setting.enableSearch=false
knife4j.setting.enableOpenApi=false
knife4j.setting.enableAfterScript=false
app.version=@project.version@
version=@project.version@
logging.file.path=/opt/dataease/logs/${spring.application.name}

View File

@ -20,4 +20,13 @@
<module>backend</module>
</modules>
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
</build>
</project>