Compare commits

...

3 Commits
master ... leak

Author SHA1 Message Date
educoder d45b7753ed 去掉注释 2023-02-28 14:56:21 +08:00
educoder 25709cccb5 去掉swagger注释 2023-02-28 14:54:14 +08:00
educoder f908ea5038 去掉swagger 2023-02-28 14:48:56 +08:00
6 changed files with 9 additions and 51 deletions

11
pom.xml
View File

@ -15,7 +15,6 @@
<description>browser(websocket) -> webssh(ssh) -> pod</description>
<properties>
<swagger2.version>2.6.1</swagger2.version>
<java.version>1.8</java.version>
<jsch.version>0.1.54</jsch.version>
<fastjson.version>1.2.20</fastjson.version>
@ -62,16 +61,6 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
<version>${swagger2.version}</version>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
<version>${swagger2.version}</version>
</dependency>

View File

@ -7,7 +7,6 @@ import org.apache.commons.lang.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
@ -16,8 +15,7 @@ import org.springframework.web.bind.annotation.RestController;
import com.alibaba.fastjson.JSONObject;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import net.educoder.bridge.common.constant.ApiResultCsts;
import net.educoder.bridge.common.model.ApiResult;
import net.educoder.bridge.common.utils.Base64Util;
@ -132,7 +130,7 @@ public class GitGontroller {
* 删除私密版本库
*/
@RequestMapping(path = "/deleteSecret", method = { RequestMethod.POST })
public ApiResult<?> deleteSecret(@ApiParam(name = "secretRepospace", required = true, value = "私密版本库路径") @RequestParam String secretRepospace) {
public ApiResult<?> deleteSecret(@RequestParam String secretRepospace) {
logger.info("[start]deleteSecret: secretRepospace: {}", secretRepospace);
ApiResult<?> result = new ApiResult<>();
@ -146,7 +144,6 @@ public class GitGontroller {
* tpm版本库已更新同步
*/
@RequestMapping(path = "/resetTpmRepository", method = RequestMethod.POST)
@ApiOperation(value = "tpm版本库已更新同步操作", httpMethod = "POST", produces = MediaType.APPLICATION_FORM_URLENCODED_VALUE)
public ApiResult<?> reset(@RequestBody GitResetRequestParam param) {
logger.info("[start]tpm版本库已更新同步到tpi版本库 {}", param);
@ -179,7 +176,7 @@ public class GitGontroller {
* 删除私密版本库
*/
@RequestMapping(path = "/clearWorkspace", method = { RequestMethod.POST })
public ApiResult<?> clearWorkspace(@ApiParam(name = "tpiWorkspace", required = true, value = "实训工作空间") @RequestParam String tpiWorkspace) {
public ApiResult<?> clearWorkspace(@RequestParam String tpiWorkspace) {
logger.info("[start]clearWorkspace: tpiWorkspace: {}", tpiWorkspace);
ApiResult<?> result = new ApiResult<>();
@ -237,9 +234,9 @@ public class GitGontroller {
* 导入jupyter tpm文件
*/
@RequestMapping(path = "/updateJupyterTpm", method = { RequestMethod.POST })
public ApiResult<?> updateJupyterTpm(@ApiParam(name = "tpiID", required = true, value = "tpiID") @RequestParam String tpiID,
@ApiParam(name = "content", required = true, value = "文件内容") @RequestParam String content,
@ApiParam(name = "tpiWorkspace", required = true, value = "工作空间") @RequestParam String tpiWorkspace) {
public ApiResult<?> updateJupyterTpm(@RequestParam String tpiID,
@RequestParam String content,
@RequestParam String tpiWorkspace) {
logger.info("[start]updateJupyterTpm tpiID: {}, content: {}, tpiWorkspace", tpiID, content, tpiWorkspace);
ApiResult<?> result = new ApiResult<>();
gitService.updateJupyterTpm(tpiID, content, tpiWorkspace);

View File

@ -1,42 +1,30 @@
package net.educoder.bridge.git.model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* git信息
*/
@ApiModel(value = "gitPullRequestParam", description = "git pull接口传参")
public class GitPullRequestParam {
@ApiModelProperty(name = "tpiId", required = true, value = "实训实例的ID")
private String tpiId;
@ApiModelProperty(name = "tpiGitURL", required = true, value = "git项目地址")
private String tpiGitURL;
@ApiModelProperty(name = "tpiWorkspace", required = true, value = "实训工作空间")
private String tpiWorkspace;
@ApiModelProperty(name = "tpiRepoName", required = true, value = "实训项目名")
private String tpiRepoName;
@ApiModelProperty(name = "tpiProtectspace", required = true, value = "实训保护空间")
private String tpiProtectspace;
@ApiModelProperty(name = "tpmScript", required = false, value = "实训评测脚本")
private String tpmScript;
@ApiModelProperty(name = "secretDir", required = false, value = "私密版本库路径")
private String secretDir;
@ApiModelProperty(name = "secretGitUrl", required = false, value = "私密版本库项目地址")
private String secretGitUrl;
@ApiModelProperty(name = "contentModified", required = false, value = "文件是否修改的标志")
private Integer contentModified;
@ApiModelProperty(name = "file", required = false, value = "需要传文件的实训,给出文件存放路径(一个目录)及文件类型")
private String file;
public String getTpiId() {

View File

@ -1,30 +1,22 @@
package net.educoder.bridge.git.model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* git信息
*/
@ApiModel(value = "gitResetRequestParam", description = "git reset接口传参")
public class GitResetRequestParam {
@ApiModelProperty(name = "tpiId", required = true, value = "实训实例的ID")
private String tpiId;
@ApiModelProperty(name = "tpiGitURL", required = true, value = "tpi git项目地址")
private String tpiGitURL;
@ApiModelProperty(name = "tpmGitURL", required = true, value = "tpm git项目地址")
private String tpmGitURL;
@ApiModelProperty(name = "tpiWorkspace", required = true, value = "实训工作空间")
private String tpiWorkspace;
@ApiModelProperty(name = "tpiRepoName", required = true, value = "实训项目名")
private String tpiRepoName;
@ApiModelProperty(name = "tpiRepoPath", required = true, value = "实训项目名")
private String tpiRepoPath;
public String getTpiId() {

View File

@ -1,27 +1,20 @@
package net.educoder.bridge.git.model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* git信息
*/
@ApiModel(value = "ojRequestParam", description = "oj接口传参")
public class OjRequestParam {
@ApiModelProperty(name = "tpiID", required = true, value = "实训实例的ID")
private String tpiID;
@ApiModelProperty(name = "codeFileName", required = false, value = "代码文件名")
private String codeFileName;
@ApiModelProperty(name = "codeFileContent", required = false, value = "代码文件内容")
private String codeFileContent;
@ApiModelProperty(name = "tpiWorkspace", required = false, value = "工作空间")
private String tpiWorkspace;
@ApiModelProperty(name = "codeFilePath", required = true, value = "代码文件路径")
private String codeFilePath;
public String getTpiID() {

View File

@ -39,7 +39,6 @@
<!-- 屏蔽框架输出 -->
<logger name="org.slf4j" level="ERROR" />
<logger name="org.springframework" level="ERROR" />
<logger name="io.swagger" level="ERROR" />
<logger name="ch.qos.logback" level="OFF" />
<logger name="springfox.documentation" level="ERROR" />
<logger name="com.spotify.docker.client" level="ERROR" />