You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by ke...@apache.org on 2022/08/19 10:08:44 UTC
[dolphinscheduler] 01/01: Upgrade spring boot and swagger
This is an automated email from the ASF dual-hosted git repository.
kezhenxu94 pushed a commit to branch upgrade
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git
commit 70c1a50dc08d0bb5f54ebb22c6b85ede297dd6bb
Author: kezhenxu94 <ke...@apache.org>
AuthorDate: Fri Aug 19 18:08:29 2022 +0800
Upgrade spring boot and swagger
---
.github/workflows/e2e.yml | 1 +
dolphinscheduler-api/pom.xml | 52 ++-
.../api/configuration/AppConfiguration.java | 9 +-
...waggerConfig.java => OpenAPIConfiguration.java} | 70 ++++-
.../OpenAPITranslationConfiguration.java | 349 +++++++++++++++++++++
.../ServiceModelToSwagger2MapperImpl.java | 300 ------------------
.../api/controller/AccessTokenController.java | 29 +-
.../api/controller/AccessTokenV2Controller.java | 14 +-
.../api/controller/AlertGroupController.java | 40 +--
.../controller/AlertPluginInstanceController.java | 32 +-
.../api/controller/AuditLogController.java | 20 +-
.../api/controller/ClusterController.java | 38 ++-
.../api/controller/DataAnalysisController.java | 23 +-
.../api/controller/DataQualityController.java | 50 +--
.../api/controller/DataSourceController.java | 88 +++---
.../api/controller/EnvironmentController.java | 62 ++--
.../api/controller/ExecutorController.java | 141 +++++----
.../api/controller/K8sNamespaceController.java | 54 ++--
.../api/controller/LoggerController.java | 33 +-
.../api/controller/LoginController.java | 14 +-
.../controller/ProcessDefinitionController.java | 259 ++++++++-------
.../api/controller/ProcessInstanceController.java | 62 ++--
.../controller/ProcessTaskRelationController.java | 63 ++--
.../api/controller/ProjectController.java | 34 +-
.../api/controller/ProjectV2Controller.java | 29 +-
.../api/controller/QueueController.java | 24 +-
.../api/controller/ResourcesController.java | 212 ++++++-------
.../api/controller/SchedulerController.java | 94 +++---
.../api/controller/TaskDefinitionController.java | 94 +++---
.../api/controller/TaskGroupController.java | 85 ++---
.../api/controller/TaskInstanceController.java | 49 +--
.../api/controller/TenantController.java | 29 +-
.../api/controller/UiPluginController.java | 7 +-
.../api/controller/UsersController.java | 116 ++++---
.../api/controller/WorkFlowLineageController.java | 19 +-
.../api/controller/WorkerGroupController.java | 26 +-
.../src/main/resources/application.yaml | 3 +
dolphinscheduler-bom/pom.xml | 35 +--
dolphinscheduler-dist/release-docs/LICENSE | 162 +++++-----
dolphinscheduler-e2e/pom.xml | 2 +-
dolphinscheduler-standalone-server/pom.xml | 22 +-
.../src/main/resources/application.yaml | 3 +
.../plugin/task/api/k8s/impl/K8sTaskExecutor.java | 10 +-
.../plugin/task/api/utils/K8sUtils.java | 4 +-
.../plugin/task/api/k8s/K8sTaskExecutorTest.java | 18 +-
tools/dependencies/known-dependencies.txt | 264 ++++++++--------
46 files changed, 1628 insertions(+), 1516 deletions(-)
diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml
index d4c73848ec..60aeb7ad9d 100644
--- a/.github/workflows/e2e.yml
+++ b/.github/workflows/e2e.yml
@@ -20,6 +20,7 @@ on:
push:
branches:
- dev
+ - upgrade
name: E2E
diff --git a/dolphinscheduler-api/pom.xml b/dolphinscheduler-api/pom.xml
index 3727879530..d3ffc0a772 100644
--- a/dolphinscheduler-api/pom.xml
+++ b/dolphinscheduler-api/pom.xml
@@ -15,7 +15,6 @@
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
-
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
@@ -25,8 +24,20 @@
<version>dev-SNAPSHOT</version>
</parent>
<artifactId>dolphinscheduler-api</artifactId>
- <name>${project.artifactId}</name>
<packaging>jar</packaging>
+ <name>${project.artifactId}</name>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.dolphinscheduler</groupId>
+ <artifactId>dolphinscheduler-bom</artifactId>
+ <version>${project.version}</version>
+ <type>pom</type>
+ <scope>import</scope>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
<dependencies>
<!-- dolphinscheduler -->
@@ -35,8 +46,8 @@
<artifactId>dolphinscheduler-service</artifactId>
<exclusions>
<exclusion>
- <artifactId>javassist</artifactId>
<groupId>org.javassist</groupId>
+ <artifactId>javassist</artifactId>
</exclusion>
</exclusions>
</dependency>
@@ -87,8 +98,8 @@
<artifactId>spring-boot-starter-tomcat</artifactId>
</exclusion>
<exclusion>
- <artifactId>log4j-to-slf4j</artifactId>
<groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-to-slf4j</artifactId>
</exclusion>
</exclusions>
</dependency>
@@ -127,22 +138,7 @@
<dependency>
<groupId>io.springfox</groupId>
- <artifactId>springfox-swagger2</artifactId>
- </dependency>
-
- <dependency>
- <groupId>io.springfox</groupId>
- <artifactId>springfox-swagger-ui</artifactId>
- </dependency>
-
- <dependency>
- <groupId>io.swagger</groupId>
- <artifactId>swagger-models</artifactId>
- </dependency>
-
- <dependency>
- <groupId>com.github.xiaoymin</groupId>
- <artifactId>swagger-bootstrap-ui</artifactId>
+ <artifactId>springfox-boot-starter</artifactId>
</dependency>
<dependency>
@@ -165,13 +161,13 @@
<dependency>
<groupId>org.apache.curator</groupId>
<artifactId>curator-test</artifactId>
+ <scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.javassist</groupId>
<artifactId>javassist</artifactId>
</exclusion>
</exclusions>
- <scope>test</scope>
</dependency>
<!-- Python -->
@@ -187,18 +183,6 @@
</dependency>
</dependencies>
- <dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>org.apache.dolphinscheduler</groupId>
- <artifactId>dolphinscheduler-bom</artifactId>
- <version>${project.version}</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
- </dependencies>
- </dependencyManagement>
-
<build>
<testResources>
<testResource>
@@ -227,10 +211,10 @@
<executions>
<execution>
<id>dolphinscheduler-api-server</id>
- <phase>package</phase>
<goals>
<goal>single</goal>
</goals>
+ <phase>package</phase>
<configuration>
<finalName>api-server</finalName>
<descriptors>
diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/configuration/AppConfiguration.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/configuration/AppConfiguration.java
index 706f69483f..d671635810 100644
--- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/configuration/AppConfiguration.java
+++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/configuration/AppConfiguration.java
@@ -17,10 +17,12 @@
package org.apache.dolphinscheduler.api.configuration;
-import java.util.Locale;
import org.apache.dolphinscheduler.api.interceptor.LocaleChangeInterceptor;
import org.apache.dolphinscheduler.api.interceptor.LoginHandlerInterceptor;
import org.apache.dolphinscheduler.api.interceptor.RateLimitInterceptor;
+
+import java.util.Locale;
+
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@@ -101,15 +103,14 @@ public class AppConfiguration implements WebMvcConfigurer {
registry.addInterceptor(loginInterceptor())
.addPathPatterns(LOGIN_INTERCEPTOR_PATH_PATTERN)
.excludePathPatterns(LOGIN_PATH_PATTERN, REGISTER_PATH_PATTERN,
- "/swagger-resources/**", "/webjars/**", "/api-docs/**",
- "/doc.html", "/swagger-ui.html", "*.html", "/ui/**", "/error");
+ "/swagger-resources/**", "/webjars/**", "/v3/api-docs/**", "/api-docs/**",
+ "/doc.html", "/swagger-ui/**", "*.html", "/ui/**", "/error");
}
@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
registry.addResourceHandler("/static/**").addResourceLocations("classpath:/static/");
registry.addResourceHandler("doc.html").addResourceLocations("classpath:/META-INF/resources/");
- registry.addResourceHandler("swagger-ui.html").addResourceLocations("classpath:/META-INF/resources/");
registry.addResourceHandler("/webjars/**").addResourceLocations("classpath:/META-INF/resources/webjars/");
registry.addResourceHandler("/ui/**").addResourceLocations("file:ui/");
}
diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/configuration/SwaggerConfig.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/configuration/OpenAPIConfiguration.java
similarity index 53%
rename from dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/configuration/SwaggerConfig.java
rename to dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/configuration/OpenAPIConfiguration.java
index 112dcd1a88..deab4dd345 100644
--- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/configuration/SwaggerConfig.java
+++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/configuration/OpenAPIConfiguration.java
@@ -16,20 +16,28 @@
*/
package org.apache.dolphinscheduler.api.configuration;
-import com.github.xiaoymin.swaggerbootstrapui.annotations.EnableSwaggerBootstrapUI;
-import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-
-import org.springframework.context.annotation.PropertySource;
-import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import springfox.documentation.builders.ApiInfoBuilder;
import springfox.documentation.builders.PathSelectors;
import springfox.documentation.builders.RequestHandlerSelectors;
import springfox.documentation.service.ApiInfo;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket;
-import springfox.documentation.swagger2.annotations.EnableSwagger2;
+import springfox.documentation.spring.web.plugins.WebFluxRequestHandlerProvider;
+import springfox.documentation.spring.web.plugins.WebMvcRequestHandlerProvider;
+
+import java.lang.reflect.Field;
+import java.util.List;
+import java.util.stream.Collectors;
+
+import org.springframework.beans.BeansException;
+import org.springframework.beans.factory.config.BeanPostProcessor;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.PropertySource;
+import org.springframework.util.ReflectionUtils;
+import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
+import org.springframework.web.servlet.mvc.method.RequestMappingInfoHandlerMapping;
/**
*
@@ -37,21 +45,18 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2;
*
*/
@Configuration
-@EnableSwagger2
-@EnableSwaggerBootstrapUI
@ConditionalOnWebApplication
@PropertySource("classpath:swagger.properties")
-public class SwaggerConfig implements WebMvcConfigurer {
+public class OpenAPIConfiguration implements WebMvcConfigurer {
@Bean
public Docket createV1RestApi() {
- return new Docket(DocumentationType.SWAGGER_2)
+ return new Docket(DocumentationType.OAS_30)
.groupName("v1(current)")
.apiInfo(apiV1Info())
.select()
.apis(RequestHandlerSelectors.basePackage("org.apache.dolphinscheduler.api.controller"))
- .paths(PathSelectors.any())
- .paths(PathSelectors.regex("^(?!/v2).*"))
+ .paths(PathSelectors.any().and(PathSelectors.ant("/v2/**").negate()))
.build();
}
@@ -65,12 +70,12 @@ public class SwaggerConfig implements WebMvcConfigurer {
@Bean
public Docket createV2RestApi() {
- return new Docket(DocumentationType.SWAGGER_2)
+ return new Docket(DocumentationType.OAS_30)
.groupName("v2")
.apiInfo(apiV2Info())
.select()
.apis(RequestHandlerSelectors.basePackage("org.apache.dolphinscheduler.api.controller"))
- .paths(PathSelectors.ant("/v2/**"))
+ .paths(PathSelectors.any().and(PathSelectors.ant("/v2/**")))
.build();
}
@@ -81,4 +86,37 @@ public class SwaggerConfig implements WebMvcConfigurer {
.version("V2")
.build();
}
+
+ @Bean
+ public static BeanPostProcessor springfoxHandlerProviderBeanPostProcessor() {
+ return new BeanPostProcessor() {
+
+ @Override
+ public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException {
+ if (bean instanceof WebMvcRequestHandlerProvider || bean instanceof WebFluxRequestHandlerProvider) {
+ customizeSpringfoxHandlerMappings(getHandlerMappings(bean));
+ }
+ return bean;
+ }
+
+ private <T extends RequestMappingInfoHandlerMapping> void customizeSpringfoxHandlerMappings(List<T> mappings) {
+ List<T> copy = mappings.stream()
+ .filter(mapping -> mapping.getPatternParser() == null)
+ .collect(Collectors.toList());
+ mappings.clear();
+ mappings.addAll(copy);
+ }
+
+ @SuppressWarnings("unchecked")
+ private List<RequestMappingInfoHandlerMapping> getHandlerMappings(Object bean) {
+ try {
+ Field field = ReflectionUtils.findField(bean.getClass(), "handlerMappings");
+ field.setAccessible(true);
+ return (List<RequestMappingInfoHandlerMapping>) field.get(bean);
+ } catch (IllegalArgumentException | IllegalAccessException e) {
+ throw new IllegalStateException(e);
+ }
+ }
+ };
+ }
}
diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/configuration/OpenAPITranslationConfiguration.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/configuration/OpenAPITranslationConfiguration.java
new file mode 100644
index 0000000000..08cf503c26
--- /dev/null
+++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/configuration/OpenAPITranslationConfiguration.java
@@ -0,0 +1,349 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.dolphinscheduler.api.configuration;
+
+import static java.util.stream.Collectors.toList;
+import static java.util.stream.Collectors.toSet;
+import java.util.Collection;
+import springfox.documentation.builders.RequestParameterBuilder;
+import springfox.documentation.service.Operation;
+import springfox.documentation.service.Parameter;
+import springfox.documentation.service.RequestParameter;
+import springfox.documentation.spi.DocumentationType;
+import springfox.documentation.spi.service.OperationBuilderPlugin;
+import springfox.documentation.spi.service.contexts.OperationContext;
+import springfox.documentation.swagger2.mappers.LicenseMapper;
+import springfox.documentation.swagger2.mappers.ModelMapper;
+import springfox.documentation.swagger2.mappers.ParameterMapper;
+import springfox.documentation.swagger2.mappers.SecurityMapper;
+import springfox.documentation.swagger2.mappers.VendorExtensionsMapper;
+
+import java.util.Locale;
+import java.util.Set;
+
+import lombok.RequiredArgsConstructor;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.MessageSource;
+import org.springframework.context.i18n.LocaleContextHolder;
+import org.springframework.core.Ordered;
+import org.springframework.core.annotation.Order;
+import org.springframework.stereotype.Component;
+
+@Component
+public class OpenAPITranslationConfiguration {
+
+ @Component
+ @RequiredArgsConstructor
+ @Order(Ordered.LOWEST_PRECEDENCE)
+ public static class TranslationOperationBuilderPlugin implements OperationBuilderPlugin {
+
+ private final MessageSource messageSource;
+
+ @Override
+ public boolean supports(DocumentationType delimiter) {
+ return true;
+ }
+
+ @Override
+ public void apply(OperationContext context) {
+ Locale locale = LocaleContextHolder.getLocale();
+ Operation operation = context.operationBuilder().build();
+ String notes = operation.getNotes();
+ notes = messageSource.getMessage(notes, null, notes, locale);
+
+ Set<String> tags = operation.getTags().stream()
+ .map(tag -> messageSource.getMessage(tag, null, tag, locale))
+ .collect(toSet());
+
+ Collection<RequestParameter> parameters = operation.getRequestParameters().stream()
+ .map(it -> new RequestParameter(
+ it.getName(),
+ it.getIn(),
+ messageSource.getMessage(it.getDescription(), null, it.getDescription(), locale),
+ it.getRequired(),
+ it.getDeprecated(),
+ it.getHidden(),
+ it.getParameterSpecification(),
+ it.getScalarExample(),
+ it.getExamples(),
+ it.getPrecedence(),
+ it.getExtensions(),
+ it.getParameterIndex()))
+ .collect(toList());
+
+ context.operationBuilder()
+ .notes(notes)
+ .requestParameters(parameters)
+ .tags(tags);
+ }
+ }
+
+ @Autowired
+ private ModelMapper modelMapper;
+ @Autowired
+ private ParameterMapper parameterMapper;
+ @Autowired
+ private SecurityMapper securityMapper;
+ @Autowired
+ private LicenseMapper licenseMapper;
+ @Autowired
+ private VendorExtensionsMapper vendorExtensionsMapper;
+
+ @Autowired
+ private MessageSource messageSource;
+
+ // @Override
+ // public Swagger mapDocumentation(Documentation from) {
+
+ // if (from == null) {
+ // return null;
+ // }
+
+ // Swagger swagger = new Swagger();
+
+ // swagger.setVendorExtensions(vendorExtensionsMapper.mapExtensions(from.getVendorExtensions()));
+ // swagger.setSchemes(mapSchemes(from.getSchemes()));
+ // swagger.setPaths(mapApiListings(from.getApiListings()));
+ // swagger.setHost(from.getHost());
+ // swagger.setDefinitions(modelsFromApiListings( from.getApiListings() ) );
+ // swagger.setSecurityDefinitions(securityMapper.toSecuritySchemeDefinitions(from.getResourceListing()));
+ // ApiInfo info = fromResourceListingInfo(from);
+ // if (info != null) {
+ // swagger.setInfo(mapApiInfo(info));
+ // }
+ // swagger.setBasePath(from.getBasePath());
+ // swagger.setTags(tagSetToTagList(from.getTags()));
+ // List<String> list2 = from.getConsumes();
+ // if (list2 != null) {
+ // swagger.setConsumes(new ArrayList<String>(list2));
+ // } else {
+ // swagger.setConsumes(null);
+ // }
+ // List<String> list3 = from.getProduces();
+ // if (list3 != null) {
+ // swagger.setProduces(new ArrayList<String>(list3));
+ // } else {
+ // swagger.setProduces(null);
+ // }
+
+ // return swagger;
+ // }
+
+ // @Override
+ // protected Info mapApiInfo(ApiInfo from) {
+
+ // if (from == null) {
+ // return null;
+ // }
+
+ // Info info = new Info();
+
+ // info.setLicense(licenseMapper.apiInfoToLicense(from));
+ // info.setVendorExtensions(vendorExtensionsMapper.mapExtensions(from.getVendorExtensions()));
+ // info.setTermsOfService(from.getTermsOfServiceUrl());
+ // info.setContact(map(from.getContact()));
+ // info.setDescription(from.getDescription());
+ // info.setVersion(from.getVersion());
+ // info.setTitle(from.getTitle());
+
+ // return info;
+ // }
+
+ // @Override
+ // protected Contact map(springfox.documentation.service.Contact from) {
+
+ // if (from == null) {
+ // return null;
+ // }
+
+ // Contact contact = new Contact();
+
+ // contact.setName(from.getName());
+ // contact.setUrl(from.getUrl());
+ // contact.setEmail(from.getEmail());
+
+ // return contact;
+ // }
+
+ // @Override
+ // protected io.swagger.models.Operation mapOperation(springfox.documentation.service.Operation from,
+ // ModelNamesRegistry arg1) {
+
+ // if (from == null) {
+ // return null;
+ // }
+
+ // Locale locale = LocaleContextHolder.getLocale();
+
+ // io.swagger.models.Operation operation = new io.swagger.models.Operation();
+
+ // operation.setSecurity(mapAuthorizations(from.getSecurityReferences()));
+ // operation.setVendorExtensions(vendorExtensionsMapper.mapExtensions(from.getVendorExtensions()));
+ // operation.setDescription(messageSource.getMessage(from.getNotes(), null, from.getNotes(), locale));
+ // operation.setOperationId(from.getUniqueId());
+ // operation.setResponses(mapResponseMessages(from.getResponseMessages()));
+ // operation.setSchemes(stringSetToSchemeList(from.getProtocol()));
+ // Set<String> tagsSet = new HashSet<>(1);
+
+ // if(from.getTags() != null && from.getTags().size() > 0){
+
+ // List<String> list = new ArrayList<String>(tagsSet.size());
+
+ // Iterator<String> it = from.getTags().iterator();
+ // while(it.hasNext()){
+ // String tag = it.next();
+ // list.add(
+ // StringUtils.isNotBlank(tag) ? messageSource.getMessage(tag, null, tag, locale) : " ");
+ // }
+
+ // operation.setTags(list);
+ // }else {
+ // operation.setTags(null);
+ // }
+
+ // operation.setSummary(from.getSummary());
+ // Set<String> set1 = from.getConsumes();
+ // if (set1 != null) {
+ // operation.setConsumes(new ArrayList<String>(set1));
+ // } else {
+ // operation.setConsumes(null);
+ // }
+
+ // Set<String> set2 = from.getProduces();
+ // if (set2 != null) {
+ // operation.setProduces(new ArrayList<String>(set2));
+ // } else {
+ // operation.setProduces(null);
+ // }
+
+ // operation.setParameters(parameterListToParameterList(from.getParameters()));
+ // if (from.getDeprecated() != null) {
+ // operation.setDeprecated(Boolean.parseBoolean(from.getDeprecated()));
+ // }
+
+ // return operation;
+ // }
+
+ // @Override
+ // protected Tag mapTag(springfox.documentation.service.Tag from) {
+
+ // if (from == null) {
+ // return null;
+ // }
+
+ // Locale locale = LocaleContextHolder.getLocale();
+
+ // Tag tag = new Tag();
+
+ // tag.setVendorExtensions(vendorExtensionsMapper.mapExtensions(from.getVendorExtensions()));
+ // tag.setName(messageSource.getMessage(from.getName(), null, from.getName(), locale));
+ // tag.setDescription(from.getDescription());
+
+ // return tag;
+ // }
+
+ // private ApiInfo fromResourceListingInfo(Documentation documentation) {
+
+ // if (documentation == null) {
+ // return null;
+ // }
+ // ResourceListing resourceListing = documentation.getResourceListing();
+ // if (resourceListing == null) {
+ // return null;
+ // }
+ // return resourceListing.getInfo();
+ // }
+
+ // protected List<Tag> tagSetToTagList(Set<springfox.documentation.service.Tag> set) {
+
+ // if (set == null) {
+ // return null;
+ // }
+
+ // List<Tag> list = new ArrayList<Tag>(set.size());
+ // for (springfox.documentation.service.Tag tag : set) {
+ // list.add(mapTag(tag));
+ // }
+
+ // return list;
+ // }
+
+ // protected List<Scheme> stringSetToSchemeList(Set<String> set) {
+ // if (set == null) {
+ // return null;
+ // }
+
+ // List<Scheme> list = new ArrayList<Scheme>(set.size());
+ // for (String string : set) {
+ // list.add(Enum.valueOf(Scheme.class, string));
+ // }
+
+ // return list;
+ // }
+
+ // protected List<Parameter> parameterListToParameterList(List<springfox.documentation.service.Parameter> list) {
+ // if (list == null) {
+ // return null;
+ // }
+
+ // List<Parameter> list1 = new ArrayList<Parameter>(list.size());
+
+ // Locale locale = LocaleContextHolder.getLocale();
+
+ // for (springfox.documentation.service.Parameter param : list) {
+ // String description = messageSource.getMessage(param.getDescription(), null, param.getDescription(), locale);
+
+ // springfox.documentation.service.Parameter parameter = new springfox.documentation.service.Parameter(
+ // param.getName(),
+ // description,
+ // param.getDefaultValue(),
+ // param.isRequired(),
+ // param.isAllowMultiple(),
+ // param.isAllowEmptyValue(),
+ // param.getModelRef(),
+ // param.getType().get(),
+ // param.getAllowableValues(),
+ // ParameterType.valueOf(param.getParamType()),
+ // param.getParamAccess(),
+ // param.isHidden(),
+ // param.getPattern(),
+ // param.getCollectionFormat(),
+ // param.getOrder(),
+ // param.getScalarExample(),
+ // param.getExamples(),
+ // param.getVendorExtentions(),
+ // param.getStyle(),
+ // param.getExplode(),
+ // param.getAllowReserved());
+ // list1.add(parameterMapper.mapParameter(parameter));
+ // }
+
+ // return list1;
+ // }
+
+ // Map<String, Model> modelsFromApiListings(Map<String, List<ApiListing>> apiListings) {
+ // Map<String, springfox.documentation.schema.Model> definitions = newTreeMap();
+ // for (List<ApiListing> list : apiListings.values()) {
+ // for (ApiListing each : list) {
+ // definitions.putAll(each.getModels());
+ // }
+ // }
+ // return modelMapper.mapModels(definitions);
+ // }
+
+}
diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/configuration/ServiceModelToSwagger2MapperImpl.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/configuration/ServiceModelToSwagger2MapperImpl.java
deleted file mode 100644
index c08670f8f7..0000000000
--- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/configuration/ServiceModelToSwagger2MapperImpl.java
+++ /dev/null
@@ -1,300 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.dolphinscheduler.api.configuration;
-
-import static com.google.common.collect.Maps.newTreeMap;
-
-import org.apache.commons.lang3.StringUtils;
-
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Locale;
-import java.util.Map;
-import java.util.Set;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
-import org.springframework.context.MessageSource;
-import org.springframework.context.annotation.Primary;
-import org.springframework.context.i18n.LocaleContextHolder;
-import org.springframework.stereotype.Component;
-
-import com.google.common.collect.Multimap;
-
-import io.swagger.models.Contact;
-import io.swagger.models.Info;
-import io.swagger.models.Model;
-import io.swagger.models.Scheme;
-import io.swagger.models.Swagger;
-import io.swagger.models.Tag;
-import io.swagger.models.parameters.Parameter;
-import springfox.documentation.service.ApiInfo;
-import springfox.documentation.service.ApiListing;
-import springfox.documentation.service.Documentation;
-import springfox.documentation.service.ResourceListing;
-import springfox.documentation.swagger2.mappers.LicenseMapper;
-import springfox.documentation.swagger2.mappers.ModelMapper;
-import springfox.documentation.swagger2.mappers.ParameterMapper;
-import springfox.documentation.swagger2.mappers.SecurityMapper;
-import springfox.documentation.swagger2.mappers.ServiceModelToSwagger2Mapper;
-import springfox.documentation.swagger2.mappers.VendorExtensionsMapper;
-
-/**
- * application configuration
- */
-@Component(value = "ServiceModelToSwagger2Mapper")
-@Primary
-@ConditionalOnWebApplication
-public class ServiceModelToSwagger2MapperImpl extends ServiceModelToSwagger2Mapper {
-
-
- @Autowired
- private ModelMapper modelMapper;
- @Autowired
- private ParameterMapper parameterMapper;
- @Autowired
- private SecurityMapper securityMapper;
- @Autowired
- private LicenseMapper licenseMapper;
- @Autowired
- private VendorExtensionsMapper vendorExtensionsMapper;
-
- @Autowired
- private MessageSource messageSource;
-
- @Override
- public Swagger mapDocumentation(Documentation from) {
-
- if (from == null) {
- return null;
- }
-
- Swagger swagger = new Swagger();
-
- swagger.setVendorExtensions(vendorExtensionsMapper.mapExtensions(from.getVendorExtensions()));
- swagger.setSchemes(mapSchemes(from.getSchemes()));
- swagger.setPaths(mapApiListings(from.getApiListings()));
- swagger.setHost(from.getHost());
- swagger.setDefinitions(modelsFromApiListings( from.getApiListings() ) );
- swagger.setSecurityDefinitions(securityMapper.toSecuritySchemeDefinitions(from.getResourceListing()));
- ApiInfo info = fromResourceListingInfo(from);
- if (info != null) {
- swagger.setInfo(mapApiInfo(info));
- }
- swagger.setBasePath(from.getBasePath());
- swagger.setTags(tagSetToTagList(from.getTags()));
- List<String> list2 = from.getConsumes();
- if (list2 != null) {
- swagger.setConsumes(new ArrayList<String>(list2));
- } else {
- swagger.setConsumes(null);
- }
- List<String> list3 = from.getProduces();
- if (list3 != null) {
- swagger.setProduces(new ArrayList<String>(list3));
- } else {
- swagger.setProduces(null);
- }
-
- return swagger;
- }
-
-
- @Override
- protected Info mapApiInfo(ApiInfo from) {
-
- if (from == null) {
- return null;
- }
-
- Info info = new Info();
-
- info.setLicense(licenseMapper.apiInfoToLicense(from));
- info.setVendorExtensions(vendorExtensionsMapper.mapExtensions(from.getVendorExtensions()));
- info.setTermsOfService(from.getTermsOfServiceUrl());
- info.setContact(map(from.getContact()));
- info.setDescription(from.getDescription());
- info.setVersion(from.getVersion());
- info.setTitle(from.getTitle());
-
- return info;
- }
-
- @Override
- protected Contact map(springfox.documentation.service.Contact from) {
-
- if (from == null) {
- return null;
- }
-
- Contact contact = new Contact();
-
- contact.setName(from.getName());
- contact.setUrl(from.getUrl());
- contact.setEmail(from.getEmail());
-
- return contact;
- }
-
- @Override
- protected io.swagger.models.Operation mapOperation(springfox.documentation.service.Operation from) {
-
- if (from == null) {
- return null;
- }
-
- Locale locale = LocaleContextHolder.getLocale();
-
- io.swagger.models.Operation operation = new io.swagger.models.Operation();
-
- operation.setSecurity(mapAuthorizations(from.getSecurityReferences()));
- operation.setVendorExtensions(vendorExtensionsMapper.mapExtensions(from.getVendorExtensions()));
- operation.setDescription(messageSource.getMessage(from.getNotes(), null, from.getNotes(), locale));
- operation.setOperationId(from.getUniqueId());
- operation.setResponses(mapResponseMessages(from.getResponseMessages()));
- operation.setSchemes(stringSetToSchemeList(from.getProtocol()));
- Set<String> tagsSet = new HashSet<>(1);
-
- if(from.getTags() != null && from.getTags().size() > 0){
-
- List<String> list = new ArrayList<String>(tagsSet.size());
-
- Iterator<String> it = from.getTags().iterator();
- while(it.hasNext()){
- String tag = it.next();
- list.add(
- StringUtils.isNotBlank(tag) ? messageSource.getMessage(tag, null, tag, locale) : " ");
- }
-
- operation.setTags(list);
- }else {
- operation.setTags(null);
- }
-
- operation.setSummary(from.getSummary());
- Set<String> set1 = from.getConsumes();
- if (set1 != null) {
- operation.setConsumes(new ArrayList<String>(set1));
- } else {
- operation.setConsumes(null);
- }
-
- Set<String> set2 = from.getProduces();
- if (set2 != null) {
- operation.setProduces(new ArrayList<String>(set2));
- } else {
- operation.setProduces(null);
- }
-
-
- operation.setParameters(parameterListToParameterList(from.getParameters()));
- if (from.getDeprecated() != null) {
- operation.setDeprecated(Boolean.parseBoolean(from.getDeprecated()));
- }
-
- return operation;
- }
-
- @Override
- protected Tag mapTag(springfox.documentation.service.Tag from) {
-
- if (from == null) {
- return null;
- }
-
- Locale locale = LocaleContextHolder.getLocale();
-
- Tag tag = new Tag();
-
- tag.setVendorExtensions(vendorExtensionsMapper.mapExtensions(from.getVendorExtensions()));
- tag.setName(messageSource.getMessage(from.getName(), null, from.getName(), locale));
- tag.setDescription(from.getDescription());
-
- return tag;
- }
-
-
- private ApiInfo fromResourceListingInfo(Documentation documentation) {
-
- if (documentation == null) {
- return null;
- }
- ResourceListing resourceListing = documentation.getResourceListing();
- if (resourceListing == null) {
- return null;
- }
- return resourceListing.getInfo();
- }
-
- protected List<Tag> tagSetToTagList(Set<springfox.documentation.service.Tag> set) {
-
- if (set == null) {
- return null;
- }
-
- List<Tag> list = new ArrayList<Tag>(set.size());
- for (springfox.documentation.service.Tag tag : set) {
- list.add(mapTag(tag));
- }
-
- return list;
- }
-
- protected List<Scheme> stringSetToSchemeList(Set<String> set) {
- if (set == null) {
- return null;
- }
-
- List<Scheme> list = new ArrayList<Scheme>(set.size());
- for (String string : set) {
- list.add(Enum.valueOf(Scheme.class, string));
- }
-
- return list;
- }
-
- protected List<Parameter> parameterListToParameterList(List<springfox.documentation.service.Parameter> list) {
- if (list == null) {
- return null;
- }
-
- List<Parameter> list1 = new ArrayList<Parameter>(list.size());
-
- Locale locale = LocaleContextHolder.getLocale();
-
- for (springfox.documentation.service.Parameter param : list) {
- String description = messageSource.getMessage(param.getDescription(), null, param.getDescription(), locale);
-
- springfox.documentation.service.Parameter parameter = new springfox.documentation.service.Parameter(param.getName(),description,param.getDefaultValue(),param.isRequired(),param.isAllowMultiple(),param.isAllowEmptyValue(),param.getModelRef(),param.getType(),param.getAllowableValues(),param.getParamType(),param.getParamAccess(),param.isHidden(),param.getPattern(),param.getCollectionFormat(),param.getOrder(),param.getScalarExample(),param.getExamples() ,param.getVendorExtentions());
- list1.add(parameterMapper.mapParameter(parameter));
- }
-
- return list1;
- }
-
-
- Map<String, Model> modelsFromApiListings(Multimap<String, ApiListing> apiListings) {
- Map<String, springfox.documentation.schema.Model> definitions = newTreeMap();
- for (ApiListing each : apiListings.values()) {
- definitions.putAll(each.getModels());
- }
- return modelMapper.mapModels(definitions);
- }
-
-}
diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/AccessTokenController.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/AccessTokenController.java
index b08f387304..477b747d44 100644
--- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/AccessTokenController.java
+++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/AccessTokenController.java
@@ -32,6 +32,8 @@ import org.apache.dolphinscheduler.common.Constants;
import org.apache.dolphinscheduler.common.utils.ParameterUtils;
import org.apache.dolphinscheduler.dao.entity.User;
+import springfox.documentation.annotations.ApiIgnore;
+
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
@@ -51,8 +53,6 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
-import springfox.documentation.annotations.ApiIgnore;
-
/**
* access token controller
@@ -76,9 +76,9 @@ public class AccessTokenController extends BaseController {
*/
@ApiOperation(value = "createToken", notes = "CREATE_TOKEN_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "userId", value = "USER_ID", required = true, dataType = "Int"),
- @ApiImplicitParam(name = "expireTime", value = "EXPIRE_TIME", required = true, dataType = "String", example = "2021-12-31 00:00:00"),
- @ApiImplicitParam(name = "token", value = "TOKEN", required = false, dataType = "String", example = "xxxx")
+ @ApiImplicitParam(name = "userId", value = "USER_ID", required = true, dataTypeClass = int.class),
+ @ApiImplicitParam(name = "expireTime", value = "EXPIRE_TIME", required = true, dataTypeClass = String.class, example = "2021-12-31 00:00:00"),
+ @ApiImplicitParam(name = "token", value = "TOKEN", required = false, dataTypeClass = String.class, example = "xxxx")
})
@PostMapping()
@ResponseStatus(HttpStatus.CREATED)
@@ -123,9 +123,9 @@ public class AccessTokenController extends BaseController {
*/
@ApiOperation(value = "queryAccessTokenList", notes = "QUERY_ACCESS_TOKEN_LIST_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "searchVal", value = "SEARCH_VAL", dataType = "String"),
- @ApiImplicitParam(name = "pageNo", value = "PAGE_NO", required = true, dataType = "Int", example = "1"),
- @ApiImplicitParam(name = "pageSize", value = "PAGE_SIZE", required = true, dataType = "Int", example = "20")
+ @ApiImplicitParam(name = "searchVal", value = "SEARCH_VAL", dataTypeClass = String.class),
+ @ApiImplicitParam(name = "pageNo", value = "PAGE_NO", required = true, dataTypeClass = int.class, example = "1"),
+ @ApiImplicitParam(name = "pageSize", value = "PAGE_SIZE", required = true, dataTypeClass = int.class, example = "20")
})
@GetMapping()
@ResponseStatus(HttpStatus.OK)
@@ -154,14 +154,14 @@ public class AccessTokenController extends BaseController {
*/
@ApiOperation(value = "queryAccessTokenByUser", notes = "QUERY_ACCESS_TOKEN_BY_USER_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "userId", value = "USER_ID", dataType = "Int")
+ @ApiImplicitParam(name = "userId", value = "USER_ID", dataTypeClass = int.class)
})
@GetMapping(value = "/user/{userId}")
@ResponseStatus(HttpStatus.OK)
@ApiException(QUERY_ACCESSTOKEN_BY_USER_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
public Result queryAccessTokenByUser(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
- @PathVariable("userId") Integer userId) {
+ @PathVariable("userId") Integer userId) {
Map<String, Object> result = this.accessTokenService.queryAccessTokenByUser(loginUser, userId);
return this.returnDataList(result);
}
@@ -184,7 +184,6 @@ public class AccessTokenController extends BaseController {
return returnDataList(result);
}
-
/**
* update token
*
@@ -197,10 +196,10 @@ public class AccessTokenController extends BaseController {
*/
@ApiOperation(value = "updateToken", notes = "UPDATE_TOKEN_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "id", value = "TOKEN_ID", required = true, dataType = "Int"),
- @ApiImplicitParam(name = "userId", value = "USER_ID", required = true, dataType = "Int"),
- @ApiImplicitParam(name = "expireTime", value = "EXPIRE_TIME", required = true, dataType = "String", example = "2021-12-31 00:00:00"),
- @ApiImplicitParam(name = "token", value = "TOKEN", required = false, dataType = "String", example = "xxxx")
+ @ApiImplicitParam(name = "id", value = "TOKEN_ID", required = true, dataTypeClass = int.class),
+ @ApiImplicitParam(name = "userId", value = "USER_ID", required = true, dataTypeClass = int.class),
+ @ApiImplicitParam(name = "expireTime", value = "EXPIRE_TIME", required = true, dataTypeClass = String.class, example = "2021-12-31 00:00:00"),
+ @ApiImplicitParam(name = "token", value = "TOKEN", required = false, dataTypeClass = String.class, example = "xxxx")
})
@PutMapping(value = "/{id}")
@ResponseStatus(HttpStatus.OK)
diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/AccessTokenV2Controller.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/AccessTokenV2Controller.java
index 77d05121fb..ee3f3c4b1c 100644
--- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/AccessTokenV2Controller.java
+++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/AccessTokenV2Controller.java
@@ -17,8 +17,7 @@
package org.apache.dolphinscheduler.api.controller;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
+import static org.apache.dolphinscheduler.api.enums.Status.CREATE_ACCESS_TOKEN_ERROR;
import org.apache.dolphinscheduler.api.aspect.AccessLogAnnotation;
import org.apache.dolphinscheduler.api.dto.CreateTokenRequest;
@@ -29,6 +28,8 @@ import org.apache.dolphinscheduler.api.utils.Result;
import org.apache.dolphinscheduler.common.Constants;
import org.apache.dolphinscheduler.dao.entity.User;
+import springfox.documentation.annotations.ApiIgnore;
+
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.PostMapping;
@@ -38,9 +39,9 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;
-import springfox.documentation.annotations.ApiIgnore;
-
-import static org.apache.dolphinscheduler.api.enums.Status.CREATE_ACCESS_TOKEN_ERROR;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiOperation;
/**
* access token controller
@@ -60,9 +61,10 @@ public class AccessTokenV2Controller extends BaseController {
* @param createTokenRequest createTokenRequest
* @return CreateTokenResponse CreateTokenResponse
*/
- @ApiOperation(value = "createToken", notes = "CREATE_TOKEN_NOTES")
+ @ApiOperation(value = "createTokenV2", notes = "CREATE_TOKEN_V2")
@PostMapping(consumes = {"application/json"})
@ResponseStatus(HttpStatus.CREATED)
+ @ApiImplicitParam(name = "createTokenRequest", value = "createTokenRequest", required = true, dataTypeClass = CreateTokenRequest.class)
@ApiException(CREATE_ACCESS_TOKEN_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
public CreateTokenResponse createToken(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/AlertGroupController.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/AlertGroupController.java
index d78561991f..b9473ecadb 100644
--- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/AlertGroupController.java
+++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/AlertGroupController.java
@@ -33,6 +33,8 @@ import org.apache.dolphinscheduler.common.Constants;
import org.apache.dolphinscheduler.common.utils.ParameterUtils;
import org.apache.dolphinscheduler.dao.entity.User;
+import springfox.documentation.annotations.ApiIgnore;
+
import java.util.Map;
import org.slf4j.Logger;
@@ -54,7 +56,6 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
-import springfox.documentation.annotations.ApiIgnore;
/**
* alert group controller
@@ -69,7 +70,6 @@ public class AlertGroupController extends BaseController {
@Autowired
private AlertGroupService alertGroupService;
-
/**
* create alert group
*
@@ -80,9 +80,9 @@ public class AlertGroupController extends BaseController {
*/
@ApiOperation(value = "createAlertgroup", notes = "CREATE_ALERT_GROUP_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "groupName", value = "GROUP_NAME", required = true, dataType = "String"),
- @ApiImplicitParam(name = "description", value = "DESC", dataType = "String"),
- @ApiImplicitParam(name = "alertInstanceIds", value = "alertInstanceIds", required = true, dataType = "String")
+ @ApiImplicitParam(name = "groupName", value = "GROUP_NAME", required = true, dataTypeClass = String.class),
+ @ApiImplicitParam(name = "description", value = "DESC", dataTypeClass = String.class),
+ @ApiImplicitParam(name = "alertInstanceIds", value = "alertInstanceIds", required = true, dataTypeClass = String.class)
})
@PostMapping()
@ResponseStatus(HttpStatus.CREATED)
@@ -92,7 +92,8 @@ public class AlertGroupController extends BaseController {
@RequestParam(value = "groupName") String groupName,
@RequestParam(value = "description", required = false) String description,
@RequestParam(value = "alertInstanceIds") String alertInstanceIds) {
- Map<String, Object> result = alertGroupService.createAlertgroup(loginUser, groupName, description, alertInstanceIds);
+ Map<String, Object> result =
+ alertGroupService.createAlertgroup(loginUser, groupName, description, alertInstanceIds);
return returnDataList(result);
}
@@ -124,9 +125,9 @@ public class AlertGroupController extends BaseController {
*/
@ApiOperation(value = "queryAlertGroupListPaging", notes = "QUERY_ALERT_GROUP_LIST_PAGING_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "searchVal", value = "SEARCH_VAL", type = "String"),
- @ApiImplicitParam(name = "pageNo", value = "PAGE_NO", required = true, dataType = "Int", example = "1"),
- @ApiImplicitParam(name = "pageSize", value = "PAGE_SIZE", required = true, dataType = "Int", example = "20")
+ @ApiImplicitParam(name = "searchVal", value = "SEARCH_VAL", dataTypeClass = String.class),
+ @ApiImplicitParam(name = "pageNo", value = "PAGE_NO", required = true, dataTypeClass = int.class, example = "1"),
+ @ApiImplicitParam(name = "pageSize", value = "PAGE_SIZE", required = true, dataTypeClass = int.class, example = "20")
})
@GetMapping()
@ResponseStatus(HttpStatus.OK)
@@ -152,7 +153,8 @@ public class AlertGroupController extends BaseController {
*/
@ApiOperation(value = "queryAlertGroupById", notes = "QUERY_ALERT_GROUP_BY_ID_NOTES")
- @ApiImplicitParams({@ApiImplicitParam(name = "id", value = "ALERT_GROUP_ID", dataType = "Int", example = "1")
+ @ApiImplicitParams({
+ @ApiImplicitParam(name = "id", value = "ALERT_GROUP_ID", dataTypeClass = int.class, example = "1")
})
@PostMapping(value = "/query")
@ResponseStatus(HttpStatus.OK)
@@ -165,8 +167,6 @@ public class AlertGroupController extends BaseController {
return returnDataList(result);
}
-
-
/**
* updateProcessInstance alert group
*
@@ -178,10 +178,10 @@ public class AlertGroupController extends BaseController {
*/
@ApiOperation(value = "updateAlertgroup", notes = "UPDATE_ALERT_GROUP_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "id", value = "ALERT_GROUP_ID", required = true, dataType = "Int", example = "100"),
- @ApiImplicitParam(name = "groupName", value = "GROUP_NAME", required = true, dataType = "String"),
- @ApiImplicitParam(name = "description", value = "DESC", dataType = "String"),
- @ApiImplicitParam(name = "alertInstanceIds", value = "alertInstanceIds", required = true, dataType = "String")
+ @ApiImplicitParam(name = "id", value = "ALERT_GROUP_ID", required = true, dataTypeClass = int.class, example = "100"),
+ @ApiImplicitParam(name = "groupName", value = "GROUP_NAME", required = true, dataTypeClass = String.class),
+ @ApiImplicitParam(name = "description", value = "DESC", dataTypeClass = String.class),
+ @ApiImplicitParam(name = "alertInstanceIds", value = "alertInstanceIds", required = true, dataTypeClass = String.class)
})
@PutMapping(value = "/{id}")
@ResponseStatus(HttpStatus.OK)
@@ -193,7 +193,8 @@ public class AlertGroupController extends BaseController {
@RequestParam(value = "description", required = false) String description,
@RequestParam(value = "alertInstanceIds") String alertInstanceIds) {
- Map<String, Object> result = alertGroupService.updateAlertgroup(loginUser, id, groupName, description, alertInstanceIds);
+ Map<String, Object> result =
+ alertGroupService.updateAlertgroup(loginUser, id, groupName, description, alertInstanceIds);
return returnDataList(result);
}
@@ -206,7 +207,7 @@ public class AlertGroupController extends BaseController {
*/
@ApiOperation(value = "delAlertgroupById", notes = "DELETE_ALERT_GROUP_BY_ID_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "id", value = "ALERT_GROUP_ID", required = true, dataType = "Int", example = "100")
+ @ApiImplicitParam(name = "id", value = "ALERT_GROUP_ID", required = true, dataTypeClass = int.class, example = "100")
})
@DeleteMapping(value = "/{id}")
@ResponseStatus(HttpStatus.OK)
@@ -218,7 +219,6 @@ public class AlertGroupController extends BaseController {
return returnDataList(result);
}
-
/**
* check alert group exist
*
@@ -228,7 +228,7 @@ public class AlertGroupController extends BaseController {
*/
@ApiOperation(value = "verifyGroupName", notes = "VERIFY_ALERT_GROUP_NAME_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "groupName", value = "GROUP_NAME", required = true, dataType = "String"),
+ @ApiImplicitParam(name = "groupName", value = "GROUP_NAME", required = true, dataTypeClass = String.class),
})
@GetMapping(value = "/verify-name")
@ResponseStatus(HttpStatus.OK)
diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/AlertPluginInstanceController.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/AlertPluginInstanceController.java
index 4da9563561..bfe340f38d 100644
--- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/AlertPluginInstanceController.java
+++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/AlertPluginInstanceController.java
@@ -33,6 +33,8 @@ import org.apache.dolphinscheduler.common.Constants;
import org.apache.dolphinscheduler.common.utils.ParameterUtils;
import org.apache.dolphinscheduler.dao.entity.User;
+import springfox.documentation.annotations.ApiIgnore;
+
import java.util.Map;
import org.slf4j.Logger;
@@ -54,7 +56,6 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
-import springfox.documentation.annotations.ApiIgnore;
/**
* alert plugin instance controller
@@ -69,7 +70,6 @@ public class AlertPluginInstanceController extends BaseController {
@Autowired
private AlertPluginInstanceService alertPluginInstanceService;
-
/**
* create alert plugin instance
*
@@ -81,9 +81,9 @@ public class AlertPluginInstanceController extends BaseController {
*/
@ApiOperation(value = "createAlertPluginInstance", notes = "CREATE_ALERT_PLUGIN_INSTANCE_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "pluginDefineId", value = "ALERT_PLUGIN_DEFINE_ID", required = true, dataType = "Int", example = "100"),
- @ApiImplicitParam(name = "instanceName", value = "ALERT_PLUGIN_INSTANCE_NAME", required = true, dataType = "String", example = "DING TALK"),
- @ApiImplicitParam(name = "pluginInstanceParams", value = "ALERT_PLUGIN_INSTANCE_PARAMS", required = true, dataType = "String", example = "ALERT_PLUGIN_INSTANCE_PARAMS")
+ @ApiImplicitParam(name = "pluginDefineId", value = "ALERT_PLUGIN_DEFINE_ID", required = true, dataTypeClass = int.class, example = "100"),
+ @ApiImplicitParam(name = "instanceName", value = "ALERT_PLUGIN_INSTANCE_NAME", required = true, dataTypeClass = String.class, example = "DING TALK"),
+ @ApiImplicitParam(name = "pluginInstanceParams", value = "ALERT_PLUGIN_INSTANCE_PARAMS", required = true, dataTypeClass = String.class, example = "ALERT_PLUGIN_INSTANCE_PARAMS")
})
@PostMapping()
@ResponseStatus(HttpStatus.CREATED)
@@ -93,7 +93,8 @@ public class AlertPluginInstanceController extends BaseController {
@RequestParam(value = "pluginDefineId") int pluginDefineId,
@RequestParam(value = "instanceName") String instanceName,
@RequestParam(value = "pluginInstanceParams") String pluginInstanceParams) {
- Map<String, Object> result = alertPluginInstanceService.create(loginUser, pluginDefineId, instanceName, pluginInstanceParams);
+ Map<String, Object> result =
+ alertPluginInstanceService.create(loginUser, pluginDefineId, instanceName, pluginInstanceParams);
return returnDataList(result);
}
@@ -108,9 +109,9 @@ public class AlertPluginInstanceController extends BaseController {
*/
@ApiOperation(value = "updateAlertPluginInstance", notes = "UPDATE_ALERT_PLUGIN_INSTANCE_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "alertPluginInstanceId", value = "ALERT_PLUGIN_INSTANCE_ID", required = true, dataType = "Int", example = "100"),
- @ApiImplicitParam(name = "instanceName", value = "ALERT_PLUGIN_INSTANCE_NAME", required = true, dataType = "String", example = "DING TALK"),
- @ApiImplicitParam(name = "pluginInstanceParams", value = "ALERT_PLUGIN_INSTANCE_PARAMS", required = true, dataType = "String", example = "ALERT_PLUGIN_INSTANCE_PARAMS")
+ @ApiImplicitParam(name = "alertPluginInstanceId", value = "ALERT_PLUGIN_INSTANCE_ID", required = true, dataTypeClass = int.class, example = "100"),
+ @ApiImplicitParam(name = "instanceName", value = "ALERT_PLUGIN_INSTANCE_NAME", required = true, dataTypeClass = String.class, example = "DING TALK"),
+ @ApiImplicitParam(name = "pluginInstanceParams", value = "ALERT_PLUGIN_INSTANCE_PARAMS", required = true, dataTypeClass = String.class, example = "ALERT_PLUGIN_INSTANCE_PARAMS")
})
@PutMapping(value = "/{id}")
@ResponseStatus(HttpStatus.OK)
@@ -120,7 +121,8 @@ public class AlertPluginInstanceController extends BaseController {
@PathVariable(value = "id") int id,
@RequestParam(value = "instanceName") String instanceName,
@RequestParam(value = "pluginInstanceParams") String pluginInstanceParams) {
- Map<String, Object> result = alertPluginInstanceService.update(loginUser, id, instanceName, pluginInstanceParams);
+ Map<String, Object> result =
+ alertPluginInstanceService.update(loginUser, id, instanceName, pluginInstanceParams);
return returnDataList(result);
}
@@ -133,7 +135,7 @@ public class AlertPluginInstanceController extends BaseController {
*/
@ApiOperation(value = "deleteAlertPluginInstance", notes = "DELETE_ALERT_PLUGIN_INSTANCE_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "id", value = "ALERT_PLUGIN_ID", required = true, dataType = "Int", example = "100")
+ @ApiImplicitParam(name = "id", value = "ALERT_PLUGIN_ID", required = true, dataTypeClass = int.class, example = "100")
})
@DeleteMapping(value = "/{id}")
@ResponseStatus(HttpStatus.OK)
@@ -189,7 +191,7 @@ public class AlertPluginInstanceController extends BaseController {
*/
@ApiOperation(value = "verifyAlertInstanceName", notes = "VERIFY_ALERT_INSTANCE_NAME_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "alertInstanceName", value = "ALERT_INSTANCE_NAME", required = true, dataType = "String"),
+ @ApiImplicitParam(name = "alertInstanceName", value = "ALERT_INSTANCE_NAME", required = true, dataTypeClass = String.class),
})
@GetMapping(value = "/verify-name")
@ResponseStatus(HttpStatus.OK)
@@ -217,9 +219,9 @@ public class AlertPluginInstanceController extends BaseController {
*/
@ApiOperation(value = "queryAlertPluginInstanceListPaging", notes = "QUERY_ALERT_PLUGIN_INSTANCE_LIST_PAGING_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "searchVal", value = "SEARCH_VAL", type = "String"),
- @ApiImplicitParam(name = "pageNo", value = "PAGE_NO", required = true, dataType = "Int", example = "1"),
- @ApiImplicitParam(name = "pageSize", value = "PAGE_SIZE", required = true, dataType = "Int", example = "20")
+ @ApiImplicitParam(name = "searchVal", value = "SEARCH_VAL", dataTypeClass = String.class),
+ @ApiImplicitParam(name = "pageNo", value = "PAGE_NO", required = true, dataTypeClass = int.class, example = "1"),
+ @ApiImplicitParam(name = "pageSize", value = "PAGE_SIZE", required = true, dataTypeClass = int.class, example = "20")
})
@GetMapping()
@ResponseStatus(HttpStatus.OK)
diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/AuditLogController.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/AuditLogController.java
index fc04e2ada0..4af94c8e7b 100644
--- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/AuditLogController.java
+++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/AuditLogController.java
@@ -28,6 +28,8 @@ import org.apache.dolphinscheduler.common.enums.AuditOperationType;
import org.apache.dolphinscheduler.common.enums.AuditResourceType;
import org.apache.dolphinscheduler.dao.entity.User;
+import springfox.documentation.annotations.ApiIgnore;
+
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.GetMapping;
@@ -41,7 +43,6 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
-import springfox.documentation.annotations.ApiIgnore;
@Api(tags = "AUDIT_LOG_TAG")
@RestController
@@ -66,13 +67,13 @@ public class AuditLogController extends BaseController {
*/
@ApiOperation(value = "queryAuditLogListPaging", notes = "QUERY_AUDIT_LOG")
@ApiImplicitParams({
- @ApiImplicitParam(name = "startDate", value = "START_DATE", type = "String"),
- @ApiImplicitParam(name = "endDate", value = "END_DATE", type = "String"),
- @ApiImplicitParam(name = "resourceType", value = "RESOURCE_TYPE", type = "AuditResourceType"),
- @ApiImplicitParam(name = "operationType", value = "OPERATION_TYPE", type = "AuditOperationType"),
- @ApiImplicitParam(name = "userName", value = "USER_NAME", type = "String"),
- @ApiImplicitParam(name = "pageNo", value = "PAGE_NO", required = true, dataType = "Int", example = "1"),
- @ApiImplicitParam(name = "pageSize", value = "PAGE_SIZE", required = true, dataType = "Int", example = "20")
+ @ApiImplicitParam(name = "startDate", value = "START_DATE", dataTypeClass = String.class),
+ @ApiImplicitParam(name = "endDate", value = "END_DATE", dataTypeClass = String.class),
+ @ApiImplicitParam(name = "resourceType", value = "RESOURCE_TYPE", dataTypeClass = AuditResourceType.class),
+ @ApiImplicitParam(name = "operationType", value = "OPERATION_TYPE", dataTypeClass = AuditOperationType.class),
+ @ApiImplicitParam(name = "userName", value = "USER_NAME", dataTypeClass = String.class),
+ @ApiImplicitParam(name = "pageNo", value = "PAGE_NO", required = true, dataTypeClass = int.class, example = "1"),
+ @ApiImplicitParam(name = "pageSize", value = "PAGE_SIZE", required = true, dataTypeClass = int.class, example = "20")
})
@GetMapping(value = "/audit-log-list")
@ResponseStatus(HttpStatus.OK)
@@ -90,7 +91,8 @@ public class AuditLogController extends BaseController {
if (!result.checkResult()) {
return result;
}
- result = auditService.queryLogListPaging(loginUser, resourceType, operationType, startDate, endDate, userName, pageNo, pageSize);
+ result = auditService.queryLogListPaging(loginUser, resourceType, operationType, startDate, endDate, userName,
+ pageNo, pageSize);
return result;
}
}
diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ClusterController.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ClusterController.java
index 311dd780e7..8fedd7b3d1 100644
--- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ClusterController.java
+++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ClusterController.java
@@ -32,6 +32,8 @@ import org.apache.dolphinscheduler.common.Constants;
import org.apache.dolphinscheduler.common.utils.ParameterUtils;
import org.apache.dolphinscheduler.dao.entity.User;
+import springfox.documentation.annotations.ApiIgnore;
+
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
@@ -48,7 +50,6 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
-import springfox.documentation.annotations.ApiIgnore;
/**
* cluster controller
@@ -72,9 +73,9 @@ public class ClusterController extends BaseController {
*/
@ApiOperation(value = "createCluster", notes = "CREATE_CLUSTER_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "name", value = "CLUSTER_NAME", required = true, dataType = "String"),
- @ApiImplicitParam(name = "config", value = "CONFIG", required = true, dataType = "String"),
- @ApiImplicitParam(name = "description", value = "CLUSTER_DESC", dataType = "String")
+ @ApiImplicitParam(name = "name", value = "CLUSTER_NAME", required = true, dataTypeClass = String.class),
+ @ApiImplicitParam(name = "config", value = "CONFIG", required = true, dataTypeClass = String.class),
+ @ApiImplicitParam(name = "description", value = "CLUSTER_DESC", dataTypeClass = String.class)
})
@PostMapping(value = "/create")
@ResponseStatus(HttpStatus.CREATED)
@@ -101,10 +102,10 @@ public class ClusterController extends BaseController {
*/
@ApiOperation(value = "updateCluster", notes = "UPDATE_CLUSTER_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "code", value = "CLUSTER_CODE", required = true, dataType = "Long", example = "100"),
- @ApiImplicitParam(name = "name", value = "CLUSTER_NAME", required = true, dataType = "String"),
- @ApiImplicitParam(name = "config", value = "CLUSTER_CONFIG", required = true, dataType = "String"),
- @ApiImplicitParam(name = "description", value = "CLUSTER_DESC", dataType = "String"),
+ @ApiImplicitParam(name = "code", value = "CLUSTER_CODE", required = true, dataTypeClass = long.class, example = "100"),
+ @ApiImplicitParam(name = "name", value = "CLUSTER_NAME", required = true, dataTypeClass = String.class),
+ @ApiImplicitParam(name = "config", value = "CLUSTER_CONFIG", required = true, dataTypeClass = String.class),
+ @ApiImplicitParam(name = "description", value = "CLUSTER_DESC", dataTypeClass = String.class),
})
@PostMapping(value = "/update")
@ResponseStatus(HttpStatus.OK)
@@ -127,7 +128,7 @@ public class ClusterController extends BaseController {
*/
@ApiOperation(value = "queryClusterByCode", notes = "QUERY_CLUSTER_BY_CODE_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "clusterCode", value = "CLUSTER_CODE", required = true, dataType = "Long", example = "100")
+ @ApiImplicitParam(name = "clusterCode", value = "CLUSTER_CODE", required = true, dataTypeClass = long.class, example = "100")
})
@GetMapping(value = "/query-by-code")
@ResponseStatus(HttpStatus.OK)
@@ -150,9 +151,9 @@ public class ClusterController extends BaseController {
*/
@ApiOperation(value = "queryClusterListPaging", notes = "QUERY_CLUSTER_LIST_PAGING_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "searchVal", value = "SEARCH_VAL", dataType = "String"),
- @ApiImplicitParam(name = "pageSize", value = "PAGE_SIZE", required = true, dataType = "Int", example = "20"),
- @ApiImplicitParam(name = "pageNo", value = "PAGE_NO", required = true, dataType = "Int", example = "1")
+ @ApiImplicitParam(name = "searchVal", value = "SEARCH_VAL", dataTypeClass = String.class),
+ @ApiImplicitParam(name = "pageSize", value = "PAGE_SIZE", required = true, dataTypeClass = int.class, example = "20"),
+ @ApiImplicitParam(name = "pageNo", value = "PAGE_NO", required = true, dataTypeClass = int.class, example = "1")
})
@GetMapping(value = "/list-paging")
@ResponseStatus(HttpStatus.OK)
@@ -161,8 +162,7 @@ public class ClusterController extends BaseController {
public Result queryClusterListPaging(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@RequestParam(value = "searchVal", required = false) String searchVal,
@RequestParam("pageSize") Integer pageSize,
- @RequestParam("pageNo") Integer pageNo
- ) {
+ @RequestParam("pageNo") Integer pageNo) {
Result result = checkPageParams(pageNo, pageSize);
if (!result.checkResult()) {
@@ -182,15 +182,14 @@ public class ClusterController extends BaseController {
*/
@ApiOperation(value = "deleteClusterByCode", notes = "DELETE_CLUSTER_BY_CODE_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "clusterCode", value = "CLUSTER_CODE", required = true, dataType = "Long", example = "100")
+ @ApiImplicitParam(name = "clusterCode", value = "CLUSTER_CODE", required = true, dataTypeClass = long.class, example = "100")
})
@PostMapping(value = "/delete")
@ResponseStatus(HttpStatus.OK)
@ApiException(DELETE_CLUSTER_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
public Result deleteCluster(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
- @RequestParam("clusterCode") Long clusterCode
- ) {
+ @RequestParam("clusterCode") Long clusterCode) {
Map<String, Object> result = clusterService.deleteClusterByCode(loginUser, clusterCode);
return returnDataList(result);
@@ -221,15 +220,14 @@ public class ClusterController extends BaseController {
*/
@ApiOperation(value = "verifyCluster", notes = "VERIFY_CLUSTER_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "clusterName", value = "CLUSTER_NAME", required = true, dataType = "String")
+ @ApiImplicitParam(name = "clusterName", value = "CLUSTER_NAME", required = true, dataTypeClass = String.class)
})
@PostMapping(value = "/verify-cluster")
@ResponseStatus(HttpStatus.OK)
@ApiException(VERIFY_CLUSTER_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
public Result verifyCluster(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
- @RequestParam(value = "clusterName") String clusterName
- ) {
+ @RequestParam(value = "clusterName") String clusterName) {
Map<String, Object> result = clusterService.verifyCluster(clusterName);
return returnDataList(result);
}
diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/DataAnalysisController.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/DataAnalysisController.java
index 326c7f44b4..f4cd5f8093 100644
--- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/DataAnalysisController.java
+++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/DataAnalysisController.java
@@ -30,6 +30,8 @@ import org.apache.dolphinscheduler.api.utils.Result;
import org.apache.dolphinscheduler.common.Constants;
import org.apache.dolphinscheduler.dao.entity.User;
+import springfox.documentation.annotations.ApiIgnore;
+
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
@@ -45,7 +47,6 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
-import springfox.documentation.annotations.ApiIgnore;
/**
* data analysis controller
@@ -69,9 +70,9 @@ public class DataAnalysisController extends BaseController {
*/
@ApiOperation(value = "countTaskState", notes = "COUNT_TASK_STATE_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "startDate", value = "START_DATE", dataType = "String"),
- @ApiImplicitParam(name = "endDate", value = "END_DATE", dataType = "String"),
- @ApiImplicitParam(name = "projectCode", value = "PROJECT_CODE", dataType = "Long", example = "100")
+ @ApiImplicitParam(name = "startDate", value = "START_DATE", dataTypeClass = String.class),
+ @ApiImplicitParam(name = "endDate", value = "END_DATE", dataTypeClass = String.class),
+ @ApiImplicitParam(name = "projectCode", value = "PROJECT_CODE", dataTypeClass = long.class, example = "100")
})
@GetMapping(value = "/task-state-count")
@ResponseStatus(HttpStatus.OK)
@@ -82,7 +83,8 @@ public class DataAnalysisController extends BaseController {
@RequestParam(value = "endDate", required = false) String endDate,
@RequestParam(value = "projectCode", required = false, defaultValue = "0") long projectCode) {
- Map<String, Object> result = dataAnalysisService.countTaskStateByProject(loginUser, projectCode, startDate, endDate);
+ Map<String, Object> result =
+ dataAnalysisService.countTaskStateByProject(loginUser, projectCode, startDate, endDate);
return returnDataList(result);
}
@@ -97,9 +99,9 @@ public class DataAnalysisController extends BaseController {
*/
@ApiOperation(value = "countProcessInstanceState", notes = "COUNT_PROCESS_INSTANCE_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "startDate", value = "START_DATE", dataType = "String"),
- @ApiImplicitParam(name = "endDate", value = "END_DATE", dataType = "String"),
- @ApiImplicitParam(name = "projectCode", value = "PROJECT_CODE", dataType = "Long", example = "100")
+ @ApiImplicitParam(name = "startDate", value = "START_DATE", dataTypeClass = String.class),
+ @ApiImplicitParam(name = "endDate", value = "END_DATE", dataTypeClass = String.class),
+ @ApiImplicitParam(name = "projectCode", value = "PROJECT_CODE", dataTypeClass = long.class, example = "100")
})
@GetMapping(value = "/process-state-count")
@ResponseStatus(HttpStatus.OK)
@@ -110,7 +112,8 @@ public class DataAnalysisController extends BaseController {
@RequestParam(value = "endDate", required = false) String endDate,
@RequestParam(value = "projectCode", required = false, defaultValue = "0") long projectCode) {
- Map<String, Object> result = dataAnalysisService.countProcessInstanceStateByProject(loginUser, projectCode, startDate, endDate);
+ Map<String, Object> result =
+ dataAnalysisService.countProcessInstanceStateByProject(loginUser, projectCode, startDate, endDate);
return returnDataList(result);
}
@@ -123,7 +126,7 @@ public class DataAnalysisController extends BaseController {
*/
@ApiOperation(value = "countDefinitionByUser", notes = "COUNT_PROCESS_DEFINITION_BY_USER_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "projectCode", value = "PROJECT_CODE", dataType = "Long", example = "100")
+ @ApiImplicitParam(name = "projectCode", value = "PROJECT_CODE", dataTypeClass = long.class, example = "100")
})
@GetMapping(value = "/define-user-count")
@ResponseStatus(HttpStatus.OK)
diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/DataQualityController.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/DataQualityController.java
index 312d02fe23..4249412810 100644
--- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/DataQualityController.java
+++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/DataQualityController.java
@@ -31,6 +31,8 @@ import org.apache.dolphinscheduler.common.Constants;
import org.apache.dolphinscheduler.common.utils.ParameterUtils;
import org.apache.dolphinscheduler.dao.entity.User;
+import springfox.documentation.annotations.ApiIgnore;
+
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
@@ -46,7 +48,6 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
-import springfox.documentation.annotations.ApiIgnore;
/**
* data quality controller
@@ -69,7 +70,7 @@ public class DataQualityController extends BaseController {
*/
@ApiOperation(value = "getRuleFormCreateJson", notes = "GET_RULE_FORM_CREATE_JSON_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "ruleId", value = "RULE_ID", dataType = "Int", example = "1")
+ @ApiImplicitParam(name = "ruleId", value = "RULE_ID", dataTypeClass = int.class, example = "1")
})
@GetMapping(value = "/getRuleFormCreateJson")
@ResponseStatus(HttpStatus.OK)
@@ -90,12 +91,12 @@ public class DataQualityController extends BaseController {
*/
@ApiOperation(value = "queryRuleListPaging", notes = "QUERY_RULE_LIST_PAGING_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "searchVal", value = "SEARCH_VAL", type = "String"),
- @ApiImplicitParam(name = "ruleType", value = "RULE_TYPE", dataType = "Int", example = "1"),
- @ApiImplicitParam(name = "startDate", value = "START_DATE", type = "String"),
- @ApiImplicitParam(name = "endDate", value = "END_DATE", type = "String"),
- @ApiImplicitParam(name = "pageNo", value = "PAGE_NO", dataType = "Int", example = "1"),
- @ApiImplicitParam(name = "pageSize", value = "PAGE_SIZE", dataType = "Int", example = "10")
+ @ApiImplicitParam(name = "searchVal", value = "SEARCH_VAL", dataTypeClass = String.class),
+ @ApiImplicitParam(name = "ruleType", value = "RULE_TYPE", dataTypeClass = int.class, example = "1"),
+ @ApiImplicitParam(name = "startDate", value = "START_DATE", dataTypeClass = String.class),
+ @ApiImplicitParam(name = "endDate", value = "END_DATE", dataTypeClass = String.class),
+ @ApiImplicitParam(name = "pageNo", value = "PAGE_NO", dataTypeClass = int.class, example = "1"),
+ @ApiImplicitParam(name = "pageSize", value = "PAGE_SIZE", dataTypeClass = int.class, example = "10")
})
@GetMapping(value = "/rule/page")
@ResponseStatus(HttpStatus.OK)
@@ -144,25 +145,25 @@ public class DataQualityController extends BaseController {
*/
@ApiOperation(value = "queryExecuteResultListPaging", notes = "QUERY_EXECUTE_RESULT_LIST_PAGING_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "searchVal", value = "SEARCH_VAL", type = "String"),
- @ApiImplicitParam(name = "ruleType", value = "RULE_TYPE", dataType = "Int", example = "1"),
- @ApiImplicitParam(name = "state", value = "STATE", dataType = "Int", example = "1"),
- @ApiImplicitParam(name = "startDate", value = "START_DATE", type = "String"),
- @ApiImplicitParam(name = "endDate", value = "END_DATE", type = "String"),
- @ApiImplicitParam(name = "pageNo", value = "PAGE_NO", dataType = "Int", example = "1"),
- @ApiImplicitParam(name = "pageSize", value = "PAGE_SIZE", dataType = "Int", example = "10")
+ @ApiImplicitParam(name = "searchVal", value = "SEARCH_VAL", dataTypeClass = String.class),
+ @ApiImplicitParam(name = "ruleType", value = "RULE_TYPE", dataTypeClass = int.class, example = "1"),
+ @ApiImplicitParam(name = "state", value = "STATE", dataTypeClass = int.class, example = "1"),
+ @ApiImplicitParam(name = "startDate", value = "START_DATE", dataTypeClass = String.class),
+ @ApiImplicitParam(name = "endDate", value = "END_DATE", dataTypeClass = String.class),
+ @ApiImplicitParam(name = "pageNo", value = "PAGE_NO", dataTypeClass = int.class, example = "1"),
+ @ApiImplicitParam(name = "pageSize", value = "PAGE_SIZE", dataTypeClass = int.class, example = "10")
})
@GetMapping(value = "/result/page")
@ResponseStatus(HttpStatus.OK)
@ApiException(QUERY_EXECUTE_RESULT_LIST_PAGING_ERROR)
public Result queryExecuteResultListPaging(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
- @RequestParam(value = "searchVal", required = false) String searchVal,
- @RequestParam(value = "ruleType", required = false) Integer ruleType,
- @RequestParam(value = "state", required = false) Integer state,
- @RequestParam(value = "startDate", required = false) String startTime,
- @RequestParam(value = "endDate", required = false) String endTime,
- @RequestParam("pageNo") Integer pageNo,
- @RequestParam("pageSize") Integer pageSize) {
+ @RequestParam(value = "searchVal", required = false) String searchVal,
+ @RequestParam(value = "ruleType", required = false) Integer ruleType,
+ @RequestParam(value = "state", required = false) Integer state,
+ @RequestParam(value = "startDate", required = false) String startTime,
+ @RequestParam(value = "endDate", required = false) String endTime,
+ @RequestParam("pageNo") Integer pageNo,
+ @RequestParam("pageSize") Integer pageSize) {
Result result = checkPageParams(pageNo, pageSize);
if (!result.checkResult()) {
@@ -170,7 +171,8 @@ public class DataQualityController extends BaseController {
}
searchVal = ParameterUtils.handleEscapes(searchVal);
- return dqExecuteResultService.queryResultListPaging(loginUser, searchVal, state, ruleType, startTime, endTime, pageNo, pageSize);
+ return dqExecuteResultService.queryResultListPaging(loginUser, searchVal, state, ruleType, startTime, endTime,
+ pageNo, pageSize);
}
/**
@@ -180,7 +182,7 @@ public class DataQualityController extends BaseController {
*/
@ApiOperation(value = "getDatasourceOptionsById", notes = "GET_DATASOURCE_OPTIONS_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "datasourceId", value = "DATA_SOURCE_ID", dataType = "Int", example = "1")
+ @ApiImplicitParam(name = "datasourceId", value = "DATA_SOURCE_ID", dataTypeClass = int.class, example = "1")
})
@GetMapping(value = "/getDatasourceOptionsById")
@ResponseStatus(HttpStatus.OK)
diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/DataSourceController.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/DataSourceController.java
index 281f0ad66b..a68db21752 100644
--- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/DataSourceController.java
+++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/DataSourceController.java
@@ -17,11 +17,19 @@
package org.apache.dolphinscheduler.api.controller;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiImplicitParam;
-import io.swagger.annotations.ApiImplicitParams;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
+import static org.apache.dolphinscheduler.api.enums.Status.AUTHORIZED_DATA_SOURCE;
+import static org.apache.dolphinscheduler.api.enums.Status.CONNECTION_TEST_FAILURE;
+import static org.apache.dolphinscheduler.api.enums.Status.CONNECT_DATASOURCE_FAILURE;
+import static org.apache.dolphinscheduler.api.enums.Status.CREATE_DATASOURCE_ERROR;
+import static org.apache.dolphinscheduler.api.enums.Status.DELETE_DATA_SOURCE_FAILURE;
+import static org.apache.dolphinscheduler.api.enums.Status.GET_DATASOURCE_TABLES_ERROR;
+import static org.apache.dolphinscheduler.api.enums.Status.GET_DATASOURCE_TABLE_COLUMNS_ERROR;
+import static org.apache.dolphinscheduler.api.enums.Status.KERBEROS_STARTUP_STATE;
+import static org.apache.dolphinscheduler.api.enums.Status.QUERY_DATASOURCE_ERROR;
+import static org.apache.dolphinscheduler.api.enums.Status.UNAUTHORIZED_DATASOURCE;
+import static org.apache.dolphinscheduler.api.enums.Status.UPDATE_DATASOURCE_ERROR;
+import static org.apache.dolphinscheduler.api.enums.Status.VERIFY_DATASOURCE_NAME_FAILURE;
+
import org.apache.dolphinscheduler.api.aspect.AccessLogAnnotation;
import org.apache.dolphinscheduler.api.enums.Status;
import org.apache.dolphinscheduler.api.exceptions.ApiException;
@@ -35,6 +43,11 @@ import org.apache.dolphinscheduler.plugin.datasource.api.datasource.BaseDataSour
import org.apache.dolphinscheduler.plugin.datasource.api.utils.DataSourceUtils;
import org.apache.dolphinscheduler.spi.datasource.ConnectionParam;
import org.apache.dolphinscheduler.spi.enums.DbType;
+
+import springfox.documentation.annotations.ApiIgnore;
+
+import java.util.Map;
+
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.DeleteMapping;
@@ -48,22 +61,12 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;
-import springfox.documentation.annotations.ApiIgnore;
-
-import java.util.Map;
-import static org.apache.dolphinscheduler.api.enums.Status.AUTHORIZED_DATA_SOURCE;
-import static org.apache.dolphinscheduler.api.enums.Status.CONNECTION_TEST_FAILURE;
-import static org.apache.dolphinscheduler.api.enums.Status.CONNECT_DATASOURCE_FAILURE;
-import static org.apache.dolphinscheduler.api.enums.Status.CREATE_DATASOURCE_ERROR;
-import static org.apache.dolphinscheduler.api.enums.Status.DELETE_DATA_SOURCE_FAILURE;
-import static org.apache.dolphinscheduler.api.enums.Status.GET_DATASOURCE_TABLES_ERROR;
-import static org.apache.dolphinscheduler.api.enums.Status.GET_DATASOURCE_TABLE_COLUMNS_ERROR;
-import static org.apache.dolphinscheduler.api.enums.Status.KERBEROS_STARTUP_STATE;
-import static org.apache.dolphinscheduler.api.enums.Status.QUERY_DATASOURCE_ERROR;
-import static org.apache.dolphinscheduler.api.enums.Status.UNAUTHORIZED_DATASOURCE;
-import static org.apache.dolphinscheduler.api.enums.Status.UPDATE_DATASOURCE_ERROR;
-import static org.apache.dolphinscheduler.api.enums.Status.VERIFY_DATASOURCE_NAME_FAILURE;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
/**
* data source controller
@@ -90,8 +93,7 @@ public class DataSourceController extends BaseController {
@ApiException(CREATE_DATASOURCE_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
public Result createDataSource(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
- @ApiParam(name = "dataSourceParam", value = "DATA_SOURCE_PARAM", required = true)
- @RequestBody String jsonStr) {
+ @ApiParam(name = "dataSourceParam", value = "DATA_SOURCE_PARAM", required = true) @RequestBody String jsonStr) {
BaseDataSourceParamDTO dataSourceParam = DataSourceUtils.buildDatasourceParam(jsonStr);
return dataSourceService.createDataSource(loginUser, dataSourceParam);
}
@@ -107,8 +109,8 @@ public class DataSourceController extends BaseController {
*/
@ApiOperation(value = "updateDataSource", notes = "UPDATE_DATA_SOURCE_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "id", value = "DATA_SOURCE_ID", required = true, dataType = "Integer"),
- @ApiImplicitParam(name = "dataSourceParam", value = "DATA_SOURCE_PARAM", required = true, dataType = "BaseDataSourceParamDTO")
+ @ApiImplicitParam(name = "id", value = "DATA_SOURCE_ID", required = true, dataTypeClass = int.class),
+ @ApiImplicitParam(name = "dataSourceParam", value = "DATA_SOURCE_PARAM", required = true, dataTypeClass = BaseDataSourceParamDTO.class)
})
@PutMapping(value = "/{id}")
@ResponseStatus(HttpStatus.OK)
@@ -131,7 +133,7 @@ public class DataSourceController extends BaseController {
*/
@ApiOperation(value = "queryDataSource", notes = "QUERY_DATA_SOURCE_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "id", value = "DATA_SOURCE_ID", required = true, dataType = "Int", example = "100")
+ @ApiImplicitParam(name = "id", value = "DATA_SOURCE_ID", required = true, dataTypeClass = int.class, example = "100")
})
@GetMapping(value = "/{id}")
@@ -154,7 +156,7 @@ public class DataSourceController extends BaseController {
*/
@ApiOperation(value = "queryDataSourceList", notes = "QUERY_DATA_SOURCE_LIST_BY_TYPE_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "type", value = "DB_TYPE", required = true, dataType = "DbType")
+ @ApiImplicitParam(name = "type", value = "DB_TYPE", required = true, dataType = "DbType")
})
@GetMapping(value = "/list")
@ResponseStatus(HttpStatus.OK)
@@ -177,9 +179,9 @@ public class DataSourceController extends BaseController {
*/
@ApiOperation(value = "queryDataSourceListPaging", notes = "QUERY_DATA_SOURCE_LIST_PAGING_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "searchVal", value = "SEARCH_VAL", dataType = "String"),
- @ApiImplicitParam(name = "pageNo", value = "PAGE_NO", required = true, dataType = "Int", example = "1"),
- @ApiImplicitParam(name = "pageSize", value = "PAGE_SIZE", required = true, dataType = "Int", example = "20")
+ @ApiImplicitParam(name = "searchVal", value = "SEARCH_VAL", dataTypeClass = String.class),
+ @ApiImplicitParam(name = "pageNo", value = "PAGE_NO", required = true, dataTypeClass = int.class, example = "1"),
+ @ApiImplicitParam(name = "pageSize", value = "PAGE_SIZE", required = true, dataTypeClass = int.class, example = "20")
})
@GetMapping()
@ResponseStatus(HttpStatus.OK)
@@ -206,15 +208,12 @@ public class DataSourceController extends BaseController {
* @return connect result code
*/
@ApiOperation(value = "connectDataSource", notes = "CONNECT_DATA_SOURCE_NOTES")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "dataSourceParam", value = "DATA_SOURCE_PARAM", required = true, dataType = "BaseDataSourceParamDTO")
- })
@PostMapping(value = "/connect")
@ResponseStatus(HttpStatus.OK)
@ApiException(CONNECT_DATASOURCE_FAILURE)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
public Result connectDataSource(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
- @RequestBody String jsonStr) {
+ @io.swagger.v3.oas.annotations.parameters.RequestBody(description = "dataSourceParam") @RequestBody String jsonStr) {
BaseDataSourceParamDTO dataSourceParam = DataSourceUtils.buildDatasourceParam(jsonStr);
DataSourceUtils.checkDatasourceParam(dataSourceParam);
ConnectionParam connectionParams = DataSourceUtils.buildConnectionParams(dataSourceParam);
@@ -230,7 +229,7 @@ public class DataSourceController extends BaseController {
*/
@ApiOperation(value = "connectionTest", notes = "CONNECT_DATA_SOURCE_TEST_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "id", value = "DATA_SOURCE_ID", required = true, dataType = "Int", example = "100")
+ @ApiImplicitParam(name = "id", value = "DATA_SOURCE_ID", required = true, dataTypeClass = int.class, example = "100")
})
@GetMapping(value = "/{id}/connect-test")
@ResponseStatus(HttpStatus.OK)
@@ -250,14 +249,14 @@ public class DataSourceController extends BaseController {
*/
@ApiOperation(value = "deleteDataSource", notes = "DELETE_DATA_SOURCE_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "id", value = "DATA_SOURCE_ID", required = true, dataType = "Int", example = "100")
+ @ApiImplicitParam(name = "id", value = "DATA_SOURCE_ID", required = true, dataTypeClass = int.class, example = "100")
})
@DeleteMapping(value = "/{id}")
@ResponseStatus(HttpStatus.OK)
@ApiException(DELETE_DATA_SOURCE_FAILURE)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
public Result deleteDataSource(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
- @PathVariable("id") int id) {
+ @PathVariable("id") int id) {
return dataSourceService.delete(loginUser, id);
}
@@ -270,15 +269,14 @@ public class DataSourceController extends BaseController {
*/
@ApiOperation(value = "verifyDataSourceName", notes = "VERIFY_DATA_SOURCE_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "name", value = "DATA_SOURCE_NAME", required = true, dataType = "String")
+ @ApiImplicitParam(name = "name", value = "DATA_SOURCE_NAME", required = true, dataTypeClass = String.class)
})
@GetMapping(value = "/verify-name")
@ResponseStatus(HttpStatus.OK)
@ApiException(VERIFY_DATASOURCE_NAME_FAILURE)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
public Result verifyDataSourceName(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
- @RequestParam(value = "name") String name
- ) {
+ @RequestParam(value = "name") String name) {
return dataSourceService.verifyDataSourceName(name);
}
@@ -291,7 +289,7 @@ public class DataSourceController extends BaseController {
*/
@ApiOperation(value = "unauthDatasource", notes = "UNAUTHORIZED_DATA_SOURCE_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "userId", value = "USER_ID", required = true, dataType = "Int", example = "100")
+ @ApiImplicitParam(name = "userId", value = "USER_ID", required = true, dataTypeClass = int.class, example = "100")
})
@GetMapping(value = "/unauth-datasource")
@ResponseStatus(HttpStatus.OK)
@@ -313,7 +311,7 @@ public class DataSourceController extends BaseController {
*/
@ApiOperation(value = "authedDatasource", notes = "AUTHORIZED_DATA_SOURCE_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "userId", value = "USER_ID", required = true, dataType = "Int", example = "100")
+ @ApiImplicitParam(name = "userId", value = "USER_ID", required = true, dataTypeClass = int.class, example = "100")
})
@GetMapping(value = "/authed-datasource")
@ResponseStatus(HttpStatus.OK)
@@ -344,7 +342,7 @@ public class DataSourceController extends BaseController {
@ApiOperation(value = "tables", notes = "GET_DATASOURCE_TABLES_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "datasourceId", value = "DATA_SOURCE_ID", required = true, dataType = "Int", example = "1")
+ @ApiImplicitParam(name = "datasourceId", value = "DATA_SOURCE_ID", required = true, dataTypeClass = int.class, example = "1")
})
@GetMapping(value = "/tables")
@ResponseStatus(HttpStatus.OK)
@@ -356,15 +354,15 @@ public class DataSourceController extends BaseController {
@ApiOperation(value = "tableColumns", notes = "GET_DATASOURCE_TABLE_COLUMNS_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "datasourceId", value = "DATA_SOURCE_ID", required = true, dataType = "Int", example = "1"),
- @ApiImplicitParam(name = "tableName", value = "TABLE_NAME", required = true, dataType = "String", example = "test")
+ @ApiImplicitParam(name = "datasourceId", value = "DATA_SOURCE_ID", required = true, dataTypeClass = int.class, example = "1"),
+ @ApiImplicitParam(name = "tableName", value = "TABLE_NAME", required = true, dataTypeClass = String.class, example = "test")
})
@GetMapping(value = "/tableColumns")
@ResponseStatus(HttpStatus.OK)
@ApiException(GET_DATASOURCE_TABLE_COLUMNS_ERROR)
public Result getTableColumns(@RequestParam("datasourceId") Integer datasourceId,
@RequestParam("tableName") String tableName) {
- Map<String, Object> result = dataSourceService.getTableColumns(datasourceId,tableName);
+ Map<String, Object> result = dataSourceService.getTableColumns(datasourceId, tableName);
return returnDataList(result);
}
}
diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/EnvironmentController.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/EnvironmentController.java
index ed2ad9f1e6..6ef432a502 100644
--- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/EnvironmentController.java
+++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/EnvironmentController.java
@@ -32,6 +32,8 @@ import org.apache.dolphinscheduler.common.Constants;
import org.apache.dolphinscheduler.common.utils.ParameterUtils;
import org.apache.dolphinscheduler.dao.entity.User;
+import springfox.documentation.annotations.ApiIgnore;
+
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
@@ -48,7 +50,6 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
-import springfox.documentation.annotations.ApiIgnore;
/**
* environment controller
@@ -72,22 +73,23 @@ public class EnvironmentController extends BaseController {
*/
@ApiOperation(value = "createEnvironment", notes = "CREATE_ENVIRONMENT_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "name", value = "ENVIRONMENT_NAME", required = true, dataType = "String"),
- @ApiImplicitParam(name = "config", value = "CONFIG", required = true, dataType = "String"),
- @ApiImplicitParam(name = "description", value = "ENVIRONMENT_DESC", dataType = "String"),
- @ApiImplicitParam(name = "workerGroups", value = "WORKER_GROUP_LIST", dataType = "String")
+ @ApiImplicitParam(name = "name", value = "ENVIRONMENT_NAME", required = true, dataTypeClass = String.class),
+ @ApiImplicitParam(name = "config", value = "CONFIG", required = true, dataTypeClass = String.class),
+ @ApiImplicitParam(name = "description", value = "ENVIRONMENT_DESC", dataTypeClass = String.class),
+ @ApiImplicitParam(name = "workerGroups", value = "WORKER_GROUP_LIST", dataTypeClass = String.class)
})
@PostMapping(value = "/create")
@ResponseStatus(HttpStatus.CREATED)
@ApiException(CREATE_ENVIRONMENT_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
public Result createEnvironment(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
- @RequestParam("name") String name,
- @RequestParam("config") String config,
- @RequestParam(value = "description", required = false) String description,
- @RequestParam(value = "workerGroups", required = false) String workerGroups) {
+ @RequestParam("name") String name,
+ @RequestParam("config") String config,
+ @RequestParam(value = "description", required = false) String description,
+ @RequestParam(value = "workerGroups", required = false) String workerGroups) {
- Map<String, Object> result = environmentService.createEnvironment(loginUser, name, config, description, workerGroups);
+ Map<String, Object> result =
+ environmentService.createEnvironment(loginUser, name, config, description, workerGroups);
return returnDataList(result);
}
@@ -103,11 +105,11 @@ public class EnvironmentController extends BaseController {
*/
@ApiOperation(value = "updateEnvironment", notes = "UPDATE_ENVIRONMENT_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "code", value = "ENVIRONMENT_CODE", required = true, dataType = "Long", example = "100"),
- @ApiImplicitParam(name = "name", value = "ENVIRONMENT_NAME", required = true, dataType = "String"),
- @ApiImplicitParam(name = "config", value = "ENVIRONMENT_CONFIG", required = true, dataType = "String"),
- @ApiImplicitParam(name = "description", value = "ENVIRONMENT_DESC", dataType = "String"),
- @ApiImplicitParam(name = "workerGroups", value = "WORKER_GROUP_LIST", dataType = "String")
+ @ApiImplicitParam(name = "code", value = "ENVIRONMENT_CODE", required = true, dataTypeClass = long.class, example = "100"),
+ @ApiImplicitParam(name = "name", value = "ENVIRONMENT_NAME", required = true, dataTypeClass = String.class),
+ @ApiImplicitParam(name = "config", value = "ENVIRONMENT_CONFIG", required = true, dataTypeClass = String.class),
+ @ApiImplicitParam(name = "description", value = "ENVIRONMENT_DESC", dataTypeClass = String.class),
+ @ApiImplicitParam(name = "workerGroups", value = "WORKER_GROUP_LIST", dataTypeClass = String.class)
})
@PostMapping(value = "/update")
@ResponseStatus(HttpStatus.OK)
@@ -119,7 +121,8 @@ public class EnvironmentController extends BaseController {
@RequestParam("config") String config,
@RequestParam(value = "description", required = false) String description,
@RequestParam(value = "workerGroups", required = false) String workerGroups) {
- Map<String, Object> result = environmentService.updateEnvironmentByCode(loginUser, code, name, config, description, workerGroups);
+ Map<String, Object> result =
+ environmentService.updateEnvironmentByCode(loginUser, code, name, config, description, workerGroups);
return returnDataList(result);
}
@@ -131,14 +134,14 @@ public class EnvironmentController extends BaseController {
*/
@ApiOperation(value = "queryEnvironmentByCode", notes = "QUERY_ENVIRONMENT_BY_CODE_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "environmentCode", value = "ENVIRONMENT_CODE", required = true, dataType = "Long", example = "100")
+ @ApiImplicitParam(name = "environmentCode", value = "ENVIRONMENT_CODE", required = true, dataTypeClass = long.class, example = "100")
})
@GetMapping(value = "/query-by-code")
@ResponseStatus(HttpStatus.OK)
@ApiException(QUERY_ENVIRONMENT_BY_CODE_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
public Result queryEnvironmentByCode(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
- @RequestParam("environmentCode") Long environmentCode) {
+ @RequestParam("environmentCode") Long environmentCode) {
Map<String, Object> result = environmentService.queryEnvironmentByCode(environmentCode);
return returnDataList(result);
@@ -154,19 +157,18 @@ public class EnvironmentController extends BaseController {
*/
@ApiOperation(value = "queryEnvironmentListPaging", notes = "QUERY_ENVIRONMENT_LIST_PAGING_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "searchVal", value = "SEARCH_VAL", dataType = "String"),
- @ApiImplicitParam(name = "pageSize", value = "PAGE_SIZE", required = true, dataType = "Int", example = "20"),
- @ApiImplicitParam(name = "pageNo", value = "PAGE_NO", required = true, dataType = "Int", example = "1")
+ @ApiImplicitParam(name = "searchVal", value = "SEARCH_VAL", dataTypeClass = String.class),
+ @ApiImplicitParam(name = "pageSize", value = "PAGE_SIZE", required = true, dataTypeClass = int.class, example = "20"),
+ @ApiImplicitParam(name = "pageNo", value = "PAGE_NO", required = true, dataTypeClass = int.class, example = "1")
})
@GetMapping(value = "/list-paging")
@ResponseStatus(HttpStatus.OK)
@ApiException(QUERY_ENVIRONMENT_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
public Result queryEnvironmentListPaging(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
- @RequestParam(value = "searchVal", required = false) String searchVal,
- @RequestParam("pageSize") Integer pageSize,
- @RequestParam("pageNo") Integer pageNo
- ) {
+ @RequestParam(value = "searchVal", required = false) String searchVal,
+ @RequestParam("pageSize") Integer pageSize,
+ @RequestParam("pageNo") Integer pageNo) {
Result result = checkPageParams(pageNo, pageSize);
if (!result.checkResult()) {
@@ -186,15 +188,14 @@ public class EnvironmentController extends BaseController {
*/
@ApiOperation(value = "deleteEnvironmentByCode", notes = "DELETE_ENVIRONMENT_BY_CODE_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "environmentCode", value = "ENVIRONMENT_CODE", required = true, dataType = "Long", example = "100")
+ @ApiImplicitParam(name = "environmentCode", value = "ENVIRONMENT_CODE", required = true, dataTypeClass = long.class, example = "100")
})
@PostMapping(value = "/delete")
@ResponseStatus(HttpStatus.OK)
@ApiException(DELETE_ENVIRONMENT_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
public Result deleteEnvironment(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
- @RequestParam("environmentCode") Long environmentCode
- ) {
+ @RequestParam("environmentCode") Long environmentCode) {
Map<String, Object> result = environmentService.deleteEnvironmentByCode(loginUser, environmentCode);
return returnDataList(result);
@@ -225,15 +226,14 @@ public class EnvironmentController extends BaseController {
*/
@ApiOperation(value = "verifyEnvironment", notes = "VERIFY_ENVIRONMENT_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "environmentName", value = "ENVIRONMENT_NAME", required = true, dataType = "String")
+ @ApiImplicitParam(name = "environmentName", value = "ENVIRONMENT_NAME", required = true, dataTypeClass = String.class)
})
@PostMapping(value = "/verify-environment")
@ResponseStatus(HttpStatus.OK)
@ApiException(VERIFY_ENVIRONMENT_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
public Result verifyEnvironment(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
- @RequestParam(value = "environmentName") String environmentName
- ) {
+ @RequestParam(value = "environmentName") String environmentName) {
Map<String, Object> result = environmentService.verifyEnvironment(environmentName);
return returnDataList(result);
}
diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ExecutorController.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ExecutorController.java
index dfe9396089..bd17449940 100644
--- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ExecutorController.java
+++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ExecutorController.java
@@ -41,6 +41,8 @@ import org.apache.dolphinscheduler.common.utils.JSONUtils;
import org.apache.dolphinscheduler.dao.entity.User;
import org.apache.dolphinscheduler.remote.dto.WorkflowExecuteDto;
+import springfox.documentation.annotations.ApiIgnore;
+
import org.apache.commons.lang3.StringUtils;
import java.text.MessageFormat;
@@ -69,7 +71,6 @@ import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
-import springfox.documentation.annotations.ApiIgnore;
/**
* executor controller
@@ -106,22 +107,22 @@ public class ExecutorController extends BaseController {
*/
@ApiOperation(value = "startProcessInstance", notes = "RUN_PROCESS_INSTANCE_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "processDefinitionCode", value = "PROCESS_DEFINITION_CODE", required = true, dataType = "Long", example = "100"),
- @ApiImplicitParam(name = "scheduleTime", value = "SCHEDULE_TIME", required = true, dataType = "String", example = "2022-04-06 00:00:00,2022-04-06 00:00:00"),
- @ApiImplicitParam(name = "failureStrategy", value = "FAILURE_STRATEGY", required = true, dataType = "FailureStrategy"),
- @ApiImplicitParam(name = "startNodeList", value = "START_NODE_LIST", dataType = "String"),
- @ApiImplicitParam(name = "taskDependType", value = "TASK_DEPEND_TYPE", dataType = "TaskDependType"),
- @ApiImplicitParam(name = "execType", value = "COMMAND_TYPE", dataType = "CommandType"),
- @ApiImplicitParam(name = "warningType", value = "WARNING_TYPE", required = true, dataType = "WarningType"),
- @ApiImplicitParam(name = "warningGroupId", value = "WARNING_GROUP_ID", dataType = "Int", example = "100"),
- @ApiImplicitParam(name = "runMode", value = "RUN_MODE", dataType = "RunMode"),
- @ApiImplicitParam(name = "processInstancePriority", value = "PROCESS_INSTANCE_PRIORITY", required = true, dataType = "Priority"),
- @ApiImplicitParam(name = "workerGroup", value = "WORKER_GROUP", dataType = "String", example = "default"),
- @ApiImplicitParam(name = "environmentCode", value = "ENVIRONMENT_CODE", dataType = "Long", example = "-1"),
- @ApiImplicitParam(name = "timeout", value = "TIMEOUT", dataType = "Int", example = "100"),
- @ApiImplicitParam(name = "expectedParallelismNumber", value = "EXPECTED_PARALLELISM_NUMBER", dataType = "Int" , example = "8"),
- @ApiImplicitParam(name = "dryRun", value = "DRY_RUN", dataType = "Int", example = "0"),
- @ApiImplicitParam(name = "complementDependentMode", value = "COMPLEMENT_DEPENDENT_MODE", dataType = "complementDependentMode")
+ @ApiImplicitParam(name = "processDefinitionCode", value = "PROCESS_DEFINITION_CODE", required = true, dataTypeClass = long.class, example = "100"),
+ @ApiImplicitParam(name = "scheduleTime", value = "SCHEDULE_TIME", required = true, dataTypeClass = String.class, example = "2022-04-06 00:00:00,2022-04-06 00:00:00"),
+ @ApiImplicitParam(name = "failureStrategy", value = "FAILURE_STRATEGY", required = true, dataTypeClass = FailureStrategy.class),
+ @ApiImplicitParam(name = "startNodeList", value = "START_NODE_LIST", dataTypeClass = String.class),
+ @ApiImplicitParam(name = "taskDependType", value = "TASK_DEPEND_TYPE", dataTypeClass = TaskDependType.class),
+ @ApiImplicitParam(name = "execType", value = "COMMAND_TYPE", dataTypeClass = CommandType.class),
+ @ApiImplicitParam(name = "warningType", value = "WARNING_TYPE", required = true, dataTypeClass = WarningType.class),
+ @ApiImplicitParam(name = "warningGroupId", value = "WARNING_GROUP_ID", dataTypeClass = int.class, example = "100"),
+ @ApiImplicitParam(name = "runMode", value = "RUN_MODE", dataTypeClass = RunMode.class),
+ @ApiImplicitParam(name = "processInstancePriority", value = "PROCESS_INSTANCE_PRIORITY", required = true, dataTypeClass = Priority.class),
+ @ApiImplicitParam(name = "workerGroup", value = "WORKER_GROUP", dataTypeClass = String.class, example = "default"),
+ @ApiImplicitParam(name = "environmentCode", value = "ENVIRONMENT_CODE", dataTypeClass = long.class, example = "-1"),
+ @ApiImplicitParam(name = "timeout", value = "TIMEOUT", dataTypeClass = int.class, example = "100"),
+ @ApiImplicitParam(name = "expectedParallelismNumber", value = "EXPECTED_PARALLELISM_NUMBER", dataTypeClass = int.class, example = "8"),
+ @ApiImplicitParam(name = "dryRun", value = "DRY_RUN", dataTypeClass = int.class, example = "0"),
+ @ApiImplicitParam(name = "complementDependentMode", value = "COMPLEMENT_DEPENDENT_MODE", dataTypeClass = ComplementDependentMode.class)
})
@PostMapping(value = "start-process-instance")
@ResponseStatus(HttpStatus.OK)
@@ -162,7 +163,8 @@ public class ExecutorController extends BaseController {
Map<String, Object> result = execService.execProcessInstance(loginUser, projectCode, processDefinitionCode,
scheduleTime, execType, failureStrategy,
startNodeList, taskDependType, warningType, warningGroupId, runMode, processInstancePriority,
- workerGroup, environmentCode, timeout, startParamMap, expectedParallelismNumber, dryRun, complementDependentMode);
+ workerGroup, environmentCode, timeout, startParamMap, expectedParallelismNumber, dryRun,
+ complementDependentMode);
return returnDataList(result);
}
@@ -190,22 +192,22 @@ public class ExecutorController extends BaseController {
*/
@ApiOperation(value = "batchStartProcessInstance", notes = "BATCH_RUN_PROCESS_INSTANCE_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "processDefinitionCodes", value = "PROCESS_DEFINITION_CODES", required = true, dataType = "String", example = "1,2,3"),
- @ApiImplicitParam(name = "scheduleTime", value = "SCHEDULE_TIME", required = true, dataType = "String", example = "2022-04-06 00:00:00,2022-04-06 00:00:00"),
- @ApiImplicitParam(name = "failureStrategy", value = "FAILURE_STRATEGY", required = true, dataType = "FailureStrategy"),
- @ApiImplicitParam(name = "startNodeList", value = "START_NODE_LIST", dataType = "String"),
- @ApiImplicitParam(name = "taskDependType", value = "TASK_DEPEND_TYPE", dataType = "TaskDependType"),
- @ApiImplicitParam(name = "execType", value = "COMMAND_TYPE", dataType = "CommandType"),
- @ApiImplicitParam(name = "warningType", value = "WARNING_TYPE", required = true, dataType = "WarningType"),
- @ApiImplicitParam(name = "warningGroupId", value = "WARNING_GROUP_ID", required = true, dataType = "Int", example = "100"),
- @ApiImplicitParam(name = "runMode", value = "RUN_MODE", dataType = "RunMode"),
- @ApiImplicitParam(name = "processInstancePriority", value = "PROCESS_INSTANCE_PRIORITY", required = true, dataType = "Priority"),
- @ApiImplicitParam(name = "workerGroup", value = "WORKER_GROUP", dataType = "String", example = "default"),
- @ApiImplicitParam(name = "environmentCode", value = "ENVIRONMENT_CODE", dataType = "Long", example = "-1"),
- @ApiImplicitParam(name = "timeout", value = "TIMEOUT", dataType = "Int", example = "100"),
- @ApiImplicitParam(name = "expectedParallelismNumber", value = "EXPECTED_PARALLELISM_NUMBER", dataType = "Int", example = "8"),
- @ApiImplicitParam(name = "dryRun", value = "DRY_RUN", dataType = "Int", example = "0"),
- @ApiImplicitParam(name = "complementDependentMode", value = "COMPLEMENT_DEPENDENT_MODE", dataType = "complementDependentMode")
+ @ApiImplicitParam(name = "processDefinitionCodes", value = "PROCESS_DEFINITION_CODES", required = true, dataTypeClass = String.class, example = "1,2,3"),
+ @ApiImplicitParam(name = "scheduleTime", value = "SCHEDULE_TIME", required = true, dataTypeClass = String.class, example = "2022-04-06 00:00:00,2022-04-06 00:00:00"),
+ @ApiImplicitParam(name = "failureStrategy", value = "FAILURE_STRATEGY", required = true, dataTypeClass = FailureStrategy.class),
+ @ApiImplicitParam(name = "startNodeList", value = "START_NODE_LIST", dataTypeClass = String.class),
+ @ApiImplicitParam(name = "taskDependType", value = "TASK_DEPEND_TYPE", dataTypeClass = TaskDependType.class),
+ @ApiImplicitParam(name = "execType", value = "COMMAND_TYPE", dataTypeClass = CommandType.class),
+ @ApiImplicitParam(name = "warningType", value = "WARNING_TYPE", required = true, dataTypeClass = WarningType.class),
+ @ApiImplicitParam(name = "warningGroupId", value = "WARNING_GROUP_ID", required = true, dataTypeClass = int.class, example = "100"),
+ @ApiImplicitParam(name = "runMode", value = "RUN_MODE", dataTypeClass = RunMode.class),
+ @ApiImplicitParam(name = "processInstancePriority", value = "PROCESS_INSTANCE_PRIORITY", required = true, dataTypeClass = Priority.class),
+ @ApiImplicitParam(name = "workerGroup", value = "WORKER_GROUP", dataTypeClass = String.class, example = "default"),
+ @ApiImplicitParam(name = "environmentCode", value = "ENVIRONMENT_CODE", dataTypeClass = long.class, example = "-1"),
+ @ApiImplicitParam(name = "timeout", value = "TIMEOUT", dataTypeClass = int.class, example = "100"),
+ @ApiImplicitParam(name = "expectedParallelismNumber", value = "EXPECTED_PARALLELISM_NUMBER", dataTypeClass = int.class, example = "8"),
+ @ApiImplicitParam(name = "dryRun", value = "DRY_RUN", dataTypeClass = int.class, example = "0"),
+ @ApiImplicitParam(name = "complementDependentMode", value = "COMPLEMENT_DEPENDENT_MODE", dataTypeClass = ComplementDependentMode.class)
})
@PostMapping(value = "batch-start-process-instance")
@ResponseStatus(HttpStatus.OK)
@@ -252,7 +254,8 @@ public class ExecutorController extends BaseController {
for (String strProcessDefinitionCode : processDefinitionCodeArray) {
long processDefinitionCode = Long.parseLong(strProcessDefinitionCode);
- result = execService.execProcessInstance(loginUser, projectCode, processDefinitionCode, scheduleTime, execType, failureStrategy,
+ result = execService.execProcessInstance(loginUser, projectCode, processDefinitionCode, scheduleTime,
+ execType, failureStrategy,
startNodeList, taskDependType, warningType, warningGroupId, runMode, processInstancePriority,
workerGroup, environmentCode, timeout, startParamMap, expectedParallelismNumber, dryRun,
complementDependentMode);
@@ -263,7 +266,8 @@ public class ExecutorController extends BaseController {
}
if (!startFailedProcessDefinitionCodeList.isEmpty()) {
- putMsg(result, Status.BATCH_START_PROCESS_INSTANCE_ERROR, String.join(Constants.COMMA, startFailedProcessDefinitionCodeList));
+ putMsg(result, Status.BATCH_START_PROCESS_INSTANCE_ERROR,
+ String.join(Constants.COMMA, startFailedProcessDefinitionCodeList));
}
return returnDataList(result);
@@ -280,8 +284,8 @@ public class ExecutorController extends BaseController {
*/
@ApiOperation(value = "execute", notes = "EXECUTE_ACTION_TO_PROCESS_INSTANCE_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "processInstanceId", value = "PROCESS_INSTANCE_ID", required = true, dataType = "Int", example = "100"),
- @ApiImplicitParam(name = "executeType", value = "EXECUTE_TYPE", required = true, dataType = "ExecuteType")
+ @ApiImplicitParam(name = "processInstanceId", value = "PROCESS_INSTANCE_ID", required = true, dataTypeClass = int.class, example = "100"),
+ @ApiImplicitParam(name = "executeType", value = "EXECUTE_TYPE", required = true, dataTypeClass = ExecuteType.class)
})
@PostMapping(value = "/execute")
@ResponseStatus(HttpStatus.OK)
@@ -290,8 +294,7 @@ public class ExecutorController extends BaseController {
public Result execute(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@ApiParam(name = "projectCode", value = "PROJECT_CODE", required = true) @PathVariable long projectCode,
@RequestParam("processInstanceId") Integer processInstanceId,
- @RequestParam("executeType") ExecuteType executeType
- ) {
+ @RequestParam("executeType") ExecuteType executeType) {
Map<String, Object> result = execService.execute(loginUser, projectCode, processInstanceId, executeType);
return returnDataList(result);
}
@@ -307,9 +310,9 @@ public class ExecutorController extends BaseController {
*/
@ApiOperation(value = "batchExecute", notes = "BATCH_EXECUTE_ACTION_TO_PROCESS_INSTANCE_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "projectCode", value = "PROJECT_CODE", required = true, dataType = "Int"),
- @ApiImplicitParam(name = "processInstanceIds", value = "PROCESS_INSTANCE_IDS", required = true, dataType = "String"),
- @ApiImplicitParam(name = "executeType", value = "EXECUTE_TYPE", required = true, dataType = "ExecuteType")
+ @ApiImplicitParam(name = "projectCode", value = "PROJECT_CODE", required = true, dataTypeClass = int.class),
+ @ApiImplicitParam(name = "processInstanceIds", value = "PROCESS_INSTANCE_IDS", required = true, dataTypeClass = String.class),
+ @ApiImplicitParam(name = "executeType", value = "EXECUTE_TYPE", required = true, dataTypeClass = ExecuteType.class)
})
@PostMapping(value = "/batch-execute")
@ResponseStatus(HttpStatus.OK)
@@ -318,8 +321,7 @@ public class ExecutorController extends BaseController {
public Result batchExecute(@RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@PathVariable long projectCode,
@RequestParam("processInstanceIds") String processInstanceIds,
- @RequestParam("executeType") ExecuteType executeType
- ) {
+ @RequestParam("executeType") ExecuteType executeType) {
Map<String, Object> result = new HashMap<>();
List<String> executeFailedIdList = new ArrayList<>();
if (!StringUtils.isEmpty(processInstanceIds)) {
@@ -328,13 +330,15 @@ public class ExecutorController extends BaseController {
for (String strProcessInstanceId : processInstanceIdArray) {
int processInstanceId = Integer.parseInt(strProcessInstanceId);
try {
- Map<String, Object> singleResult = execService.execute(loginUser, projectCode, processInstanceId, executeType);
+ Map<String, Object> singleResult =
+ execService.execute(loginUser, projectCode, processInstanceId, executeType);
if (!Status.SUCCESS.equals(singleResult.get(Constants.STATUS))) {
executeFailedIdList.add((String) singleResult.get(Constants.MSG));
logger.error((String) singleResult.get(Constants.MSG));
}
} catch (Exception e) {
- executeFailedIdList.add(MessageFormat.format(Status.PROCESS_INSTANCE_ERROR.getMsg(), strProcessInstanceId));
+ executeFailedIdList
+ .add(MessageFormat.format(Status.PROCESS_INSTANCE_ERROR.getMsg(), strProcessInstanceId));
}
}
}
@@ -354,7 +358,7 @@ public class ExecutorController extends BaseController {
*/
@ApiOperation(value = "startCheckProcessDefinition", notes = "START_CHECK_PROCESS_DEFINITION_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "processDefinitionCode", value = "PROCESS_DEFINITION_CODE", required = true, dataType = "Long", example = "100")
+ @ApiImplicitParam(name = "processDefinitionCode", value = "PROCESS_DEFINITION_CODE", required = true, dataTypeClass = long.class, example = "100")
})
@PostMapping(value = "/start-check")
@ResponseStatus(HttpStatus.OK)
@@ -370,14 +374,15 @@ public class ExecutorController extends BaseController {
*/
@ApiOperation(value = "queryExecutingWorkflow", notes = "QUERY_WORKFLOW_EXECUTE_DATA")
@ApiImplicitParams({
- @ApiImplicitParam(name = "processInstanceId", value = "PROCESS_INSTANCE_ID", required = true, dataType = "Int", example = "100")
+ @ApiImplicitParam(name = "processInstanceId", value = "PROCESS_INSTANCE_ID", required = true, dataTypeClass = int.class, example = "100")
})
@GetMapping(value = "/query-executing-workflow")
@ResponseStatus(HttpStatus.OK)
@ApiException(QUERY_EXECUTING_WORKFLOW_ERROR)
@AccessLogAnnotation
public Result queryExecutingWorkflow(@RequestParam("id") Integer processInstanceId) {
- WorkflowExecuteDto workflowExecuteDto = execService.queryExecutingWorkflowByProcessInstanceId(processInstanceId);
+ WorkflowExecuteDto workflowExecuteDto =
+ execService.queryExecutingWorkflowByProcessInstanceId(processInstanceId);
return Result.success(workflowExecuteDto);
}
@@ -394,29 +399,29 @@ public class ExecutorController extends BaseController {
*/
@ApiOperation(value = "startTaskInstance", notes = "RUN_TASK_INSTANCE_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "version", value = "VERSION", dataType = "Int", example = "1"),
- @ApiImplicitParam(name = "failureStrategy", value = "FAILURE_STRATEGY", required = true, dataType = "FailureStrategy"),
- @ApiImplicitParam(name = "execType", value = "COMMAND_TYPE", dataType = "CommandType"),
- @ApiImplicitParam(name = "warningType", value = "WARNING_TYPE", required = true, dataType = "WarningType"),
- @ApiImplicitParam(name = "warningGroupId", value = "WARNING_GROUP_ID", dataType = "Int", example = "100"),
- @ApiImplicitParam(name = "workerGroup", value = "WORKER_GROUP", dataType = "String", example = "default"),
- @ApiImplicitParam(name = "environmentCode", value = "ENVIRONMENT_CODE", dataType = "Long", example = "-1"),
- @ApiImplicitParam(name = "timeout", value = "TIMEOUT", dataType = "Int", example = "100"),
- @ApiImplicitParam(name = "dryRun", value = "DRY_RUN", dataType = "Int", example = "0"),
+ @ApiImplicitParam(name = "version", value = "VERSION", dataTypeClass = int.class, example = "1"),
+ @ApiImplicitParam(name = "failureStrategy", value = "FAILURE_STRATEGY", required = true, dataTypeClass = FailureStrategy.class),
+ @ApiImplicitParam(name = "execType", value = "COMMAND_TYPE", dataTypeClass = CommandType.class),
+ @ApiImplicitParam(name = "warningType", value = "WARNING_TYPE", required = true, dataTypeClass = WarningType.class),
+ @ApiImplicitParam(name = "warningGroupId", value = "WARNING_GROUP_ID", dataTypeClass = int.class, example = "100"),
+ @ApiImplicitParam(name = "workerGroup", value = "WORKER_GROUP", dataTypeClass = String.class, example = "default"),
+ @ApiImplicitParam(name = "environmentCode", value = "ENVIRONMENT_CODE", dataTypeClass = long.class, example = "-1"),
+ @ApiImplicitParam(name = "timeout", value = "TIMEOUT", dataTypeClass = int.class, example = "100"),
+ @ApiImplicitParam(name = "dryRun", value = "DRY_RUN", dataTypeClass = int.class, example = "0"),
})
@PostMapping(value = "/task-instance/{code}/start")
@ResponseStatus(HttpStatus.OK)
@ApiException(START_PROCESS_INSTANCE_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
public Result startStreamTaskInstance(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
- @ApiParam(name = "projectCode", value = "PROJECT_CODE", required = true) @PathVariable long projectCode,
- @ApiParam(name = "code", value = "TASK_CODE", required = true) @PathVariable long code,
- @RequestParam(value = "version", required = true) int version,
- @RequestParam(value = "warningGroupId", required = false, defaultValue = "0") Integer warningGroupId,
- @RequestParam(value = "workerGroup", required = false, defaultValue = "default") String workerGroup,
- @RequestParam(value = "environmentCode", required = false, defaultValue = "-1") Long environmentCode,
- @RequestParam(value = "startParams", required = false) String startParams,
- @RequestParam(value = "dryRun", defaultValue = "0", required = false) int dryRun) {
+ @ApiParam(name = "projectCode", value = "PROJECT_CODE", required = true) @PathVariable long projectCode,
+ @ApiParam(name = "code", value = "TASK_CODE", required = true) @PathVariable long code,
+ @RequestParam(value = "version", required = true) int version,
+ @RequestParam(value = "warningGroupId", required = false, defaultValue = "0") Integer warningGroupId,
+ @RequestParam(value = "workerGroup", required = false, defaultValue = "default") String workerGroup,
+ @RequestParam(value = "environmentCode", required = false, defaultValue = "-1") Long environmentCode,
+ @RequestParam(value = "startParams", required = false) String startParams,
+ @RequestParam(value = "dryRun", defaultValue = "0", required = false) int dryRun) {
Map<String, String> startParamMap = null;
if (startParams != null) {
@@ -424,7 +429,7 @@ public class ExecutorController extends BaseController {
}
Map<String, Object> result = execService.execStreamTaskInstance(loginUser, projectCode, code, version,
- warningGroupId, workerGroup, environmentCode, startParamMap, dryRun);
+ warningGroupId, workerGroup, environmentCode, startParamMap, dryRun);
return returnDataList(result);
}
}
diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/K8sNamespaceController.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/K8sNamespaceController.java
index 7f331774bc..e6e77e4904 100644
--- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/K8sNamespaceController.java
+++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/K8sNamespaceController.java
@@ -35,6 +35,8 @@ import org.apache.dolphinscheduler.common.utils.ParameterUtils;
import org.apache.dolphinscheduler.dao.entity.K8sNamespace;
import org.apache.dolphinscheduler.dao.entity.User;
+import springfox.documentation.annotations.ApiIgnore;
+
import java.util.List;
import java.util.Map;
@@ -54,7 +56,6 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
-import springfox.documentation.annotations.ApiIgnore;
/**
* k8s namespace controller
@@ -78,9 +79,9 @@ public class K8sNamespaceController extends BaseController {
*/
@ApiOperation(value = "queryNamespaceListPaging", notes = "QUERY_NAMESPACE_LIST_PAGING_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "searchVal", value = "SEARCH_VAL", dataType = "String"),
- @ApiImplicitParam(name = "pageSize", value = "PAGE_SIZE", required = true, dataType = "Int", example = "10"),
- @ApiImplicitParam(name = "pageNo", value = "PAGE_NO", required = true, dataType = "Int", example = "1")
+ @ApiImplicitParam(name = "searchVal", value = "SEARCH_VAL", dataTypeClass = String.class),
+ @ApiImplicitParam(name = "pageSize", value = "PAGE_SIZE", required = true, dataTypeClass = int.class, example = "10"),
+ @ApiImplicitParam(name = "pageNo", value = "PAGE_NO", required = true, dataTypeClass = int.class, example = "1")
})
@GetMapping()
@ResponseStatus(HttpStatus.OK)
@@ -89,8 +90,7 @@ public class K8sNamespaceController extends BaseController {
public Result queryNamespaceListPaging(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@RequestParam(value = "searchVal", required = false) String searchVal,
@RequestParam("pageSize") Integer pageSize,
- @RequestParam("pageNo") Integer pageNo
- ) {
+ @RequestParam("pageNo") Integer pageNo) {
Result result = checkPageParams(pageNo, pageSize);
if (!result.checkResult()) {
@@ -101,7 +101,6 @@ public class K8sNamespaceController extends BaseController {
return result;
}
-
/**
* create namespace,if not exist on k8s,will create,if exist only register in db
*
@@ -114,10 +113,10 @@ public class K8sNamespaceController extends BaseController {
*/
@ApiOperation(value = "createK8sNamespace", notes = "CREATE_NAMESPACE_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "namespace", value = "NAMESPACE", required = true, dataType = "String"),
- @ApiImplicitParam(name = "clusterCode", value = "CLUSTER_CODE", required = true, dataType = "Long"),
- @ApiImplicitParam(name = "limits_cpu", value = "LIMITS_CPU", required = false, dataType = "Double"),
- @ApiImplicitParam(name = "limits_memory", value = "LIMITS_MEMORY", required = false, dataType = "Integer")
+ @ApiImplicitParam(name = "namespace", value = "NAMESPACE", required = true, dataTypeClass = String.class),
+ @ApiImplicitParam(name = "clusterCode", value = "CLUSTER_CODE", required = true, dataTypeClass = long.class),
+ @ApiImplicitParam(name = "limits_cpu", value = "LIMITS_CPU", required = false, dataTypeClass = double.class),
+ @ApiImplicitParam(name = "limits_memory", value = "LIMITS_MEMORY", required = false, dataTypeClass = int.class)
})
@PostMapping()
@ResponseStatus(HttpStatus.CREATED)
@@ -127,9 +126,9 @@ public class K8sNamespaceController extends BaseController {
@RequestParam(value = "namespace") String namespace,
@RequestParam(value = "clusterCode") Long clusterCode,
@RequestParam(value = "limitsCpu", required = false) Double limitsCpu,
- @RequestParam(value = "limitsMemory", required = false) Integer limitsMemory
- ) {
- Map<String, Object> result = k8sNamespaceService.createK8sNamespace(loginUser, namespace, clusterCode, limitsCpu, limitsMemory);
+ @RequestParam(value = "limitsMemory", required = false) Integer limitsMemory) {
+ Map<String, Object> result =
+ k8sNamespaceService.createK8sNamespace(loginUser, namespace, clusterCode, limitsCpu, limitsMemory);
return returnDataList(result);
}
@@ -144,10 +143,10 @@ public class K8sNamespaceController extends BaseController {
*/
@ApiOperation(value = "updateK8sNamespace", notes = "UPDATE_NAMESPACE_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "id", value = "K8S_NAMESPACE_ID", required = true, dataType = "Int", example = "100"),
- @ApiImplicitParam(name = "userName", value = "OWNER", required = false, dataType = "String"),
- @ApiImplicitParam(name = "limitsCpu", value = "LIMITS_CPU", required = false, dataType = "Double"),
- @ApiImplicitParam(name = "limitsMemory", value = "LIMITS_MEMORY", required = false, dataType = "Integer")})
+ @ApiImplicitParam(name = "id", value = "K8S_NAMESPACE_ID", required = true, dataTypeClass = int.class, example = "100"),
+ @ApiImplicitParam(name = "userName", value = "OWNER", required = false, dataTypeClass = String.class),
+ @ApiImplicitParam(name = "limitsCpu", value = "LIMITS_CPU", required = false, dataTypeClass = double.class),
+ @ApiImplicitParam(name = "limitsMemory", value = "LIMITS_MEMORY", required = false, dataTypeClass = int.class)})
@PutMapping(value = "/{id}")
@ResponseStatus(HttpStatus.CREATED)
@ApiException(UPDATE_K8S_NAMESPACE_ERROR)
@@ -158,7 +157,8 @@ public class K8sNamespaceController extends BaseController {
@RequestParam(value = "tag", required = false) String tag,
@RequestParam(value = "limitsCpu", required = false) Double limitsCpu,
@RequestParam(value = "limitsMemory", required = false) Integer limitsMemory) {
- Map<String, Object> result = k8sNamespaceService.updateK8sNamespace(loginUser, id, userName, limitsCpu, limitsMemory);
+ Map<String, Object> result =
+ k8sNamespaceService.updateK8sNamespace(loginUser, id, userName, limitsCpu, limitsMemory);
return returnDataList(result);
}
@@ -172,8 +172,8 @@ public class K8sNamespaceController extends BaseController {
*/
@ApiOperation(value = "verifyNamespaceK8s", notes = "VERIFY_NAMESPACE_K8S_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "namespace", value = "NAMESPACE", required = true, dataType = "String"),
- @ApiImplicitParam(name = "clusterCode", value = "CLUSTER_CODE", required = true, dataType = "Long"),
+ @ApiImplicitParam(name = "namespace", value = "NAMESPACE", required = true, dataTypeClass = String.class),
+ @ApiImplicitParam(name = "clusterCode", value = "CLUSTER_CODE", required = true, dataTypeClass = long.class),
})
@PostMapping(value = "/verify")
@ResponseStatus(HttpStatus.OK)
@@ -181,13 +181,11 @@ public class K8sNamespaceController extends BaseController {
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
public Result verifyNamespace(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@RequestParam(value = "namespace") String namespace,
- @RequestParam(value = "clusterCode") Long clusterCode
- ) {
+ @RequestParam(value = "clusterCode") Long clusterCode) {
return k8sNamespaceService.verifyNamespaceK8s(namespace, clusterCode);
}
-
/**
* delete namespace by id
*
@@ -197,7 +195,7 @@ public class K8sNamespaceController extends BaseController {
*/
@ApiOperation(value = "delNamespaceById", notes = "DELETE_NAMESPACE_BY_ID_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "id", value = "NAMESPACE_ID", required = true, dataType = "Int", example = "100")
+ @ApiImplicitParam(name = "id", value = "NAMESPACE_ID", required = true, dataTypeClass = int.class, example = "100")
})
@PostMapping(value = "/delete")
@ResponseStatus(HttpStatus.OK)
@@ -218,7 +216,7 @@ public class K8sNamespaceController extends BaseController {
*/
@ApiOperation(value = "queryUnauthorizedNamespace", notes = "QUERY_UNAUTHORIZED_NAMESPACE_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "userId", value = "USER_ID", dataType = "Int", example = "100")
+ @ApiImplicitParam(name = "userId", value = "USER_ID", dataTypeClass = int.class, example = "100")
})
@GetMapping(value = "/unauth-namespace")
@ResponseStatus(HttpStatus.OK)
@@ -239,7 +237,7 @@ public class K8sNamespaceController extends BaseController {
*/
@ApiOperation(value = "queryAuthorizedNamespace", notes = "QUERY_AUTHORIZED_NAMESPACE_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "userId", value = "USER_ID", dataType = "Int", example = "100")
+ @ApiImplicitParam(name = "userId", value = "USER_ID", dataTypeClass = int.class, example = "100")
})
@GetMapping(value = "/authed-namespace")
@ResponseStatus(HttpStatus.OK)
@@ -266,4 +264,4 @@ public class K8sNamespaceController extends BaseController {
List<K8sNamespace> result = k8sNamespaceService.queryNamespaceAvailable(loginUser);
return success(result);
}
-}
\ No newline at end of file
+}
diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/LoggerController.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/LoggerController.java
index f24ee0273b..6c9d49c75c 100644
--- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/LoggerController.java
+++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/LoggerController.java
@@ -28,6 +28,8 @@ import org.apache.dolphinscheduler.common.Constants;
import org.apache.dolphinscheduler.dao.entity.ResponseTaskLog;
import org.apache.dolphinscheduler.dao.entity.User;
+import springfox.documentation.annotations.ApiIgnore;
+
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
@@ -46,7 +48,6 @@ import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
-import springfox.documentation.annotations.ApiIgnore;
/**
* logger controller
@@ -70,9 +71,9 @@ public class LoggerController extends BaseController {
*/
@ApiOperation(value = "queryLog", notes = "QUERY_TASK_INSTANCE_LOG_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "taskInstanceId", value = "TASK_ID", required = true, dataType = "Int", example = "100"),
- @ApiImplicitParam(name = "skipLineNum", value = "SKIP_LINE_NUM", required = true, dataType = "Int", example = "100"),
- @ApiImplicitParam(name = "limit", value = "LIMIT", required = true, dataType = "Int", example = "100")
+ @ApiImplicitParam(name = "taskInstanceId", value = "TASK_ID", required = true, dataTypeClass = int.class, example = "100"),
+ @ApiImplicitParam(name = "skipLineNum", value = "SKIP_LINE_NUM", required = true, dataTypeClass = int.class, example = "100"),
+ @ApiImplicitParam(name = "limit", value = "LIMIT", required = true, dataTypeClass = int.class, example = "100")
})
@GetMapping(value = "/detail")
@ResponseStatus(HttpStatus.OK)
@@ -94,7 +95,7 @@ public class LoggerController extends BaseController {
*/
@ApiOperation(value = "downloadTaskLog", notes = "DOWNLOAD_TASK_INSTANCE_LOG_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "taskInstanceId", value = "TASK_ID", required = true, dataType = "Int", example = "100")
+ @ApiImplicitParam(name = "taskInstanceId", value = "TASK_ID", required = true, dataTypeClass = int.class, example = "100")
})
@GetMapping(value = "/download-log")
@ResponseBody
@@ -104,9 +105,10 @@ public class LoggerController extends BaseController {
@RequestParam(value = "taskInstanceId") int taskInstanceId) {
byte[] logBytes = loggerService.getLogBytes(taskInstanceId);
return ResponseEntity
- .ok()
- .header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=\"" + System.currentTimeMillis() + ".log" + "\"")
- .body(logBytes);
+ .ok()
+ .header(HttpHeaders.CONTENT_DISPOSITION,
+ "attachment; filename=\"" + System.currentTimeMillis() + ".log" + "\"")
+ .body(logBytes);
}
/**
@@ -121,10 +123,10 @@ public class LoggerController extends BaseController {
*/
@ApiOperation(value = "queryLogInSpecifiedProject", notes = "QUERY_TASK_INSTANCE_LOG_IN_SPECIFIED_PROJECT_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "projectCode", value = "PROJECT_CODE", required = true, type = "Long"),
- @ApiImplicitParam(name = "taskInstanceId", value = "TASK_ID", required = true, dataType = "Int", example = "100"),
- @ApiImplicitParam(name = "skipLineNum", value = "SKIP_LINE_NUM", required = true, dataType = "Int", example = "100"),
- @ApiImplicitParam(name = "limit", value = "LIMIT", required = true, dataType = "Int", example = "100")
+ @ApiImplicitParam(name = "projectCode", value = "PROJECT_CODE", required = true, dataTypeClass = long.class),
+ @ApiImplicitParam(name = "taskInstanceId", value = "TASK_ID", required = true, dataTypeClass = int.class, example = "100"),
+ @ApiImplicitParam(name = "skipLineNum", value = "SKIP_LINE_NUM", required = true, dataTypeClass = int.class, example = "100"),
+ @ApiImplicitParam(name = "limit", value = "LIMIT", required = true, dataTypeClass = int.class, example = "100")
})
@GetMapping(value = "/{projectCode}/detail")
@ResponseStatus(HttpStatus.OK)
@@ -148,8 +150,8 @@ public class LoggerController extends BaseController {
*/
@ApiOperation(value = "downloadTaskLogInSpecifiedProject", notes = "DOWNLOAD_TASK_INSTANCE_LOG_IN_SPECIFIED_PROJECT_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "projectCode", value = "PROJECT_CODE", required = true, type = "Long"),
- @ApiImplicitParam(name = "taskInstanceId", value = "TASK_ID", required = true, dataType = "Int", example = "100")
+ @ApiImplicitParam(name = "projectCode", value = "PROJECT_CODE", required = true, dataTypeClass = long.class),
+ @ApiImplicitParam(name = "taskInstanceId", value = "TASK_ID", required = true, dataTypeClass = int.class, example = "100")
})
@GetMapping(value = "/{projectCode}/download-log")
@ResponseBody
@@ -161,7 +163,8 @@ public class LoggerController extends BaseController {
byte[] logBytes = loggerService.getLogBytes(loginUser, projectCode, taskInstanceId);
return ResponseEntity
.ok()
- .header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=\"" + System.currentTimeMillis() + ".log" + "\"")
+ .header(HttpHeaders.CONTENT_DISPOSITION,
+ "attachment; filename=\"" + System.currentTimeMillis() + ".log" + "\"")
.body(logBytes);
}
}
diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/LoginController.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/LoginController.java
index b559fb6c4d..e4a9b9e625 100644
--- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/LoginController.java
+++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/LoginController.java
@@ -30,6 +30,8 @@ import org.apache.dolphinscheduler.api.utils.Result;
import org.apache.dolphinscheduler.common.Constants;
import org.apache.dolphinscheduler.dao.entity.User;
+import springfox.documentation.annotations.ApiIgnore;
+
import org.apache.commons.httpclient.HttpStatus;
import org.apache.commons.lang3.StringUtils;
@@ -50,7 +52,6 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
-import springfox.documentation.annotations.ApiIgnore;
/**
* login controller
@@ -66,7 +67,6 @@ public class LoginController extends BaseController {
@Autowired
private Authenticator authenticator;
-
/**
* login
*
@@ -78,8 +78,8 @@ public class LoginController extends BaseController {
*/
@ApiOperation(value = "login", notes = "LOGIN_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "userName", value = "USER_NAME", required = true, dataType = "String"),
- @ApiImplicitParam(name = "userPassword", value = "USER_PASSWORD", required = true, dataType = "String")
+ @ApiImplicitParam(name = "userName", value = "USER_NAME", required = true, dataTypeClass = String.class),
+ @ApiImplicitParam(name = "userPassword", value = "USER_PASSWORD", required = true, dataTypeClass = String.class)
})
@PostMapping(value = "/login")
@ApiException(USER_LOGIN_FAILURE)
@@ -88,10 +88,10 @@ public class LoginController extends BaseController {
@RequestParam(value = "userPassword") String userPassword,
HttpServletRequest request,
HttpServletResponse response) {
- //user name check
+ // user name check
if (StringUtils.isEmpty(userName)) {
return error(Status.USER_NAME_NULL.getCode(),
- Status.USER_NAME_NULL.getMsg());
+ Status.USER_NAME_NULL.getMsg());
}
// user ip check
@@ -132,7 +132,7 @@ public class LoginController extends BaseController {
HttpServletRequest request) {
String ip = getClientIpAddress(request);
sessionService.signOut(ip, loginUser);
- //clear session
+ // clear session
request.removeAttribute(Constants.SESSION_USER);
return success();
}
diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ProcessDefinitionController.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ProcessDefinitionController.java
index 89bdf3f086..e195d6101c 100644
--- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ProcessDefinitionController.java
+++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ProcessDefinitionController.java
@@ -17,20 +17,24 @@
package org.apache.dolphinscheduler.api.controller;
-import java.text.MessageFormat;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-
-import javax.servlet.http.HttpServletResponse;
+import static org.apache.dolphinscheduler.api.enums.Status.BATCH_COPY_PROCESS_DEFINITION_ERROR;
+import static org.apache.dolphinscheduler.api.enums.Status.BATCH_DELETE_PROCESS_DEFINE_BY_CODES_ERROR;
+import static org.apache.dolphinscheduler.api.enums.Status.BATCH_MOVE_PROCESS_DEFINITION_ERROR;
+import static org.apache.dolphinscheduler.api.enums.Status.CREATE_PROCESS_DEFINITION_ERROR;
+import static org.apache.dolphinscheduler.api.enums.Status.DELETE_PROCESS_DEFINE_BY_CODE_ERROR;
+import static org.apache.dolphinscheduler.api.enums.Status.DELETE_PROCESS_DEFINITION_VERSION_ERROR;
+import static org.apache.dolphinscheduler.api.enums.Status.ENCAPSULATION_TREEVIEW_STRUCTURE_ERROR;
+import static org.apache.dolphinscheduler.api.enums.Status.GET_TASKS_LIST_BY_PROCESS_DEFINITION_ID_ERROR;
+import static org.apache.dolphinscheduler.api.enums.Status.IMPORT_PROCESS_DEFINE_ERROR;
+import static org.apache.dolphinscheduler.api.enums.Status.QUERY_DETAIL_OF_PROCESS_DEFINITION_ERROR;
+import static org.apache.dolphinscheduler.api.enums.Status.QUERY_PROCESS_DEFINITION_LIST;
+import static org.apache.dolphinscheduler.api.enums.Status.QUERY_PROCESS_DEFINITION_LIST_PAGING_ERROR;
+import static org.apache.dolphinscheduler.api.enums.Status.QUERY_PROCESS_DEFINITION_VERSIONS_ERROR;
+import static org.apache.dolphinscheduler.api.enums.Status.RELEASE_PROCESS_DEFINITION_ERROR;
+import static org.apache.dolphinscheduler.api.enums.Status.SWITCH_PROCESS_DEFINITION_VERSION_ERROR;
+import static org.apache.dolphinscheduler.api.enums.Status.UPDATE_PROCESS_DEFINITION_ERROR;
+import static org.apache.dolphinscheduler.api.enums.Status.VERIFY_PROCESS_DEFINITION_NAME_UNIQUE_ERROR;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiImplicitParam;
-import io.swagger.annotations.ApiImplicitParams;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import org.apache.commons.lang3.StringUtils;
import org.apache.dolphinscheduler.api.aspect.AccessLogAnnotation;
import org.apache.dolphinscheduler.api.enums.Status;
import org.apache.dolphinscheduler.api.exceptions.ApiException;
@@ -42,6 +46,19 @@ import org.apache.dolphinscheduler.common.enums.ReleaseState;
import org.apache.dolphinscheduler.common.utils.ParameterUtils;
import org.apache.dolphinscheduler.dao.entity.ProcessDefinition;
import org.apache.dolphinscheduler.dao.entity.User;
+
+import springfox.documentation.annotations.ApiIgnore;
+
+import org.apache.commons.lang3.StringUtils;
+
+import java.text.MessageFormat;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+import javax.servlet.http.HttpServletResponse;
+
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@@ -58,24 +75,12 @@ import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
-import springfox.documentation.annotations.ApiIgnore;
-import static org.apache.dolphinscheduler.api.enums.Status.BATCH_COPY_PROCESS_DEFINITION_ERROR;
-import static org.apache.dolphinscheduler.api.enums.Status.BATCH_DELETE_PROCESS_DEFINE_BY_CODES_ERROR;
-import static org.apache.dolphinscheduler.api.enums.Status.BATCH_MOVE_PROCESS_DEFINITION_ERROR;
-import static org.apache.dolphinscheduler.api.enums.Status.CREATE_PROCESS_DEFINITION_ERROR;
-import static org.apache.dolphinscheduler.api.enums.Status.DELETE_PROCESS_DEFINE_BY_CODE_ERROR;
-import static org.apache.dolphinscheduler.api.enums.Status.DELETE_PROCESS_DEFINITION_VERSION_ERROR;
-import static org.apache.dolphinscheduler.api.enums.Status.ENCAPSULATION_TREEVIEW_STRUCTURE_ERROR;
-import static org.apache.dolphinscheduler.api.enums.Status.GET_TASKS_LIST_BY_PROCESS_DEFINITION_ID_ERROR;
-import static org.apache.dolphinscheduler.api.enums.Status.IMPORT_PROCESS_DEFINE_ERROR;
-import static org.apache.dolphinscheduler.api.enums.Status.QUERY_DETAIL_OF_PROCESS_DEFINITION_ERROR;
-import static org.apache.dolphinscheduler.api.enums.Status.QUERY_PROCESS_DEFINITION_LIST;
-import static org.apache.dolphinscheduler.api.enums.Status.QUERY_PROCESS_DEFINITION_LIST_PAGING_ERROR;
-import static org.apache.dolphinscheduler.api.enums.Status.QUERY_PROCESS_DEFINITION_VERSIONS_ERROR;
-import static org.apache.dolphinscheduler.api.enums.Status.RELEASE_PROCESS_DEFINITION_ERROR;
-import static org.apache.dolphinscheduler.api.enums.Status.SWITCH_PROCESS_DEFINITION_VERSION_ERROR;
-import static org.apache.dolphinscheduler.api.enums.Status.UPDATE_PROCESS_DEFINITION_ERROR;
-import static org.apache.dolphinscheduler.api.enums.Status.VERIFY_PROCESS_DEFINITION_NAME_UNIQUE_ERROR;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
/**
* process definition controller
@@ -108,10 +113,10 @@ public class ProcessDefinitionController extends BaseController {
*/
@ApiOperation(value = "createProcessDefinition", notes = "CREATE_PROCESS_DEFINITION_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "name", value = "PROCESS_DEFINITION_NAME", required = true, type = "String"),
- @ApiImplicitParam(name = "locations", value = "PROCESS_DEFINITION_LOCATIONS", required = true, type = "String"),
- @ApiImplicitParam(name = "description", value = "PROCESS_DEFINITION_DESC", required = false, type = "String"),
- @ApiImplicitParam(name = "otherParamsJson", value = "OTHER_PARAMS_JSON", required = false, type = "String")
+ @ApiImplicitParam(name = "name", value = "PROCESS_DEFINITION_NAME", required = true, dataTypeClass = String.class),
+ @ApiImplicitParam(name = "locations", value = "PROCESS_DEFINITION_LOCATIONS", required = true, dataTypeClass = String.class),
+ @ApiImplicitParam(name = "description", value = "PROCESS_DEFINITION_DESC", required = false, dataTypeClass = String.class),
+ @ApiImplicitParam(name = "otherParamsJson", value = "OTHER_PARAMS_JSON", required = false, dataTypeClass = String.class)
})
@PostMapping()
@ResponseStatus(HttpStatus.CREATED)
@@ -129,8 +134,9 @@ public class ProcessDefinitionController extends BaseController {
@RequestParam(value = "taskDefinitionJson", required = true) String taskDefinitionJson,
@RequestParam(value = "otherParamsJson", required = false) String otherParamsJson,
@RequestParam(value = "executionType", defaultValue = "PARALLEL") ProcessExecutionTypeEnum executionType) {
- Map<String, Object> result = processDefinitionService.createProcessDefinition(loginUser, projectCode, name, description, globalParams,
- locations, timeout, tenantCode, taskRelationJson, taskDefinitionJson, otherParamsJson, executionType);
+ Map<String, Object> result = processDefinitionService.createProcessDefinition(loginUser, projectCode, name,
+ description, globalParams,
+ locations, timeout, tenantCode, taskRelationJson, taskDefinitionJson, otherParamsJson, executionType);
return returnDataList(result);
}
@@ -145,8 +151,8 @@ public class ProcessDefinitionController extends BaseController {
*/
@ApiOperation(value = "batchCopyByCodes", notes = "COPY_PROCESS_DEFINITION_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "codes", value = "PROCESS_DEFINITION_CODES", required = true, dataType = "String", example = "3,4"),
- @ApiImplicitParam(name = "targetProjectCode", value = "TARGET_PROJECT_CODE", required = true, dataType = "Long", example = "123")
+ @ApiImplicitParam(name = "codes", value = "PROCESS_DEFINITION_CODES", required = true, dataTypeClass = String.class, example = "3,4"),
+ @ApiImplicitParam(name = "targetProjectCode", value = "TARGET_PROJECT_CODE", required = true, dataTypeClass = long.class, example = "123")
})
@PostMapping(value = "/batch-copy")
@ResponseStatus(HttpStatus.OK)
@@ -156,7 +162,8 @@ public class ProcessDefinitionController extends BaseController {
@ApiParam(name = "projectCode", value = "PROJECT_CODE", required = true) @PathVariable long projectCode,
@RequestParam(value = "codes", required = true) String codes,
@RequestParam(value = "targetProjectCode", required = true) long targetProjectCode) {
- return returnDataList(processDefinitionService.batchCopyProcessDefinition(loginUser, projectCode, codes, targetProjectCode));
+ return returnDataList(
+ processDefinitionService.batchCopyProcessDefinition(loginUser, projectCode, codes, targetProjectCode));
}
/**
@@ -170,8 +177,8 @@ public class ProcessDefinitionController extends BaseController {
*/
@ApiOperation(value = "batchMoveByCodes", notes = "MOVE_PROCESS_DEFINITION_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "codes", value = "PROCESS_DEFINITION_CODES", required = true, dataType = "String", example = "3,4"),
- @ApiImplicitParam(name = "targetProjectCode", value = "TARGET_PROJECT_CODE", required = true, dataType = "Long", example = "123")
+ @ApiImplicitParam(name = "codes", value = "PROCESS_DEFINITION_CODES", required = true, dataTypeClass = String.class, example = "3,4"),
+ @ApiImplicitParam(name = "targetProjectCode", value = "TARGET_PROJECT_CODE", required = true, dataTypeClass = long.class, example = "123")
})
@PostMapping(value = "/batch-move")
@ResponseStatus(HttpStatus.OK)
@@ -181,7 +188,8 @@ public class ProcessDefinitionController extends BaseController {
@ApiParam(name = "projectCode", value = "PROJECT_CODE", required = true) @PathVariable long projectCode,
@RequestParam(value = "codes", required = true) String codes,
@RequestParam(value = "targetProjectCode", required = true) long targetProjectCode) {
- return returnDataList(processDefinitionService.batchMoveProcessDefinition(loginUser, projectCode, codes, targetProjectCode));
+ return returnDataList(
+ processDefinitionService.batchMoveProcessDefinition(loginUser, projectCode, codes, targetProjectCode));
}
/**
@@ -194,7 +202,7 @@ public class ProcessDefinitionController extends BaseController {
*/
@ApiOperation(value = "verify-name", notes = "VERIFY_PROCESS_DEFINITION_NAME_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "name", value = "PROCESS_DEFINITION_NAME", required = true, type = "String")
+ @ApiImplicitParam(name = "name", value = "PROCESS_DEFINITION_NAME", required = true, dataTypeClass = String.class)
})
@GetMapping(value = "/verify-name")
@ResponseStatus(HttpStatus.OK)
@@ -226,12 +234,12 @@ public class ProcessDefinitionController extends BaseController {
*/
@ApiOperation(value = "update", notes = "UPDATE_PROCESS_DEFINITION_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "name", value = "PROCESS_DEFINITION_NAME", required = true, type = "String"),
- @ApiImplicitParam(name = "code", value = "PROCESS_DEFINITION_CODE", required = true, dataType = "Long", example = "123456789"),
- @ApiImplicitParam(name = "locations", value = "PROCESS_DEFINITION_LOCATIONS", required = true, type = "String"),
- @ApiImplicitParam(name = "description", value = "PROCESS_DEFINITION_DESC", required = false, type = "String"),
- @ApiImplicitParam(name = "releaseState", value = "RELEASE_PROCESS_DEFINITION_NOTES", required = false, dataType = "ReleaseState"),
- @ApiImplicitParam(name = "otherParamsJson", value = "OTHER_PARAMS_JSON", required = false, type = "String")
+ @ApiImplicitParam(name = "name", value = "PROCESS_DEFINITION_NAME", required = true, dataTypeClass = String.class),
+ @ApiImplicitParam(name = "code", value = "PROCESS_DEFINITION_CODE", required = true, dataTypeClass = long.class, example = "123456789"),
+ @ApiImplicitParam(name = "locations", value = "PROCESS_DEFINITION_LOCATIONS", required = true, dataTypeClass = String.class),
+ @ApiImplicitParam(name = "description", value = "PROCESS_DEFINITION_DESC", required = false, dataTypeClass = String.class),
+ @ApiImplicitParam(name = "releaseState", value = "RELEASE_PROCESS_DEFINITION_NOTES", required = false, dataTypeClass = ReleaseState.class),
+ @ApiImplicitParam(name = "otherParamsJson", value = "OTHER_PARAMS_JSON", required = false, dataTypeClass = String.class)
})
@PutMapping(value = "/{code}")
@ResponseStatus(HttpStatus.OK)
@@ -252,14 +260,15 @@ public class ProcessDefinitionController extends BaseController {
@RequestParam(value = "executionType", defaultValue = "PARALLEL") ProcessExecutionTypeEnum executionType,
@RequestParam(value = "releaseState", required = false, defaultValue = "OFFLINE") ReleaseState releaseState) {
- Map<String, Object> result = processDefinitionService.updateProcessDefinition(loginUser, projectCode, name, code, description, globalParams,
- locations, timeout, tenantCode, taskRelationJson, taskDefinitionJson,otherParamsJson, executionType);
- // If the update fails, the result will be returned directly
+ Map<String, Object> result = processDefinitionService.updateProcessDefinition(loginUser, projectCode, name,
+ code, description, globalParams,
+ locations, timeout, tenantCode, taskRelationJson, taskDefinitionJson, otherParamsJson, executionType);
+ // If the update fails, the result will be returned directly
if (result.get(Constants.STATUS) != Status.SUCCESS) {
return returnDataList(result);
}
- // Judge whether to go online after editing,0 means offline, 1 means online
+ // Judge whether to go online after editing,0 means offline, 1 means online
if (releaseState == ReleaseState.ONLINE) {
result = processDefinitionService.releaseProcessDefinition(loginUser, projectCode, code, releaseState);
}
@@ -278,9 +287,9 @@ public class ProcessDefinitionController extends BaseController {
*/
@ApiOperation(value = "queryVersions", notes = "QUERY_PROCESS_DEFINITION_VERSIONS_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "pageNo", value = "PAGE_NO", required = true, dataType = "Int", example = "1"),
- @ApiImplicitParam(name = "pageSize", value = "PAGE_SIZE", required = true, dataType = "Int", example = "10"),
- @ApiImplicitParam(name = "code", value = "PROCESS_DEFINITION_CODE", required = true, dataType = "Long", example = "1")
+ @ApiImplicitParam(name = "pageNo", value = "PAGE_NO", required = true, dataTypeClass = int.class, example = "1"),
+ @ApiImplicitParam(name = "pageSize", value = "PAGE_SIZE", required = true, dataTypeClass = int.class, example = "10"),
+ @ApiImplicitParam(name = "code", value = "PROCESS_DEFINITION_CODE", required = true, dataTypeClass = long.class, example = "1")
})
@GetMapping(value = "/{code}/versions")
@ResponseStatus(HttpStatus.OK)
@@ -296,7 +305,8 @@ public class ProcessDefinitionController extends BaseController {
if (!result.checkResult()) {
return result;
}
- result = processDefinitionService.queryProcessDefinitionVersions(loginUser, projectCode, pageNo, pageSize, code);
+ result = processDefinitionService.queryProcessDefinitionVersions(loginUser, projectCode, pageNo, pageSize,
+ code);
return result;
}
@@ -312,8 +322,8 @@ public class ProcessDefinitionController extends BaseController {
*/
@ApiOperation(value = "switchVersion", notes = "SWITCH_PROCESS_DEFINITION_VERSION_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "code", value = "PROCESS_DEFINITION_CODE", required = true, dataType = "Long", example = "1"),
- @ApiImplicitParam(name = "version", value = "VERSION", required = true, dataType = "Int", example = "100")
+ @ApiImplicitParam(name = "code", value = "PROCESS_DEFINITION_CODE", required = true, dataTypeClass = long.class, example = "1"),
+ @ApiImplicitParam(name = "version", value = "VERSION", required = true, dataTypeClass = int.class, example = "100")
})
@GetMapping(value = "/{code}/versions/{version}")
@ResponseStatus(HttpStatus.OK)
@@ -323,7 +333,8 @@ public class ProcessDefinitionController extends BaseController {
@ApiParam(name = "projectCode", value = "PROJECT_CODE", required = true) @PathVariable long projectCode,
@PathVariable(value = "code") long code,
@PathVariable(value = "version") int version) {
- Map<String, Object> result = processDefinitionService.switchProcessDefinitionVersion(loginUser, projectCode, code, version);
+ Map<String, Object> result =
+ processDefinitionService.switchProcessDefinitionVersion(loginUser, projectCode, code, version);
return returnDataList(result);
}
@@ -338,8 +349,8 @@ public class ProcessDefinitionController extends BaseController {
*/
@ApiOperation(value = "deleteVersion", notes = "DELETE_PROCESS_DEFINITION_VERSION_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "code", value = "PROCESS_DEFINITION_CODE", required = true, dataType = "Long", example = "1"),
- @ApiImplicitParam(name = "version", value = "VERSION", required = true, dataType = "Int", example = "100")
+ @ApiImplicitParam(name = "code", value = "PROCESS_DEFINITION_CODE", required = true, dataTypeClass = long.class, example = "1"),
+ @ApiImplicitParam(name = "version", value = "VERSION", required = true, dataTypeClass = int.class, example = "100")
})
@DeleteMapping(value = "/{code}/versions/{version}")
@ResponseStatus(HttpStatus.OK)
@@ -349,7 +360,8 @@ public class ProcessDefinitionController extends BaseController {
@ApiParam(name = "projectCode", value = "PROJECT_CODE", required = true) @PathVariable long projectCode,
@PathVariable(value = "code") long code,
@PathVariable(value = "version") int version) {
- Map<String, Object> result = processDefinitionService.deleteProcessDefinitionVersion(loginUser, projectCode, code, version);
+ Map<String, Object> result =
+ processDefinitionService.deleteProcessDefinitionVersion(loginUser, projectCode, code, version);
return returnDataList(result);
}
@@ -364,9 +376,9 @@ public class ProcessDefinitionController extends BaseController {
*/
@ApiOperation(value = "release", notes = "RELEASE_PROCESS_DEFINITION_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "name", value = "PROCESS_DEFINITION_NAME", required = true, type = "String"),
- @ApiImplicitParam(name = "code", value = "PROCESS_DEFINITION_CODE", required = true, dataType = "Long", example = "123456789"),
- @ApiImplicitParam(name = "releaseState", value = "PROCESS_DEFINITION_RELEASE", required = true, dataType = "ReleaseState"),
+ @ApiImplicitParam(name = "name", value = "PROCESS_DEFINITION_NAME", required = true, dataTypeClass = String.class),
+ @ApiImplicitParam(name = "code", value = "PROCESS_DEFINITION_CODE", required = true, dataTypeClass = long.class, example = "123456789"),
+ @ApiImplicitParam(name = "releaseState", value = "PROCESS_DEFINITION_RELEASE", required = true, dataTypeClass = ReleaseState.class),
})
@PostMapping(value = "/{code}/release")
@ResponseStatus(HttpStatus.OK)
@@ -376,7 +388,8 @@ public class ProcessDefinitionController extends BaseController {
@ApiParam(name = "projectCode", value = "PROJECT_CODE", required = true) @PathVariable long projectCode,
@PathVariable(value = "code", required = true) long code,
@RequestParam(value = "releaseState", required = true) ReleaseState releaseState) {
- Map<String, Object> result = processDefinitionService.releaseProcessDefinition(loginUser, projectCode, code, releaseState);
+ Map<String, Object> result =
+ processDefinitionService.releaseProcessDefinition(loginUser, projectCode, code, releaseState);
return returnDataList(result);
}
@@ -390,7 +403,7 @@ public class ProcessDefinitionController extends BaseController {
*/
@ApiOperation(value = "queryProcessDefinitionByCode", notes = "QUERY_PROCESS_DEFINITION_BY_CODE_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "code", value = "PROCESS_DEFINITION_CODE", required = true, dataType = "Long", example = "123456789")
+ @ApiImplicitParam(name = "code", value = "PROCESS_DEFINITION_CODE", required = true, dataTypeClass = long.class, example = "123456789")
})
@GetMapping(value = "/{code}")
@ResponseStatus(HttpStatus.OK)
@@ -399,7 +412,8 @@ public class ProcessDefinitionController extends BaseController {
public Result queryProcessDefinitionByCode(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@ApiParam(name = "projectCode", value = "PROJECT_CODE", required = true) @PathVariable long projectCode,
@PathVariable(value = "code", required = true) long code) {
- Map<String, Object> result = processDefinitionService.queryProcessDefinitionByCode(loginUser, projectCode, code);
+ Map<String, Object> result =
+ processDefinitionService.queryProcessDefinitionByCode(loginUser, projectCode, code);
return returnDataList(result);
}
@@ -413,7 +427,7 @@ public class ProcessDefinitionController extends BaseController {
*/
@ApiOperation(value = "queryProcessDefinitionByName", notes = "QUERY_PROCESS_DEFINITION_BY_NAME_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "name", value = "PROCESS_DEFINITION_NAME", required = true, dataType = "String")
+ @ApiImplicitParam(name = "name", value = "PROCESS_DEFINITION_NAME", required = true, dataTypeClass = String.class)
})
@GetMapping(value = "/query-by-name")
@ResponseStatus(HttpStatus.OK)
@@ -422,7 +436,8 @@ public class ProcessDefinitionController extends BaseController {
public Result<ProcessDefinition> queryProcessDefinitionByName(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@ApiParam(name = "projectCode", value = "PROJECT_CODE", required = true) @PathVariable long projectCode,
@RequestParam("name") String name) {
- Map<String, Object> result = processDefinitionService.queryProcessDefinitionByName(loginUser, projectCode, name);
+ Map<String, Object> result =
+ processDefinitionService.queryProcessDefinitionByName(loginUser, projectCode, name);
return returnDataList(result);
}
@@ -476,11 +491,11 @@ public class ProcessDefinitionController extends BaseController {
*/
@ApiOperation(value = "queryListPaging", notes = "QUERY_PROCESS_DEFINITION_LIST_PAGING_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "searchVal", value = "SEARCH_VAL", required = false, type = "String"),
- @ApiImplicitParam(name = "userId", value = "USER_ID", required = false, dataType = "Int", example = "100"),
- @ApiImplicitParam(name = "pageNo", value = "PAGE_NO", required = true, dataType = "Int", example = "1"),
- @ApiImplicitParam(name = "pageSize", value = "PAGE_SIZE", required = true, dataType = "Int", example = "10"),
- @ApiImplicitParam(name = "otherParamsJson", value = "OTHER_PARAMS_JSON", required = false, type = "String")
+ @ApiImplicitParam(name = "searchVal", value = "SEARCH_VAL", required = false, dataTypeClass = String.class),
+ @ApiImplicitParam(name = "userId", value = "USER_ID", required = false, dataTypeClass = int.class, example = "100"),
+ @ApiImplicitParam(name = "pageNo", value = "PAGE_NO", required = true, dataTypeClass = int.class, example = "1"),
+ @ApiImplicitParam(name = "pageSize", value = "PAGE_SIZE", required = true, dataTypeClass = int.class, example = "10"),
+ @ApiImplicitParam(name = "otherParamsJson", value = "OTHER_PARAMS_JSON", required = false, dataTypeClass = String.class)
})
@GetMapping()
@ResponseStatus(HttpStatus.OK)
@@ -499,7 +514,8 @@ public class ProcessDefinitionController extends BaseController {
}
searchVal = ParameterUtils.handleEscapes(searchVal);
- return processDefinitionService.queryProcessDefinitionListPaging(loginUser, projectCode, searchVal, otherParamsJson, userId, pageNo, pageSize);
+ return processDefinitionService.queryProcessDefinitionListPaging(loginUser, projectCode, searchVal,
+ otherParamsJson, userId, pageNo, pageSize);
}
/**
@@ -513,8 +529,8 @@ public class ProcessDefinitionController extends BaseController {
*/
@ApiOperation(value = "viewTree", notes = "VIEW_TREE_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "code", value = "PROCESS_DEFINITION_CODE", required = true, dataType = "Long", example = "100"),
- @ApiImplicitParam(name = "limit", value = "LIMIT", required = true, dataType = "Int", example = "100")
+ @ApiImplicitParam(name = "code", value = "PROCESS_DEFINITION_CODE", required = true, dataTypeClass = long.class, example = "100"),
+ @ApiImplicitParam(name = "limit", value = "LIMIT", required = true, dataTypeClass = int.class, example = "100")
})
@GetMapping(value = "/{code}/view-tree")
@ResponseStatus(HttpStatus.OK)
@@ -524,7 +540,7 @@ public class ProcessDefinitionController extends BaseController {
@ApiParam(name = "projectCode", value = "PROJECT_CODE", required = true) @PathVariable long projectCode,
@PathVariable("code") long code,
@RequestParam("limit") Integer limit) {
- Map<String, Object> result = processDefinitionService.viewTree(loginUser,projectCode, code, limit);
+ Map<String, Object> result = processDefinitionService.viewTree(loginUser, projectCode, code, limit);
return returnDataList(result);
}
@@ -538,7 +554,7 @@ public class ProcessDefinitionController extends BaseController {
*/
@ApiOperation(value = "getTasksByDefinitionCode", notes = "GET_TASK_LIST_BY_DEFINITION_CODE_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "code", value = "PROCESS_DEFINITION_CODE", required = true, dataType = "Long", example = "100")
+ @ApiImplicitParam(name = "code", value = "PROCESS_DEFINITION_CODE", required = true, dataTypeClass = long.class, example = "100")
})
@GetMapping(value = "/{code}/tasks")
@ResponseStatus(HttpStatus.OK)
@@ -546,7 +562,8 @@ public class ProcessDefinitionController extends BaseController {
public Result getNodeListByDefinitionCode(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@ApiParam(name = "projectCode", value = "PROJECT_CODE", required = true) @PathVariable long projectCode,
@PathVariable("code") long code) {
- Map<String, Object> result = processDefinitionService.getTaskNodeListByDefinitionCode(loginUser, projectCode, code);
+ Map<String, Object> result =
+ processDefinitionService.getTaskNodeListByDefinitionCode(loginUser, projectCode, code);
return returnDataList(result);
}
@@ -560,7 +577,7 @@ public class ProcessDefinitionController extends BaseController {
*/
@ApiOperation(value = "getTaskListByDefinitionCodes", notes = "GET_TASK_LIST_BY_DEFINITION_CODE_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "codes", value = "PROCESS_DEFINITION_CODES", required = true, type = "String", example = "100,200,300")
+ @ApiImplicitParam(name = "codes", value = "PROCESS_DEFINITION_CODES", required = true, dataTypeClass = String.class, example = "100,200,300")
})
@GetMapping(value = "/batch-query-tasks")
@ResponseStatus(HttpStatus.OK)
@@ -568,7 +585,8 @@ public class ProcessDefinitionController extends BaseController {
public Result getNodeListMapByDefinitionCodes(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@ApiParam(name = "projectCode", value = "PROJECT_CODE", required = true) @PathVariable long projectCode,
@RequestParam("codes") String codes) {
- Map<String, Object> result = processDefinitionService.getNodeListMapByDefinitionCodes(loginUser, projectCode, codes);
+ Map<String, Object> result =
+ processDefinitionService.getNodeListMapByDefinitionCodes(loginUser, projectCode, codes);
return returnDataList(result);
}
@@ -581,14 +599,13 @@ public class ProcessDefinitionController extends BaseController {
*/
@ApiOperation(value = "getProcessListByProjectCode", notes = "GET_PROCESS_LIST_BY_PROCESS_CODE_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "projectCode", value = "PROJECT_CODE", required = true, type = "Long", example = "100")
+ @ApiImplicitParam(name = "projectCode", value = "PROJECT_CODE", required = true, dataTypeClass = long.class, example = "100")
})
@GetMapping(value = "/query-process-definition-list")
@ResponseStatus(HttpStatus.OK)
@ApiException(GET_TASKS_LIST_BY_PROCESS_DEFINITION_ID_ERROR)
public Result getProcessListByProjectCodes(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
- @ApiParam(name = "projectCode", value = "PROJECT_CODE", required = true) @PathVariable long projectCode
- ) {
+ @ApiParam(name = "projectCode", value = "PROJECT_CODE", required = true) @PathVariable long projectCode) {
Map<String, Object> result = processDefinitionService.queryProcessDefinitionListByProjectCode(projectCode);
return returnDataList(result);
}
@@ -602,8 +619,8 @@ public class ProcessDefinitionController extends BaseController {
*/
@ApiOperation(value = "getTaskListByProcessDefinitionCode", notes = "GET_TASK_LIST_BY_PROCESS_CODE_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "projectCode", value = "PROJECT_CODE", required = true, type = "Long", example = "100"),
- @ApiImplicitParam(name = "processDefinitionCode", value = "PROCESS_DEFINITION_CODE", required = true, dataType = "Long", example = "100"),
+ @ApiImplicitParam(name = "projectCode", value = "PROJECT_CODE", required = true, dataTypeClass = long.class, example = "100"),
+ @ApiImplicitParam(name = "processDefinitionCode", value = "PROCESS_DEFINITION_CODE", required = true, dataTypeClass = long.class, example = "100"),
})
@GetMapping(value = "/query-task-definition-list")
@ResponseStatus(HttpStatus.OK)
@@ -611,7 +628,8 @@ public class ProcessDefinitionController extends BaseController {
public Result getTaskListByProcessDefinitionCode(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@ApiParam(name = "projectCode", value = "PROJECT_CODE", required = true) @PathVariable long projectCode,
@RequestParam(value = "processDefinitionCode") Long processDefinitionCode) {
- Map<String, Object> result = processDefinitionService.queryTaskDefinitionListByProcessDefinitionCode(projectCode, processDefinitionCode);
+ Map<String, Object> result = processDefinitionService
+ .queryTaskDefinitionListByProcessDefinitionCode(projectCode, processDefinitionCode);
return returnDataList(result);
}
@@ -625,7 +643,7 @@ public class ProcessDefinitionController extends BaseController {
*/
@ApiOperation(value = "deleteByCode", notes = "DELETE_PROCESS_DEFINITION_BY_ID_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "code", value = "PROCESS_DEFINITION_CODE", dataType = "Int", example = "100")
+ @ApiImplicitParam(name = "code", value = "PROCESS_DEFINITION_CODE", dataTypeClass = int.class, example = "100")
})
@DeleteMapping(value = "/{code}")
@ResponseStatus(HttpStatus.OK)
@@ -634,7 +652,8 @@ public class ProcessDefinitionController extends BaseController {
public Result deleteProcessDefinitionByCode(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@ApiParam(name = "projectCode", value = "PROJECT_CODE", required = true) @PathVariable long projectCode,
@PathVariable("code") long code) {
- Map<String, Object> result = processDefinitionService.deleteProcessDefinitionByCode(loginUser, projectCode, code);
+ Map<String, Object> result =
+ processDefinitionService.deleteProcessDefinitionByCode(loginUser, projectCode, code);
return returnDataList(result);
}
@@ -648,7 +667,7 @@ public class ProcessDefinitionController extends BaseController {
*/
@ApiOperation(value = "batchDeleteByCodes", notes = "BATCH_DELETE_PROCESS_DEFINITION_BY_IDS_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "codes", value = "PROCESS_DEFINITION_CODE", required = true, dataType = "String")
+ @ApiImplicitParam(name = "codes", value = "PROCESS_DEFINITION_CODE", required = true, dataTypeClass = String.class)
})
@PostMapping(value = "/batch-delete")
@ResponseStatus(HttpStatus.OK)
@@ -664,13 +683,15 @@ public class ProcessDefinitionController extends BaseController {
for (String strProcessDefinitionCode : processDefinitionCodeArray) {
long code = Long.parseLong(strProcessDefinitionCode);
try {
- Map<String, Object> deleteResult = processDefinitionService.deleteProcessDefinitionByCode(loginUser, projectCode, code);
+ Map<String, Object> deleteResult =
+ processDefinitionService.deleteProcessDefinitionByCode(loginUser, projectCode, code);
if (!Status.SUCCESS.equals(deleteResult.get(Constants.STATUS))) {
deleteFailedCodeSet.add((String) deleteResult.get(Constants.MSG));
logger.error((String) deleteResult.get(Constants.MSG));
}
} catch (Exception e) {
- deleteFailedCodeSet.add(MessageFormat.format(Status.DELETE_PROCESS_DEFINE_BY_CODES_ERROR.getMsg(), strProcessDefinitionCode));
+ deleteFailedCodeSet.add(MessageFormat.format(Status.DELETE_PROCESS_DEFINE_BY_CODES_ERROR.getMsg(),
+ strProcessDefinitionCode));
}
}
}
@@ -693,7 +714,7 @@ public class ProcessDefinitionController extends BaseController {
*/
@ApiOperation(value = "batchExportByCodes", notes = "BATCH_EXPORT_PROCESS_DEFINITION_BY_CODES_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "codes", value = "PROCESS_DEFINITION_CODE", required = true, dataType = "String")
+ @ApiImplicitParam(name = "codes", value = "PROCESS_DEFINITION_CODE", required = true, dataTypeClass = String.class)
})
@PostMapping(value = "/batch-export")
@ResponseBody
@@ -723,7 +744,8 @@ public class ProcessDefinitionController extends BaseController {
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
public Result queryAllProcessDefinitionByProjectCode(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@ApiParam(name = "projectCode", value = "PROJECT_CODE", required = true) @PathVariable long projectCode) {
- Map<String, Object> result = processDefinitionService.queryAllProcessDefinitionByProjectCode(loginUser, projectCode);
+ Map<String, Object> result =
+ processDefinitionService.queryAllProcessDefinitionByProjectCode(loginUser, projectCode);
return returnDataList(result);
}
@@ -737,7 +759,7 @@ public class ProcessDefinitionController extends BaseController {
*/
@ApiOperation(value = "importProcessDefinition", notes = "IMPORT_PROCESS_DEFINITION_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "file", value = "RESOURCE_FILE", required = true, dataType = "MultipartFile")
+ @ApiImplicitParam(name = "file", value = "RESOURCE_FILE", required = true, dataTypeClass = MultipartFile.class)
})
@PostMapping(value = "/import")
@ApiException(IMPORT_PROCESS_DEFINE_ERROR)
@@ -769,9 +791,9 @@ public class ProcessDefinitionController extends BaseController {
*/
@ApiOperation(value = "createEmptyProcessDefinition", notes = "CREATE_EMPTY_PROCESS_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "name", value = "PROCESS_DEFINITION_NAME", required = true, type = "String"),
- @ApiImplicitParam(name = "projectCode", value = "PROJECT_CODE", required = true, dataType = "Long", example = "123456789"),
- @ApiImplicitParam(name = "description", value = "PROCESS_DEFINITION_DESC", required = false, type = "String")
+ @ApiImplicitParam(name = "name", value = "PROCESS_DEFINITION_NAME", required = true, dataTypeClass = String.class),
+ @ApiImplicitParam(name = "projectCode", value = "PROJECT_CODE", required = true, dataTypeClass = long.class, example = "123456789"),
+ @ApiImplicitParam(name = "description", value = "PROCESS_DEFINITION_DESC", required = false, dataTypeClass = String.class)
})
@PostMapping(value = "/empty")
@ResponseStatus(HttpStatus.OK)
@@ -786,8 +808,9 @@ public class ProcessDefinitionController extends BaseController {
@RequestParam(value = "tenantCode", required = true) String tenantCode,
@RequestParam(value = "scheduleJson", required = false) String scheduleJson,
@RequestParam(value = "executionType", defaultValue = "PARALLEL") ProcessExecutionTypeEnum executionType) {
- return returnDataList(processDefinitionService.createEmptyProcessDefinition(loginUser, projectCode, name, description, globalParams,
- timeout, tenantCode, scheduleJson, executionType));
+ return returnDataList(processDefinitionService.createEmptyProcessDefinition(loginUser, projectCode, name,
+ description, globalParams,
+ timeout, tenantCode, scheduleJson, executionType));
}
/**
@@ -809,11 +832,11 @@ public class ProcessDefinitionController extends BaseController {
*/
@ApiOperation(value = "updateBasicInfo", notes = "UPDATE_PROCESS_DEFINITION_BASIC_INFO_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "name", value = "PROCESS_DEFINITION_NAME", required = true, type = "String"),
- @ApiImplicitParam(name = "code", value = "PROCESS_DEFINITION_CODE", required = true, dataType = "Long", example = "123456789"),
- @ApiImplicitParam(name = "description", value = "PROCESS_DEFINITION_DESC", required = false, type = "String"),
- @ApiImplicitParam(name = "releaseState", value = "RELEASE_PROCESS_DEFINITION_NOTES", required = false, dataType = "ReleaseState"),
- @ApiImplicitParam(name = "otherParamsJson", value = "OTHER_PARAMS_JSON", required = false, type = "String")
+ @ApiImplicitParam(name = "name", value = "PROCESS_DEFINITION_NAME", required = true, dataTypeClass = String.class),
+ @ApiImplicitParam(name = "code", value = "PROCESS_DEFINITION_CODE", required = true, dataTypeClass = long.class, example = "123456789"),
+ @ApiImplicitParam(name = "description", value = "PROCESS_DEFINITION_DESC", required = false, dataTypeClass = String.class),
+ @ApiImplicitParam(name = "releaseState", value = "RELEASE_PROCESS_DEFINITION_NOTES", required = false, dataTypeClass = ReleaseState.class),
+ @ApiImplicitParam(name = "otherParamsJson", value = "OTHER_PARAMS_JSON", required = false, dataTypeClass = String.class)
})
@PutMapping(value = "/{code}/basic-info")
@ResponseStatus(HttpStatus.OK)
@@ -831,14 +854,15 @@ public class ProcessDefinitionController extends BaseController {
@RequestParam(value = "otherParamsJson", required = false) String otherParamsJson,
@RequestParam(value = "executionType", defaultValue = "PARALLEL") ProcessExecutionTypeEnum executionType,
@RequestParam(value = "releaseState", required = false, defaultValue = "OFFLINE") ReleaseState releaseState) {
- Map<String, Object> result = processDefinitionService.updateProcessDefinitionBasicInfo(loginUser, projectCode, name, code, description, globalParams,
- timeout, tenantCode, scheduleJson, otherParamsJson, executionType);
- // If the update fails, the result will be returned directly
+ Map<String, Object> result = processDefinitionService.updateProcessDefinitionBasicInfo(loginUser, projectCode,
+ name, code, description, globalParams,
+ timeout, tenantCode, scheduleJson, otherParamsJson, executionType);
+ // If the update fails, the result will be returned directly
if (result.get(Constants.STATUS) != Status.SUCCESS) {
return returnDataList(result);
}
- // Judge whether to go online after editing,0 means offline, 1 means online
+ // Judge whether to go online after editing,0 means offline, 1 means online
if (releaseState == ReleaseState.ONLINE) {
result = processDefinitionService.releaseWorkflowAndSchedule(loginUser, projectCode, code, releaseState);
}
@@ -856,9 +880,9 @@ public class ProcessDefinitionController extends BaseController {
*/
@ApiOperation(value = "releaseWorkflowAndSchedule", notes = "RELEASE_WORKFLOW_SCHEDULE_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "projectCode", value = "PROCESS_DEFINITION_NAME", required = true, type = "Long"),
- @ApiImplicitParam(name = "code", value = "PROCESS_DEFINITION_CODE", required = true, dataType = "Long", example = "123456789"),
- @ApiImplicitParam(name = "releaseState", value = "RELEASE_PROCESS_DEFINITION_NOTES", required = true, dataType = "ReleaseState")
+ @ApiImplicitParam(name = "projectCode", value = "PROCESS_DEFINITION_NAME", required = true, dataTypeClass = long.class),
+ @ApiImplicitParam(name = "code", value = "PROCESS_DEFINITION_CODE", required = true, dataTypeClass = long.class, example = "123456789"),
+ @ApiImplicitParam(name = "releaseState", value = "RELEASE_PROCESS_DEFINITION_NOTES", required = true, dataTypeClass = ReleaseState.class)
})
@PostMapping(value = "/{code}/release-workflow")
@ResponseStatus(HttpStatus.OK)
@@ -868,6 +892,7 @@ public class ProcessDefinitionController extends BaseController {
@ApiParam(name = "projectCode", value = "PROJECT_CODE", required = true) @PathVariable long projectCode,
@PathVariable(value = "code", required = true) long code,
@RequestParam(value = "releaseState", required = true, defaultValue = "OFFLINE") ReleaseState releaseState) {
- return returnDataList(processDefinitionService.releaseWorkflowAndSchedule(loginUser, projectCode, code, releaseState));
+ return returnDataList(
+ processDefinitionService.releaseWorkflowAndSchedule(loginUser, projectCode, code, releaseState));
}
}
diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ProcessInstanceController.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ProcessInstanceController.java
index a5ccd5b329..3fc3bb7e8c 100644
--- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ProcessInstanceController.java
+++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ProcessInstanceController.java
@@ -36,6 +36,8 @@ import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
+import org.apache.commons.lang3.StringUtils;
+
import java.io.IOException;
import java.text.MessageFormat;
import java.util.ArrayList;
@@ -76,15 +78,15 @@ public class ProcessInstanceController extends BaseController {
*/
@ApiOperation(value = "queryProcessInstanceListPaging", notes = "QUERY_PROCESS_INSTANCE_LIST_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "processDefineCode", value = "PROCESS_DEFINITION_CODE", dataType = "Long", example = "100"),
- @ApiImplicitParam(name = "searchVal", value = "SEARCH_VAL", type = "String"),
- @ApiImplicitParam(name = "executorName", value = "EXECUTOR_NAME", type = "String"),
- @ApiImplicitParam(name = "stateType", value = "EXECUTION_STATUS", type = "ExecutionStatus"),
- @ApiImplicitParam(name = "host", value = "HOST", type = "String"),
- @ApiImplicitParam(name = "startDate", value = "START_DATE", type = "String"),
- @ApiImplicitParam(name = "endDate", value = "END_DATE", type = "String"),
- @ApiImplicitParam(name = "pageNo", value = "PAGE_NO", required = true, dataType = "Int", example = "1"),
- @ApiImplicitParam(name = "pageSize", value = "PAGE_SIZE", required = true, dataType = "Int", example = "10")
+ @ApiImplicitParam(name = "processDefineCode", value = "PROCESS_DEFINITION_CODE", dataTypeClass = long.class, example = "100"),
+ @ApiImplicitParam(name = "searchVal", value = "SEARCH_VAL", dataTypeClass = String.class),
+ @ApiImplicitParam(name = "executorName", value = "EXECUTOR_NAME", dataTypeClass = String.class),
+ @ApiImplicitParam(name = "stateType", value = "EXECUTION_STATUS", dataTypeClass = WorkflowExecutionStatus.class),
+ @ApiImplicitParam(name = "host", value = "HOST", dataTypeClass = String.class),
+ @ApiImplicitParam(name = "startDate", value = "START_DATE", dataTypeClass = String.class),
+ @ApiImplicitParam(name = "endDate", value = "END_DATE", dataTypeClass = String.class),
+ @ApiImplicitParam(name = "pageNo", value = "PAGE_NO", required = true, dataTypeClass = int.class, example = "1"),
+ @ApiImplicitParam(name = "pageSize", value = "PAGE_SIZE", required = true, dataTypeClass = int.class, example = "10")
})
@GetMapping()
@ResponseStatus(HttpStatus.OK)
@@ -124,7 +126,7 @@ public class ProcessInstanceController extends BaseController {
*/
@ApiOperation(value = "queryTaskListByProcessId", notes = "QUERY_TASK_LIST_BY_PROCESS_INSTANCE_ID_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "id", value = "PROCESS_INSTANCE_ID", required = true, dataType = "Int", example = "100")
+ @ApiImplicitParam(name = "id", value = "PROCESS_INSTANCE_ID", required = true, dataTypeClass = int.class, example = "100")
})
@GetMapping(value = "/{id}/tasks")
@ResponseStatus(HttpStatus.OK)
@@ -153,15 +155,15 @@ public class ProcessInstanceController extends BaseController {
*/
@ApiOperation(value = "updateProcessInstance", notes = "UPDATE_PROCESS_INSTANCE_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "taskRelationJson", value = "TASK_RELATION_JSON", type = "String"),
- @ApiImplicitParam(name = "taskDefinitionJson", value = "TASK_DEFINITION_JSON", type = "String"),
- @ApiImplicitParam(name = "id", value = "PROCESS_INSTANCE_ID", required = true, dataType = "Int", example = "1"),
- @ApiImplicitParam(name = "scheduleTime", value = "SCHEDULE_TIME", type = "String"),
- @ApiImplicitParam(name = "syncDefine", value = "SYNC_DEFINE", required = true, type = "Boolean", example = "false"),
- @ApiImplicitParam(name = "globalParams", value = "PROCESS_GLOBAL_PARAMS", type = "String", example = "[]"),
- @ApiImplicitParam(name = "locations", value = "PROCESS_INSTANCE_LOCATIONS", type = "String"),
- @ApiImplicitParam(name = "timeout", value = "PROCESS_TIMEOUT", type = "Int", example = "0"),
- @ApiImplicitParam(name = "tenantCode", value = "TENANT_CODE", type = "String", example = "default")
+ @ApiImplicitParam(name = "taskRelationJson", value = "TASK_RELATION_JSON", dataTypeClass = String.class),
+ @ApiImplicitParam(name = "taskDefinitionJson", value = "TASK_DEFINITION_JSON", dataTypeClass = String.class),
+ @ApiImplicitParam(name = "id", value = "PROCESS_INSTANCE_ID", required = true, dataTypeClass = int.class, example = "1"),
+ @ApiImplicitParam(name = "scheduleTime", value = "SCHEDULE_TIME", dataTypeClass = String.class),
+ @ApiImplicitParam(name = "syncDefine", value = "SYNC_DEFINE", required = true, dataTypeClass = boolean.class, example = "false"),
+ @ApiImplicitParam(name = "globalParams", value = "PROCESS_GLOBAL_PARAMS", dataTypeClass = String.class, example = "[]"),
+ @ApiImplicitParam(name = "locations", value = "PROCESS_INSTANCE_LOCATIONS", dataTypeClass = String.class),
+ @ApiImplicitParam(name = "timeout", value = "PROCESS_TIMEOUT", dataTypeClass = int.class, example = "0"),
+ @ApiImplicitParam(name = "tenantCode", value = "TENANT_CODE", dataTypeClass = String.class, example = "default")
})
@PutMapping(value = "/{id}")
@ResponseStatus(HttpStatus.OK)
@@ -194,7 +196,7 @@ public class ProcessInstanceController extends BaseController {
*/
@ApiOperation(value = "queryProcessInstanceById", notes = "QUERY_PROCESS_INSTANCE_BY_ID_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "id", value = "PROCESS_INSTANCE_ID", required = true, dataType = "Int", example = "100")
+ @ApiImplicitParam(name = "id", value = "PROCESS_INSTANCE_ID", required = true, dataTypeClass = int.class, example = "100")
})
@GetMapping(value = "/{id}")
@ResponseStatus(HttpStatus.OK)
@@ -219,9 +221,9 @@ public class ProcessInstanceController extends BaseController {
*/
@ApiOperation(value = "queryTopNLongestRunningProcessInstance", notes = "QUERY_TOPN_LONGEST_RUNNING_PROCESS_INSTANCE_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "size", value = "PROCESS_INSTANCE_SIZE", required = true, dataType = "Int", example = "10"),
- @ApiImplicitParam(name = "startTime", value = "PROCESS_INSTANCE_START_TIME", required = true, dataType = "String"),
- @ApiImplicitParam(name = "endTime", value = "PROCESS_INSTANCE_END_TIME", required = true, dataType = "String"),
+ @ApiImplicitParam(name = "size", value = "PROCESS_INSTANCE_SIZE", required = true, dataTypeClass = int.class, example = "10"),
+ @ApiImplicitParam(name = "startTime", value = "PROCESS_INSTANCE_START_TIME", required = true, dataTypeClass = String.class),
+ @ApiImplicitParam(name = "endTime", value = "PROCESS_INSTANCE_END_TIME", required = true, dataTypeClass = String.class),
})
@GetMapping(value = "/top-n")
@ResponseStatus(HttpStatus.OK)
@@ -248,7 +250,7 @@ public class ProcessInstanceController extends BaseController {
*/
@ApiOperation(value = "deleteProcessInstanceById", notes = "DELETE_PROCESS_INSTANCE_BY_ID_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "id", value = "PROCESS_INSTANCE_ID", required = true, dataType = "Int", example = "100")
+ @ApiImplicitParam(name = "id", value = "PROCESS_INSTANCE_ID", required = true, dataTypeClass = int.class, example = "100")
})
@DeleteMapping(value = "/{id}")
@ResponseStatus(HttpStatus.OK)
@@ -271,7 +273,7 @@ public class ProcessInstanceController extends BaseController {
*/
@ApiOperation(value = "querySubProcessInstanceByTaskCode", notes = "QUERY_SUBPROCESS_INSTANCE_BY_TASK_CODE_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "taskCode", value = "TASK_CODE", required = true, dataType = "Long", example = "100")
+ @ApiImplicitParam(name = "taskCode", value = "TASK_CODE", required = true, dataTypeClass = long.class, example = "100")
})
@GetMapping(value = "/query-sub-by-parent")
@ResponseStatus(HttpStatus.OK)
@@ -295,7 +297,7 @@ public class ProcessInstanceController extends BaseController {
*/
@ApiOperation(value = "queryParentInstanceBySubId", notes = "QUERY_PARENT_PROCESS_INSTANCE_BY_SUB_PROCESS_INSTANCE_ID_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "subId", value = "SUB_PROCESS_INSTANCE_ID", required = true, dataType = "Int", example = "100")
+ @ApiImplicitParam(name = "subId", value = "SUB_PROCESS_INSTANCE_ID", required = true, dataTypeClass = int.class, example = "100")
})
@GetMapping(value = "/query-parent-by-sub")
@ResponseStatus(HttpStatus.OK)
@@ -317,7 +319,7 @@ public class ProcessInstanceController extends BaseController {
*/
@ApiOperation(value = "viewVariables", notes = "QUERY_PROCESS_INSTANCE_GLOBAL_VARIABLES_AND_LOCAL_VARIABLES_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "id", value = "PROCESS_INSTANCE_ID", required = true, dataType = "Int", example = "100")
+ @ApiImplicitParam(name = "id", value = "PROCESS_INSTANCE_ID", required = true, dataTypeClass = int.class, example = "100")
})
@GetMapping(value = "/{id}/view-variables")
@ResponseStatus(HttpStatus.OK)
@@ -340,7 +342,7 @@ public class ProcessInstanceController extends BaseController {
*/
@ApiOperation(value = "vieGanttTree", notes = "VIEW_GANTT_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "id", value = "PROCESS_INSTANCE_ID", required = true, dataType = "Int", example = "100")
+ @ApiImplicitParam(name = "id", value = "PROCESS_INSTANCE_ID", required = true, dataTypeClass = int.class, example = "100")
})
@GetMapping(value = "/{id}/view-gantt")
@ResponseStatus(HttpStatus.OK)
@@ -364,8 +366,8 @@ public class ProcessInstanceController extends BaseController {
*/
@ApiOperation(value = "batchDeleteProcessInstanceByIds", notes = "BATCH_DELETE_PROCESS_INSTANCE_BY_IDS_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "projectCode", value = "PROJECT_CODE", required = true, dataType = "Int"),
- @ApiImplicitParam(name = "processInstanceIds", value = "PROCESS_INSTANCE_IDS", required = true, dataType = "String"),
+ @ApiImplicitParam(name = "projectCode", value = "PROJECT_CODE", required = true, dataTypeClass = int.class),
+ @ApiImplicitParam(name = "processInstanceIds", value = "PROCESS_INSTANCE_IDS", required = true, dataTypeClass = String.class),
})
@PostMapping(value = "/batch-delete")
@ResponseStatus(HttpStatus.OK)
diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ProcessTaskRelationController.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ProcessTaskRelationController.java
index 13e68bcfdf..89d2766b7d 100644
--- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ProcessTaskRelationController.java
+++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ProcessTaskRelationController.java
@@ -30,6 +30,8 @@ import org.apache.dolphinscheduler.api.utils.Result;
import org.apache.dolphinscheduler.common.Constants;
import org.apache.dolphinscheduler.dao.entity.User;
+import springfox.documentation.annotations.ApiIgnore;
+
import java.util.HashMap;
import java.util.Map;
@@ -50,7 +52,6 @@ import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
-import springfox.documentation.annotations.ApiIgnore;
/**
* process task relation controller
@@ -75,10 +76,10 @@ public class ProcessTaskRelationController extends BaseController {
*/
@ApiOperation(value = "save", notes = "CREATE_PROCESS_TASK_RELATION_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "projectCode", value = "PROJECT_CODE", required = true, type = "Long"),
- @ApiImplicitParam(name = "processDefinitionCode", value = "PROCESS_DEFINITION_CODE", required = true, type = "Long"),
- @ApiImplicitParam(name = "preTaskCode", value = "PRE_TASK_CODE", required = true, type = "Long"),
- @ApiImplicitParam(name = "postTaskCode", value = "POST_TASK_CODE", required = true, type = "Long")
+ @ApiImplicitParam(name = "projectCode", value = "PROJECT_CODE", required = true, dataTypeClass = long.class),
+ @ApiImplicitParam(name = "processDefinitionCode", value = "PROCESS_DEFINITION_CODE", required = true, dataTypeClass = long.class),
+ @ApiImplicitParam(name = "preTaskCode", value = "PRE_TASK_CODE", required = true, dataTypeClass = long.class),
+ @ApiImplicitParam(name = "postTaskCode", value = "POST_TASK_CODE", required = true, dataTypeClass = long.class)
})
@PostMapping()
@ResponseStatus(HttpStatus.CREATED)
@@ -95,7 +96,8 @@ public class ProcessTaskRelationController extends BaseController {
} else if (processDefinitionCode == 0L) {
putMsg(result, DATA_IS_NOT_VALID, "processDefinitionCode");
} else {
- result = processTaskRelationService.createProcessTaskRelation(loginUser, projectCode, processDefinitionCode, preTaskCode, postTaskCode);
+ result = processTaskRelationService.createProcessTaskRelation(loginUser, projectCode, processDefinitionCode,
+ preTaskCode, postTaskCode);
}
return returnDataList(result);
}
@@ -111,9 +113,9 @@ public class ProcessTaskRelationController extends BaseController {
*/
@ApiOperation(value = "deleteRelation", notes = "DELETE_PROCESS_TASK_RELATION_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "projectCode", value = "PROJECT_CODE", required = true, type = "Long"),
- @ApiImplicitParam(name = "processDefinitionCode", value = "PROCESS_DEFINITION_CODE", required = true, type = "Long"),
- @ApiImplicitParam(name = "taskCode", value = "TASK_CODE", required = true, type = "Long")
+ @ApiImplicitParam(name = "projectCode", value = "PROJECT_CODE", required = true, dataTypeClass = long.class),
+ @ApiImplicitParam(name = "processDefinitionCode", value = "PROCESS_DEFINITION_CODE", required = true, dataTypeClass = long.class),
+ @ApiImplicitParam(name = "taskCode", value = "TASK_CODE", required = true, dataTypeClass = long.class)
})
@DeleteMapping(value = "/{taskCode}")
@ResponseStatus(HttpStatus.OK)
@@ -123,7 +125,8 @@ public class ProcessTaskRelationController extends BaseController {
@ApiParam(name = "projectCode", value = "PROJECT_CODE", required = true) @PathVariable long projectCode,
@RequestParam(name = "processDefinitionCode", required = true) long processDefinitionCode,
@PathVariable("taskCode") long taskCode) {
- return returnDataList(processTaskRelationService.deleteTaskProcessRelation(loginUser, projectCode, processDefinitionCode, taskCode));
+ return returnDataList(processTaskRelationService.deleteTaskProcessRelation(loginUser, projectCode,
+ processDefinitionCode, taskCode));
}
/**
@@ -137,9 +140,9 @@ public class ProcessTaskRelationController extends BaseController {
*/
@ApiOperation(value = "deleteUpstreamRelation", notes = "DELETE_UPSTREAM_RELATION_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "projectCode", value = "PROJECT_CODE", required = true, type = "Long"),
- @ApiImplicitParam(name = "preTaskCodes", value = "PRE_TASK_CODES", required = true, type = "String", example = "1,2"),
- @ApiImplicitParam(name = "taskCode", value = "TASK_CODE", required = true, type = "Long")
+ @ApiImplicitParam(name = "projectCode", value = "PROJECT_CODE", required = true, dataTypeClass = long.class),
+ @ApiImplicitParam(name = "preTaskCodes", value = "PRE_TASK_CODES", required = true, dataTypeClass = String.class, example = "1,2"),
+ @ApiImplicitParam(name = "taskCode", value = "TASK_CODE", required = true, dataTypeClass = long.class)
})
@DeleteMapping(value = "/{taskCode}/upstream")
@ResponseStatus(HttpStatus.OK)
@@ -149,7 +152,8 @@ public class ProcessTaskRelationController extends BaseController {
@ApiParam(name = "projectCode", value = "PROJECT_CODE", required = true) @PathVariable long projectCode,
@RequestParam(name = "preTaskCodes", required = true) String preTaskCodes,
@PathVariable("taskCode") long taskCode) {
- return returnDataList(processTaskRelationService.deleteUpstreamRelation(loginUser, projectCode, preTaskCodes, taskCode));
+ return returnDataList(
+ processTaskRelationService.deleteUpstreamRelation(loginUser, projectCode, preTaskCodes, taskCode));
}
/**
@@ -163,9 +167,9 @@ public class ProcessTaskRelationController extends BaseController {
*/
@ApiOperation(value = "deleteDownstreamRelation", notes = "DELETE_DOWNSTREAM_RELATION_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "projectCode", value = "PROJECT_CODE", required = true, type = "Long"),
- @ApiImplicitParam(name = "postTaskCodes", value = "POST_TASK_CODES", required = true, type = "String", example = "1,2"),
- @ApiImplicitParam(name = "taskCode", value = "TASK_CODE", required = true, type = "Long")
+ @ApiImplicitParam(name = "projectCode", value = "PROJECT_CODE", required = true, dataTypeClass = long.class),
+ @ApiImplicitParam(name = "postTaskCodes", value = "POST_TASK_CODES", required = true, dataTypeClass = String.class, example = "1,2"),
+ @ApiImplicitParam(name = "taskCode", value = "TASK_CODE", required = true, dataTypeClass = long.class)
})
@DeleteMapping(value = "/{taskCode}/downstream")
@ResponseStatus(HttpStatus.OK)
@@ -175,7 +179,8 @@ public class ProcessTaskRelationController extends BaseController {
@ApiParam(name = "projectCode", value = "PROJECT_CODE", required = true) @PathVariable long projectCode,
@RequestParam(name = "postTaskCodes", required = true) String postTaskCodes,
@PathVariable("taskCode") long taskCode) {
- return returnDataList(processTaskRelationService.deleteDownstreamRelation(loginUser, projectCode, postTaskCodes, taskCode));
+ return returnDataList(
+ processTaskRelationService.deleteDownstreamRelation(loginUser, projectCode, postTaskCodes, taskCode));
}
/**
@@ -188,8 +193,8 @@ public class ProcessTaskRelationController extends BaseController {
*/
@ApiOperation(value = "queryUpstreamRelation", notes = "QUERY_UPSTREAM_RELATION_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "projectCode", value = "PROJECT_CODE", required = true, type = "Long"),
- @ApiImplicitParam(name = "taskCode", value = "TASK_CODE", required = true, type = "Long")
+ @ApiImplicitParam(name = "projectCode", value = "PROJECT_CODE", required = true, dataTypeClass = long.class),
+ @ApiImplicitParam(name = "taskCode", value = "TASK_CODE", required = true, dataTypeClass = long.class)
})
@GetMapping(value = "/{taskCode}/upstream")
@ResponseStatus(HttpStatus.OK)
@@ -211,8 +216,8 @@ public class ProcessTaskRelationController extends BaseController {
*/
@ApiOperation(value = "queryDownstreamRelation", notes = "QUERY_DOWNSTREAM_RELATION_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "projectCode", value = "PROJECT_CODE", required = true, type = "Long"),
- @ApiImplicitParam(name = "taskCode", value = "TASK_CODE", required = true, type = "Long")
+ @ApiImplicitParam(name = "projectCode", value = "PROJECT_CODE", required = true, dataTypeClass = long.class),
+ @ApiImplicitParam(name = "taskCode", value = "TASK_CODE", required = true, dataTypeClass = long.class)
})
@GetMapping(value = "/{taskCode}/downstream")
@ResponseStatus(HttpStatus.OK)
@@ -236,22 +241,22 @@ public class ProcessTaskRelationController extends BaseController {
*/
@ApiOperation(value = "deleteEdge", notes = "DELETE_EDGE_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "projectCode", value = "PROJECT_CODE", required = true, type = "Long"),
- @ApiImplicitParam(name = "processDefinitionCode", value = "PROCESS_DEFINITION_CODE", required = true, type = "Long"),
- @ApiImplicitParam(name = "preTaskCode", value = "PRE_TASK_CODE", required = true, type = "Long"),
- @ApiImplicitParam(name = "postTaskCode", value = "POST_TASK_CODE", required = true, type = "Long")
+ @ApiImplicitParam(name = "projectCode", value = "PROJECT_CODE", required = true, dataTypeClass = long.class),
+ @ApiImplicitParam(name = "processDefinitionCode", value = "PROCESS_DEFINITION_CODE", required = true, dataTypeClass = long.class),
+ @ApiImplicitParam(name = "preTaskCode", value = "PRE_TASK_CODE", required = true, dataTypeClass = long.class),
+ @ApiImplicitParam(name = "postTaskCode", value = "POST_TASK_CODE", required = true, dataTypeClass = long.class)
})
@DeleteMapping(value = "/{processDefinitionCode}/{preTaskCode}/{postTaskCode}")
@ResponseStatus(HttpStatus.OK)
@ApiException(DELETE_EDGE_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
public Result deleteEdge(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
- @ApiParam(name = "projectCode", value = "PROJECT_CODE", required = true)
- @PathVariable long projectCode,
+ @ApiParam(name = "projectCode", value = "PROJECT_CODE", required = true) @PathVariable long projectCode,
@PathVariable long processDefinitionCode,
@PathVariable long preTaskCode,
@PathVariable long postTaskCode) {
- return returnDataList(processTaskRelationService.deleteEdge(loginUser, projectCode, processDefinitionCode, preTaskCode, postTaskCode));
+ return returnDataList(processTaskRelationService.deleteEdge(loginUser, projectCode, processDefinitionCode,
+ preTaskCode, postTaskCode));
}
}
diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ProjectController.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ProjectController.java
index 0e7ebb09a0..a4fb207723 100644
--- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ProjectController.java
+++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ProjectController.java
@@ -35,6 +35,8 @@ import org.apache.dolphinscheduler.common.Constants;
import org.apache.dolphinscheduler.common.utils.ParameterUtils;
import org.apache.dolphinscheduler.dao.entity.User;
+import springfox.documentation.annotations.ApiIgnore;
+
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.DeleteMapping;
@@ -52,7 +54,6 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
-import springfox.documentation.annotations.ApiIgnore;
/**
* project controller
@@ -75,8 +76,8 @@ public class ProjectController extends BaseController {
*/
@ApiOperation(value = "create", notes = "CREATE_PROJECT_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "projectName", value = "PROJECT_NAME", dataType = "String"),
- @ApiImplicitParam(name = "description", value = "PROJECT_DESC", dataType = "String")
+ @ApiImplicitParam(name = "projectName", value = "PROJECT_NAME", dataTypeClass = String.class),
+ @ApiImplicitParam(name = "description", value = "PROJECT_DESC", dataTypeClass = String.class)
})
@PostMapping()
@ResponseStatus(HttpStatus.CREATED)
@@ -99,10 +100,10 @@ public class ProjectController extends BaseController {
*/
@ApiOperation(value = "update", notes = "UPDATE_PROJECT_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "code", value = "PROJECT_CODE", dataType = "Long", example = "123456"),
- @ApiImplicitParam(name = "projectName", value = "PROJECT_NAME", dataType = "String"),
- @ApiImplicitParam(name = "description", value = "PROJECT_DESC", dataType = "String"),
- @ApiImplicitParam(name = "userName", value = "USER_NAME", dataType = "String"),
+ @ApiImplicitParam(name = "code", value = "PROJECT_CODE", dataTypeClass = long.class, example = "123456"),
+ @ApiImplicitParam(name = "projectName", value = "PROJECT_NAME", dataTypeClass = String.class),
+ @ApiImplicitParam(name = "description", value = "PROJECT_DESC", dataTypeClass = String.class),
+ @ApiImplicitParam(name = "userName", value = "USER_NAME", dataTypeClass = String.class),
})
@PutMapping(value = "/{code}")
@ResponseStatus(HttpStatus.OK)
@@ -125,7 +126,7 @@ public class ProjectController extends BaseController {
*/
@ApiOperation(value = "queryProjectByCode", notes = "QUERY_PROJECT_BY_ID_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "code", value = "PROJECT_CODE", dataType = "Long", example = "123456")
+ @ApiImplicitParam(name = "code", value = "PROJECT_CODE", dataTypeClass = long.class, example = "123456")
})
@GetMapping(value = "/{code}")
@ResponseStatus(HttpStatus.OK)
@@ -147,9 +148,9 @@ public class ProjectController extends BaseController {
*/
@ApiOperation(value = "queryProjectListPaging", notes = "QUERY_PROJECT_LIST_PAGING_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "searchVal", value = "SEARCH_VAL", dataType = "String"),
- @ApiImplicitParam(name = "pageSize", value = "PAGE_SIZE", required = true, dataType = "Int", example = "10"),
- @ApiImplicitParam(name = "pageNo", value = "PAGE_NO", required = true, dataType = "Int", example = "1")
+ @ApiImplicitParam(name = "searchVal", value = "SEARCH_VAL", dataTypeClass = String.class),
+ @ApiImplicitParam(name = "pageSize", value = "PAGE_SIZE", required = true, dataTypeClass = int.class, example = "10"),
+ @ApiImplicitParam(name = "pageNo", value = "PAGE_NO", required = true, dataTypeClass = int.class, example = "1")
})
@GetMapping()
@ResponseStatus(HttpStatus.OK)
@@ -158,8 +159,7 @@ public class ProjectController extends BaseController {
public Result queryProjectListPaging(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@RequestParam(value = "searchVal", required = false) String searchVal,
@RequestParam("pageSize") Integer pageSize,
- @RequestParam("pageNo") Integer pageNo
- ) {
+ @RequestParam("pageNo") Integer pageNo) {
Result result = checkPageParams(pageNo, pageSize);
if (!result.checkResult()) {
@@ -179,7 +179,7 @@ public class ProjectController extends BaseController {
*/
@ApiOperation(value = "delete", notes = "DELETE_PROJECT_BY_ID_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "code", value = "PROJECT_CODE", dataType = "Long", example = "123456")
+ @ApiImplicitParam(name = "code", value = "PROJECT_CODE", dataTypeClass = long.class, example = "123456")
})
@DeleteMapping(value = "/{code}")
@ResponseStatus(HttpStatus.OK)
@@ -199,7 +199,7 @@ public class ProjectController extends BaseController {
*/
@ApiOperation(value = "queryUnauthorizedProject", notes = "QUERY_UNAUTHORIZED_PROJECT_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "userId", value = "USER_ID", dataType = "Int", example = "100")
+ @ApiImplicitParam(name = "userId", value = "USER_ID", dataTypeClass = int.class, example = "100")
})
@GetMapping(value = "/unauth-project")
@ResponseStatus(HttpStatus.OK)
@@ -219,7 +219,7 @@ public class ProjectController extends BaseController {
*/
@ApiOperation(value = "queryAuthorizedProject", notes = "QUERY_AUTHORIZED_PROJECT_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "userId", value = "USER_ID", dataType = "Int", example = "100")
+ @ApiImplicitParam(name = "userId", value = "USER_ID", dataTypeClass = int.class, example = "100")
})
@GetMapping(value = "/authed-project")
@ResponseStatus(HttpStatus.OK)
@@ -239,7 +239,7 @@ public class ProjectController extends BaseController {
*/
@ApiOperation(value = "queryAuthorizedUser", notes = "QUERY_AUTHORIZED_USER_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "projectCode", value = "PROJECT_CODE", dataType = "Long", example = "100")
+ @ApiImplicitParam(name = "projectCode", value = "PROJECT_CODE", dataTypeClass = long.class, example = "100")
})
@GetMapping(value = "/authed-user")
@ResponseStatus(HttpStatus.OK)
diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ProjectV2Controller.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ProjectV2Controller.java
index 2b2c87f601..a0e2488e90 100644
--- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ProjectV2Controller.java
+++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ProjectV2Controller.java
@@ -45,6 +45,8 @@ import org.apache.dolphinscheduler.common.Constants;
import org.apache.dolphinscheduler.common.utils.ParameterUtils;
import org.apache.dolphinscheduler.dao.entity.User;
+import springfox.documentation.annotations.ApiIgnore;
+
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.DeleteMapping;
@@ -63,7 +65,6 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
-import springfox.documentation.annotations.ApiIgnore;
/**
* project controller
@@ -91,7 +92,7 @@ public class ProjectV2Controller extends BaseController {
public ProjectCreateResponse createProject(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@RequestBody ProjectCreateRequest projectCreateRequest) {
Result result = projectService.createProject(loginUser, projectCreateRequest.getProjectName(),
- projectCreateRequest.getDescription());
+ projectCreateRequest.getDescription());
return new ProjectCreateResponse(result);
}
@@ -112,7 +113,7 @@ public class ProjectV2Controller extends BaseController {
@PathVariable("code") Long code,
@RequestBody ProjectUpdateRequest projectUpdateReq) {
Result result = projectService.update(loginUser, code, projectUpdateReq.getProjectName(),
- projectUpdateReq.getDescription(), projectUpdateReq.getUserName());
+ projectUpdateReq.getDescription(), projectUpdateReq.getUserName());
return new ProjectUpdateResponse(result);
}
@@ -125,7 +126,7 @@ public class ProjectV2Controller extends BaseController {
*/
@ApiOperation(value = "queryProjectByCode", notes = "QUERY_PROJECT_BY_ID_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "code", value = "PROJECT_CODE", dataType = "Long", example = "123456", required = true)
+ @ApiImplicitParam(name = "code", value = "PROJECT_CODE", dataTypeClass = long.class, example = "123456", required = true)
})
@GetMapping(value = "/{code}")
@ResponseStatus(HttpStatus.OK)
@@ -146,9 +147,9 @@ public class ProjectV2Controller extends BaseController {
*/
@ApiOperation(value = "queryProjectListPaging", notes = "QUERY_PROJECT_LIST_PAGING_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "searchVal", value = "SEARCH_VAL", dataType = "String", example = "test"),
- @ApiImplicitParam(name = "pageSize", value = "PAGE_SIZE", required = true, dataType = "Int", example = "10"),
- @ApiImplicitParam(name = "pageNo", value = "PAGE_NO", required = true, dataType = "Int", example = "1")
+ @ApiImplicitParam(name = "searchVal", value = "SEARCH_VAL", dataTypeClass = String.class, example = "test"),
+ @ApiImplicitParam(name = "pageSize", value = "PAGE_SIZE", required = true, dataTypeClass = int.class, example = "10"),
+ @ApiImplicitParam(name = "pageNo", value = "PAGE_NO", required = true, dataTypeClass = int.class, example = "1")
})
@GetMapping(consumes = {"application/json"})
@ResponseStatus(HttpStatus.OK)
@@ -162,7 +163,7 @@ public class ProjectV2Controller extends BaseController {
}
String searchVal = ParameterUtils.handleEscapes(projectQueryReq.getSearchVal());
result = projectService.queryProjectListPaging(loginUser, projectQueryReq.getPageSize(),
- projectQueryReq.getPageNo(), searchVal);
+ projectQueryReq.getPageNo(), searchVal);
return new ProjectListPagingResponse(result);
}
@@ -175,7 +176,7 @@ public class ProjectV2Controller extends BaseController {
*/
@ApiOperation(value = "delete", notes = "DELETE_PROJECT_BY_ID_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "code", value = "PROJECT_CODE", dataType = "Long", example = "123456", required = true)
+ @ApiImplicitParam(name = "code", value = "PROJECT_CODE", dataTypeClass = long.class, example = "123456", required = true)
})
@DeleteMapping(value = "/{code}")
@ResponseStatus(HttpStatus.OK)
@@ -196,7 +197,7 @@ public class ProjectV2Controller extends BaseController {
*/
@ApiOperation(value = "queryUnauthorizedProject", notes = "QUERY_UNAUTHORIZED_PROJECT_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "userId", value = "USER_ID", dataType = "Int", example = "100", required = true)
+ @ApiImplicitParam(name = "userId", value = "USER_ID", dataTypeClass = int.class, example = "100", required = true)
})
@GetMapping(value = "/unauth-project")
@ResponseStatus(HttpStatus.OK)
@@ -217,7 +218,7 @@ public class ProjectV2Controller extends BaseController {
*/
@ApiOperation(value = "queryAuthorizedProject", notes = "QUERY_AUTHORIZED_PROJECT_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "userId", value = "USER_ID", dataType = "Int", example = "100", required = true)
+ @ApiImplicitParam(name = "userId", value = "USER_ID", dataTypeClass = int.class, example = "100", required = true)
})
@GetMapping(value = "/authed-project")
@ResponseStatus(HttpStatus.OK)
@@ -238,7 +239,7 @@ public class ProjectV2Controller extends BaseController {
*/
@ApiOperation(value = "queryAuthorizedUser", notes = "QUERY_AUTHORIZED_USER_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "projectCode", value = "PROJECT_CODE", dataType = "Long", example = "100", required = true)
+ @ApiImplicitParam(name = "projectCode", value = "PROJECT_CODE", dataTypeClass = long.class, example = "100", required = true)
})
@GetMapping(value = "/authed-user")
@ResponseStatus(HttpStatus.OK)
@@ -258,7 +259,7 @@ public class ProjectV2Controller extends BaseController {
*/
@ApiOperation(value = "queryProjectCreatedAndAuthorizedByUser", notes = "QUERY_AUTHORIZED_AND_USER_CREATED_PROJECT_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "loginUser", value = "LOGIN_USER", dataType = "Object", example = "\"{id:100}\"", required = true)
+ @ApiImplicitParam(name = "loginUser", value = "LOGIN_USER", dataTypeClass = Object.class, example = "\"{id:100}\"", required = true)
})
@GetMapping(value = "/created-and-authed")
@ResponseStatus(HttpStatus.OK)
@@ -277,7 +278,7 @@ public class ProjectV2Controller extends BaseController {
*/
@ApiOperation(value = "queryAllProjectList", notes = "QUERY_ALL_PROJECT_LIST_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "loginUser", value = "LOGIN_USER", dataType = "Object", example = "\"{id:100}\"", required = true)
+ @ApiImplicitParam(name = "loginUser", value = "LOGIN_USER", dataTypeClass = Object.class, example = "\"{id:100}\"", required = true)
})
@GetMapping(value = "/list")
@ResponseStatus(HttpStatus.OK)
diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/QueueController.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/QueueController.java
index fa5980dc0b..e4d6bc5cec 100644
--- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/QueueController.java
+++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/QueueController.java
@@ -30,6 +30,8 @@ import org.apache.dolphinscheduler.common.Constants;
import org.apache.dolphinscheduler.common.utils.ParameterUtils;
import org.apache.dolphinscheduler.dao.entity.User;
+import springfox.documentation.annotations.ApiIgnore;
+
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.GetMapping;
@@ -46,7 +48,6 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
-import springfox.documentation.annotations.ApiIgnore;
/**
* queue controller
@@ -59,7 +60,6 @@ public class QueueController extends BaseController {
@Autowired
private QueueService queueService;
-
/**
* query queue list
*
@@ -86,9 +86,9 @@ public class QueueController extends BaseController {
*/
@ApiOperation(value = "queryQueueListPaging", notes = "QUERY_QUEUE_LIST_PAGING_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "searchVal", value = "SEARCH_VAL", dataType = "String"),
- @ApiImplicitParam(name = "pageNo", value = "PAGE_NO", required = true, dataType = "Int", example = "1"),
- @ApiImplicitParam(name = "pageSize", value = "PAGE_SIZE", required = true, dataType = "Int", example = "20")
+ @ApiImplicitParam(name = "searchVal", value = "SEARCH_VAL", dataTypeClass = String.class),
+ @ApiImplicitParam(name = "pageNo", value = "PAGE_NO", required = true, dataTypeClass = int.class, example = "1"),
+ @ApiImplicitParam(name = "pageSize", value = "PAGE_SIZE", required = true, dataTypeClass = int.class, example = "20")
})
@GetMapping()
@ResponseStatus(HttpStatus.OK)
@@ -118,8 +118,8 @@ public class QueueController extends BaseController {
*/
@ApiOperation(value = "createQueue", notes = "CREATE_QUEUE_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "queue", value = "YARN_QUEUE_NAME", required = true, dataType = "String"),
- @ApiImplicitParam(name = "queueName", value = "QUEUE_NAME", required = true, dataType = "String")
+ @ApiImplicitParam(name = "queue", value = "YARN_QUEUE_NAME", required = true, dataTypeClass = String.class),
+ @ApiImplicitParam(name = "queueName", value = "QUEUE_NAME", required = true, dataTypeClass = String.class)
})
@PostMapping()
@ResponseStatus(HttpStatus.CREATED)
@@ -142,9 +142,9 @@ public class QueueController extends BaseController {
*/
@ApiOperation(value = "updateQueue", notes = "UPDATE_QUEUE_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "id", value = "QUEUE_ID", required = true, dataType = "Int", example = "100"),
- @ApiImplicitParam(name = "queue", value = "YARN_QUEUE_NAME", required = true, dataType = "String"),
- @ApiImplicitParam(name = "queueName", value = "QUEUE_NAME", required = true, dataType = "String")
+ @ApiImplicitParam(name = "id", value = "QUEUE_ID", required = true, dataTypeClass = int.class, example = "100"),
+ @ApiImplicitParam(name = "queue", value = "YARN_QUEUE_NAME", required = true, dataTypeClass = String.class),
+ @ApiImplicitParam(name = "queueName", value = "QUEUE_NAME", required = true, dataTypeClass = String.class)
})
@PutMapping(value = "/{id}")
@ResponseStatus(HttpStatus.CREATED)
@@ -167,8 +167,8 @@ public class QueueController extends BaseController {
*/
@ApiOperation(value = "verifyQueue", notes = "VERIFY_QUEUE_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "queue", value = "YARN_QUEUE_NAME", required = true, dataType = "String"),
- @ApiImplicitParam(name = "queueName", value = "QUEUE_NAME", required = true, dataType = "String")
+ @ApiImplicitParam(name = "queue", value = "YARN_QUEUE_NAME", required = true, dataTypeClass = String.class),
+ @ApiImplicitParam(name = "queueName", value = "QUEUE_NAME", required = true, dataTypeClass = String.class)
})
@PostMapping(value = "/verify")
@ResponseStatus(HttpStatus.OK)
diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ResourcesController.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ResourcesController.java
index 7ebbf99ba1..0e4f4b7334 100644
--- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ResourcesController.java
+++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ResourcesController.java
@@ -53,6 +53,8 @@ import org.apache.dolphinscheduler.common.utils.ParameterUtils;
import org.apache.dolphinscheduler.dao.entity.User;
import org.apache.dolphinscheduler.spi.enums.ResourceType;
+import springfox.documentation.annotations.ApiIgnore;
+
import org.apache.commons.lang3.StringUtils;
import java.util.Map;
@@ -81,8 +83,6 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
-import springfox.documentation.annotations.ApiIgnore;
-
/**
* resources controller
@@ -110,11 +110,11 @@ public class ResourcesController extends BaseController {
*/
@ApiOperation(value = "createDirectory", notes = "CREATE_RESOURCE_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "type", value = "RESOURCE_TYPE", required = true, dataType = "ResourceType"),
- @ApiImplicitParam(name = "name", value = "RESOURCE_NAME", required = true, dataType = "String"),
- @ApiImplicitParam(name = "description", value = "RESOURCE_DESC", dataType = "String"),
- @ApiImplicitParam(name = "pid", value = "RESOURCE_PID", required = true, dataType = "Int", example = "10"),
- @ApiImplicitParam(name = "currentDir", value = "RESOURCE_CURRENT_DIR", required = true, dataType = "String")
+ @ApiImplicitParam(name = "type", value = "RESOURCE_TYPE", required = true, dataTypeClass = ResourceType.class),
+ @ApiImplicitParam(name = "name", value = "RESOURCE_NAME", required = true, dataTypeClass = String.class),
+ @ApiImplicitParam(name = "description", value = "RESOURCE_DESC", dataTypeClass = String.class),
+ @ApiImplicitParam(name = "pid", value = "RESOURCE_PID", required = true, dataTypeClass = int.class, example = "10"),
+ @ApiImplicitParam(name = "currentDir", value = "RESOURCE_CURRENT_DIR", required = true, dataTypeClass = String.class)
})
@PostMapping(value = "/directory")
@ApiException(CREATE_RESOURCE_ERROR)
@@ -125,7 +125,7 @@ public class ResourcesController extends BaseController {
@RequestParam(value = "description", required = false) String description,
@RequestParam(value = "pid") int pid,
@RequestParam(value = "currentDir") String currentDir) {
- //todo verify the directory name
+ // todo verify the directory name
return resourceService.createDirectory(loginUser, alias, description, type, pid, currentDir);
}
@@ -136,12 +136,12 @@ public class ResourcesController extends BaseController {
*/
@ApiOperation(value = "createResource", notes = "CREATE_RESOURCE_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "type", value = "RESOURCE_TYPE", required = true, dataType = "ResourceType"),
- @ApiImplicitParam(name = "name", value = "RESOURCE_NAME", required = true, dataType = "String"),
- @ApiImplicitParam(name = "description", value = "RESOURCE_DESC", dataType = "String"),
- @ApiImplicitParam(name = "file", value = "RESOURCE_FILE", required = true, dataType = "MultipartFile"),
- @ApiImplicitParam(name = "pid", value = "RESOURCE_PID", required = true, dataType = "Int", example = "10"),
- @ApiImplicitParam(name = "currentDir", value = "RESOURCE_CURRENT_DIR", required = true, dataType = "String")
+ @ApiImplicitParam(name = "type", value = "RESOURCE_TYPE", required = true, dataTypeClass = ResourceType.class),
+ @ApiImplicitParam(name = "name", value = "RESOURCE_NAME", required = true, dataTypeClass = String.class),
+ @ApiImplicitParam(name = "description", value = "RESOURCE_DESC", dataTypeClass = String.class),
+ @ApiImplicitParam(name = "file", value = "RESOURCE_FILE", required = true, dataTypeClass = MultipartFile.class),
+ @ApiImplicitParam(name = "pid", value = "RESOURCE_PID", required = true, dataTypeClass = int.class, example = "10"),
+ @ApiImplicitParam(name = "currentDir", value = "RESOURCE_CURRENT_DIR", required = true, dataTypeClass = String.class)
})
@PostMapping()
@ApiException(CREATE_RESOURCE_ERROR)
@@ -153,7 +153,7 @@ public class ResourcesController extends BaseController {
@RequestParam("file") MultipartFile file,
@RequestParam(value = "pid") int pid,
@RequestParam(value = "currentDir") String currentDir) {
- //todo verify the file name
+ // todo verify the file name
return resourceService.createResource(loginUser, alias, description, type, file, pid, currentDir);
}
@@ -170,11 +170,11 @@ public class ResourcesController extends BaseController {
*/
@ApiOperation(value = "updateResource", notes = "UPDATE_RESOURCE_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "id", value = "RESOURCE_ID", required = true, dataType = "Int", example = "100"),
- @ApiImplicitParam(name = "type", value = "RESOURCE_TYPE", required = true, dataType = "ResourceType"),
- @ApiImplicitParam(name = "name", value = "RESOURCE_NAME", required = true, dataType = "String"),
- @ApiImplicitParam(name = "description", value = "RESOURCE_DESC", dataType = "String"),
- @ApiImplicitParam(name = "file", value = "RESOURCE_FILE", required = true, dataType = "MultipartFile")
+ @ApiImplicitParam(name = "id", value = "RESOURCE_ID", required = true, dataTypeClass = int.class, example = "100"),
+ @ApiImplicitParam(name = "type", value = "RESOURCE_TYPE", required = true, dataTypeClass = ResourceType.class),
+ @ApiImplicitParam(name = "name", value = "RESOURCE_NAME", required = true, dataTypeClass = String.class),
+ @ApiImplicitParam(name = "description", value = "RESOURCE_DESC", dataTypeClass = String.class),
+ @ApiImplicitParam(name = "file", value = "RESOURCE_FILE", required = true, dataTypeClass = MultipartFile.class)
})
@PutMapping(value = "/{id}")
@ApiException(UPDATE_RESOURCE_ERROR)
@@ -185,7 +185,7 @@ public class ResourcesController extends BaseController {
@RequestParam(value = "name") String alias,
@RequestParam(value = "description", required = false) String description,
@RequestParam(value = "file", required = false) MultipartFile file) {
- //todo verify the resource name
+ // todo verify the resource name
return resourceService.updateResource(loginUser, resourceId, alias, description, type, file);
}
@@ -198,15 +198,14 @@ public class ResourcesController extends BaseController {
*/
@ApiOperation(value = "queryResourceList", notes = "QUERY_RESOURCE_LIST_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "type", value = "RESOURCE_TYPE", required = true, dataType = "ResourceType")
+ @ApiImplicitParam(name = "type", value = "RESOURCE_TYPE", required = true, dataTypeClass = ResourceType.class)
})
@GetMapping(value = "/list")
@ResponseStatus(HttpStatus.OK)
@ApiException(QUERY_RESOURCES_LIST_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
public Result<Object> queryResourceList(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
- @RequestParam(value = "type") ResourceType type
- ) {
+ @RequestParam(value = "type") ResourceType type) {
Map<String, Object> result = resourceService.queryResourceList(loginUser, type);
return returnDataList(result);
}
@@ -223,11 +222,11 @@ public class ResourcesController extends BaseController {
*/
@ApiOperation(value = "queryResourceListPaging", notes = "QUERY_RESOURCE_LIST_PAGING_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "type", value = "RESOURCE_TYPE", required = true, dataType = "ResourceType"),
- @ApiImplicitParam(name = "id", value = "RESOURCE_ID", required = true, dataType = "int", example = "10"),
- @ApiImplicitParam(name = "searchVal", value = "SEARCH_VAL", dataType = "String"),
- @ApiImplicitParam(name = "pageNo", value = "PAGE_NO", required = true, dataType = "Int", example = "1"),
- @ApiImplicitParam(name = "pageSize", value = "PAGE_SIZE", required = true, dataType = "Int", example = "20")
+ @ApiImplicitParam(name = "type", value = "RESOURCE_TYPE", required = true, dataTypeClass = ResourceType.class),
+ @ApiImplicitParam(name = "id", value = "RESOURCE_ID", required = true, dataTypeClass = int.class, example = "10"),
+ @ApiImplicitParam(name = "searchVal", value = "SEARCH_VAL", dataTypeClass = String.class),
+ @ApiImplicitParam(name = "pageNo", value = "PAGE_NO", required = true, dataTypeClass = int.class, example = "1"),
+ @ApiImplicitParam(name = "pageSize", value = "PAGE_SIZE", required = true, dataTypeClass = int.class, example = "20")
})
@GetMapping()
@ResponseStatus(HttpStatus.OK)
@@ -238,8 +237,7 @@ public class ResourcesController extends BaseController {
@RequestParam(value = "id") int id,
@RequestParam("pageNo") Integer pageNo,
@RequestParam(value = "searchVal", required = false) String searchVal,
- @RequestParam("pageSize") Integer pageSize
- ) {
+ @RequestParam("pageSize") Integer pageSize) {
Result<Object> result = checkPageParams(pageNo, pageSize);
if (!result.checkResult()) {
return result;
@@ -250,7 +248,6 @@ public class ResourcesController extends BaseController {
return result;
}
-
/**
* delete resource
*
@@ -260,19 +257,17 @@ public class ResourcesController extends BaseController {
*/
@ApiOperation(value = "deleteResource", notes = "DELETE_RESOURCE_BY_ID_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "id", value = "RESOURCE_ID", required = true, dataType = "Int", example = "100")
+ @ApiImplicitParam(name = "id", value = "RESOURCE_ID", required = true, dataTypeClass = int.class, example = "100")
})
@DeleteMapping(value = "/{id}")
@ResponseStatus(HttpStatus.OK)
@ApiException(DELETE_RESOURCE_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
public Result<Object> deleteResource(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
- @PathVariable(value = "id") int resourceId
- ) throws Exception {
+ @PathVariable(value = "id") int resourceId) throws Exception {
return resourceService.delete(loginUser, resourceId);
}
-
/**
* verify resource by alias and type
*
@@ -283,8 +278,8 @@ public class ResourcesController extends BaseController {
*/
@ApiOperation(value = "verifyResourceName", notes = "VERIFY_RESOURCE_NAME_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "type", value = "RESOURCE_TYPE", required = true, dataType = "ResourceType"),
- @ApiImplicitParam(name = "fullName", value = "RESOURCE_FULL_NAME", required = true, dataType = "String")
+ @ApiImplicitParam(name = "type", value = "RESOURCE_TYPE", required = true, dataTypeClass = ResourceType.class),
+ @ApiImplicitParam(name = "fullName", value = "RESOURCE_FULL_NAME", required = true, dataTypeClass = String.class)
})
@GetMapping(value = "/verify-name")
@ResponseStatus(HttpStatus.OK)
@@ -292,8 +287,7 @@ public class ResourcesController extends BaseController {
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
public Result<Object> verifyResourceName(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@RequestParam(value = "fullName") String fullName,
- @RequestParam(value = "type") ResourceType type
- ) {
+ @RequestParam(value = "type") ResourceType type) {
return resourceService.verifyResourceName(fullName, type, loginUser);
}
@@ -306,7 +300,7 @@ public class ResourcesController extends BaseController {
*/
@ApiOperation(value = "queryResourceByProgramType", notes = "QUERY_RESOURCE_LIST_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "type", value = "RESOURCE_TYPE", required = true, dataType = "ResourceType")
+ @ApiImplicitParam(name = "type", value = "RESOURCE_TYPE", required = true, dataTypeClass = ResourceType.class)
})
@GetMapping(value = "/query-by-type")
@ResponseStatus(HttpStatus.OK)
@@ -314,9 +308,8 @@ public class ResourcesController extends BaseController {
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
public Result<Object> queryResourceJarList(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@RequestParam(value = "type") ResourceType type,
- @RequestParam(value = "programType", required = false) ProgramType programType
- ) {
- return resourceService.queryResourceByProgramType(loginUser, type, programType);
+ @RequestParam(value = "programType", required = false) ProgramType programType) {
+ return resourceService.queryResourceByProgramType(loginUser, type, programType);
}
/**
@@ -330,9 +323,9 @@ public class ResourcesController extends BaseController {
*/
@ApiOperation(value = "queryResource", notes = "QUERY_BY_RESOURCE_NAME")
@ApiImplicitParams({
- @ApiImplicitParam(name = "type", value = "RESOURCE_TYPE", required = true, dataType = "ResourceType"),
- @ApiImplicitParam(name = "fullName", value = "RESOURCE_FULL_NAME", required = true, dataType = "String"),
- @ApiImplicitParam(name = "id", value = "RESOURCE_ID", required = false, dataType = "Int", example = "10")
+ @ApiImplicitParam(name = "type", value = "RESOURCE_TYPE", required = true, dataTypeClass = ResourceType.class),
+ @ApiImplicitParam(name = "fullName", value = "RESOURCE_FULL_NAME", required = true, dataTypeClass = String.class),
+ @ApiImplicitParam(name = "id", value = "RESOURCE_ID", required = false, dataTypeClass = int.class, example = "10")
})
@GetMapping(value = "/{id}")
@ResponseStatus(HttpStatus.OK)
@@ -341,8 +334,7 @@ public class ResourcesController extends BaseController {
public Result<Object> queryResource(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@RequestParam(value = "fullName", required = false) String fullName,
@PathVariable(value = "id", required = false) Integer id,
- @RequestParam(value = "type") ResourceType type
- ) {
+ @RequestParam(value = "type") ResourceType type) {
return resourceService.queryResource(loginUser, fullName, id, type);
}
@@ -358,9 +350,9 @@ public class ResourcesController extends BaseController {
*/
@ApiOperation(value = "viewResource", notes = "VIEW_RESOURCE_BY_ID_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "id", value = "RESOURCE_ID", required = true, dataType = "Int", example = "100"),
- @ApiImplicitParam(name = "skipLineNum", value = "SKIP_LINE_NUM", required = true, dataType = "Int", example = "100"),
- @ApiImplicitParam(name = "limit", value = "LIMIT", required = true, dataType = "Int", example = "100")
+ @ApiImplicitParam(name = "id", value = "RESOURCE_ID", required = true, dataTypeClass = int.class, example = "100"),
+ @ApiImplicitParam(name = "skipLineNum", value = "SKIP_LINE_NUM", required = true, dataTypeClass = int.class, example = "100"),
+ @ApiImplicitParam(name = "limit", value = "LIMIT", required = true, dataTypeClass = int.class, example = "100")
})
@GetMapping(value = "/{id}/view")
@ApiException(VIEW_RESOURCE_FILE_ON_LINE_ERROR)
@@ -368,8 +360,7 @@ public class ResourcesController extends BaseController {
public Result viewResource(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@PathVariable(value = "id") int resourceId,
@RequestParam(value = "skipLineNum") int skipLineNum,
- @RequestParam(value = "limit") int limit
- ) {
+ @RequestParam(value = "limit") int limit) {
return resourceService.readResource(loginUser, resourceId, skipLineNum, limit);
}
@@ -380,13 +371,13 @@ public class ResourcesController extends BaseController {
*/
@ApiOperation(value = "onlineCreateResource", notes = "ONLINE_CREATE_RESOURCE_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "type", value = "RESOURCE_TYPE", required = true, dataType = "ResourceType"),
- @ApiImplicitParam(name = "fileName", value = "RESOURCE_NAME", required = true, dataType = "String"),
- @ApiImplicitParam(name = "suffix", value = "SUFFIX", required = true, dataType = "String"),
- @ApiImplicitParam(name = "description", value = "RESOURCE_DESC", dataType = "String"),
- @ApiImplicitParam(name = "content", value = "CONTENT", required = true, dataType = "String"),
- @ApiImplicitParam(name = "pid", value = "RESOURCE_PID", required = true, dataType = "Int", example = "10"),
- @ApiImplicitParam(name = "currentDir", value = "RESOURCE_CURRENTDIR", required = true, dataType = "String")
+ @ApiImplicitParam(name = "type", value = "RESOURCE_TYPE", required = true, dataTypeClass = ResourceType.class),
+ @ApiImplicitParam(name = "fileName", value = "RESOURCE_NAME", required = true, dataTypeClass = String.class),
+ @ApiImplicitParam(name = "suffix", value = "SUFFIX", required = true, dataTypeClass = String.class),
+ @ApiImplicitParam(name = "description", value = "RESOURCE_DESC", dataTypeClass = String.class),
+ @ApiImplicitParam(name = "content", value = "CONTENT", required = true, dataTypeClass = String.class),
+ @ApiImplicitParam(name = "pid", value = "RESOURCE_PID", required = true, dataTypeClass = int.class, example = "10"),
+ @ApiImplicitParam(name = "currentDir", value = "RESOURCE_CURRENTDIR", required = true, dataTypeClass = String.class)
})
@PostMapping(value = "/online-create")
@ApiException(CREATE_RESOURCE_FILE_ON_LINE_ERROR)
@@ -398,13 +389,13 @@ public class ResourcesController extends BaseController {
@RequestParam(value = "description", required = false) String description,
@RequestParam(value = "content") String content,
@RequestParam(value = "pid") int pid,
- @RequestParam(value = "currentDir") String currentDir
- ) {
+ @RequestParam(value = "currentDir") String currentDir) {
if (StringUtils.isEmpty(content)) {
logger.error("resource file contents are not allowed to be empty");
return error(RESOURCE_FILE_IS_EMPTY.getCode(), RESOURCE_FILE_IS_EMPTY.getMsg());
}
- return resourceService.onlineCreateResource(loginUser, type, fileName, fileSuffix, description, content, pid, currentDir);
+ return resourceService.onlineCreateResource(loginUser, type, fileName, fileSuffix, description, content, pid,
+ currentDir);
}
/**
@@ -417,16 +408,15 @@ public class ResourcesController extends BaseController {
*/
@ApiOperation(value = "updateResourceContent", notes = "UPDATE_RESOURCE_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "id", value = "RESOURCE_ID", required = true, dataType = "Int", example = "100"),
- @ApiImplicitParam(name = "content", value = "CONTENT", required = true, dataType = "String")
+ @ApiImplicitParam(name = "id", value = "RESOURCE_ID", required = true, dataTypeClass = int.class, example = "100"),
+ @ApiImplicitParam(name = "content", value = "CONTENT", required = true, dataTypeClass = String.class)
})
@PutMapping(value = "/{id}/update-content")
@ApiException(EDIT_RESOURCE_FILE_ON_LINE_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
public Result updateResourceContent(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@PathVariable(value = "id") int resourceId,
- @RequestParam(value = "content") String content
- ) {
+ @RequestParam(value = "content") String content) {
if (StringUtils.isEmpty(content)) {
logger.error("The resource file contents are not allowed to be empty");
return error(RESOURCE_FILE_IS_EMPTY.getCode(), RESOURCE_FILE_IS_EMPTY.getMsg());
@@ -443,7 +433,7 @@ public class ResourcesController extends BaseController {
*/
@ApiOperation(value = "downloadResource", notes = "DOWNLOAD_RESOURCE_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "id", value = "RESOURCE_ID", required = true, dataType = "Int", example = "100")
+ @ApiImplicitParam(name = "id", value = "RESOURCE_ID", required = true, dataTypeClass = int.class, example = "100")
})
@GetMapping(value = "/{id}/download")
@ResponseBody
@@ -456,12 +446,11 @@ public class ResourcesController extends BaseController {
return ResponseEntity.status(HttpStatus.BAD_REQUEST).body(RESOURCE_NOT_EXIST.getMsg());
}
return ResponseEntity
- .ok()
- .header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=\"" + file.getFilename() + "\"")
- .body(file);
+ .ok()
+ .header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=\"" + file.getFilename() + "\"")
+ .body(file);
}
-
/**
* create udf function
*
@@ -477,13 +466,13 @@ public class ResourcesController extends BaseController {
*/
@ApiOperation(value = "createUdfFunc", notes = "CREATE_UDF_FUNCTION_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "type", value = "UDF_TYPE", required = true, dataType = "UdfType"),
- @ApiImplicitParam(name = "funcName", value = "FUNC_NAME", required = true, dataType = "String"),
- @ApiImplicitParam(name = "className", value = "CLASS_NAME", required = true, dataType = "String"),
- @ApiImplicitParam(name = "argTypes", value = "ARG_TYPES", dataType = "String"),
- @ApiImplicitParam(name = "database", value = "DATABASE_NAME", dataType = "String"),
- @ApiImplicitParam(name = "description", value = "UDF_DESC", dataType = "String"),
- @ApiImplicitParam(name = "resourceId", value = "RESOURCE_ID", required = true, dataType = "Int", example = "100")
+ @ApiImplicitParam(name = "type", value = "UDF_TYPE", required = true, dataTypeClass = UdfType.class),
+ @ApiImplicitParam(name = "funcName", value = "FUNC_NAME", required = true, dataTypeClass = String.class),
+ @ApiImplicitParam(name = "className", value = "CLASS_NAME", required = true, dataTypeClass = String.class),
+ @ApiImplicitParam(name = "argTypes", value = "ARG_TYPES", dataTypeClass = String.class),
+ @ApiImplicitParam(name = "database", value = "DATABASE_NAME", dataTypeClass = String.class),
+ @ApiImplicitParam(name = "description", value = "UDF_DESC", dataTypeClass = String.class),
+ @ApiImplicitParam(name = "resourceId", value = "RESOURCE_ID", required = true, dataTypeClass = int.class, example = "100")
})
@PostMapping(value = "/{resourceId}/udf-func")
@@ -498,8 +487,9 @@ public class ResourcesController extends BaseController {
@RequestParam(value = "database", required = false) String database,
@RequestParam(value = "description", required = false) String description,
@PathVariable(value = "resourceId") int resourceId) {
- //todo verify the sourceName
- return udfFuncService.createUdfFunction(loginUser, funcName, className, argTypes, database, description, type, resourceId);
+ // todo verify the sourceName
+ return udfFuncService.createUdfFunction(loginUser, funcName, className, argTypes, database, description, type,
+ resourceId);
}
/**
@@ -511,7 +501,7 @@ public class ResourcesController extends BaseController {
*/
@ApiOperation(value = "viewUIUdfFunction", notes = "VIEW_UDF_FUNCTION_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "id", value = "RESOURCE_ID", required = true, dataType = "Int", example = "100")
+ @ApiImplicitParam(name = "id", value = "RESOURCE_ID", required = true, dataTypeClass = int.class, example = "100")
})
@GetMapping(value = "/{id}/udf-func")
@@ -539,14 +529,14 @@ public class ResourcesController extends BaseController {
*/
@ApiOperation(value = "updateUdfFunc", notes = "UPDATE_UDF_FUNCTION_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "id", value = "UDF_ID", required = true, dataType = "Int"),
- @ApiImplicitParam(name = "type", value = "UDF_TYPE", required = true, dataType = "UdfType"),
- @ApiImplicitParam(name = "funcName", value = "FUNC_NAME", required = true, dataType = "String"),
- @ApiImplicitParam(name = "className", value = "CLASS_NAME", required = true, dataType = "String"),
- @ApiImplicitParam(name = "argTypes", value = "ARG_TYPES", dataType = "String"),
- @ApiImplicitParam(name = "database", value = "DATABASE_NAME", dataType = "String"),
- @ApiImplicitParam(name = "description", value = "UDF_DESC", dataType = "String"),
- @ApiImplicitParam(name = "resourceId", value = "RESOURCE_ID", required = true, dataType = "Int", example = "100")
+ @ApiImplicitParam(name = "id", value = "UDF_ID", required = true, dataTypeClass = int.class),
+ @ApiImplicitParam(name = "type", value = "UDF_TYPE", required = true, dataTypeClass = UdfType.class),
+ @ApiImplicitParam(name = "funcName", value = "FUNC_NAME", required = true, dataTypeClass = String.class),
+ @ApiImplicitParam(name = "className", value = "CLASS_NAME", required = true, dataTypeClass = String.class),
+ @ApiImplicitParam(name = "argTypes", value = "ARG_TYPES", dataTypeClass = String.class),
+ @ApiImplicitParam(name = "database", value = "DATABASE_NAME", dataTypeClass = String.class),
+ @ApiImplicitParam(name = "description", value = "UDF_DESC", dataTypeClass = String.class),
+ @ApiImplicitParam(name = "resourceId", value = "RESOURCE_ID", required = true, dataTypeClass = int.class, example = "100")
})
@PutMapping(value = "/{resourceId}/udf-func/{id}")
@@ -561,7 +551,8 @@ public class ResourcesController extends BaseController {
@RequestParam(value = "database", required = false) String database,
@RequestParam(value = "description", required = false) String description,
@PathVariable(value = "resourceId") int resourceId) {
- return udfFuncService.updateUdfFunc(loginUser, udfFuncId, funcName, className, argTypes, database, description, type, resourceId);
+ return udfFuncService.updateUdfFunc(loginUser, udfFuncId, funcName, className, argTypes, database, description,
+ type, resourceId);
}
/**
@@ -575,9 +566,9 @@ public class ResourcesController extends BaseController {
*/
@ApiOperation(value = "queryUdfFuncListPaging", notes = "QUERY_UDF_FUNCTION_LIST_PAGING_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "searchVal", value = "SEARCH_VAL", dataType = "String"),
- @ApiImplicitParam(name = "pageNo", value = "PAGE_NO", required = true, dataType = "Int", example = "1"),
- @ApiImplicitParam(name = "pageSize", value = "PAGE_SIZE", required = true, dataType = "Int", example = "20")
+ @ApiImplicitParam(name = "searchVal", value = "SEARCH_VAL", dataTypeClass = String.class),
+ @ApiImplicitParam(name = "pageNo", value = "PAGE_NO", required = true, dataTypeClass = int.class, example = "1"),
+ @ApiImplicitParam(name = "pageSize", value = "PAGE_SIZE", required = true, dataTypeClass = int.class, example = "20")
})
@GetMapping(value = "/udf-func")
@ResponseStatus(HttpStatus.OK)
@@ -586,8 +577,7 @@ public class ResourcesController extends BaseController {
public Result<Object> queryUdfFuncListPaging(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@RequestParam("pageNo") Integer pageNo,
@RequestParam(value = "searchVal", required = false) String searchVal,
- @RequestParam("pageSize") Integer pageSize
- ) {
+ @RequestParam("pageSize") Integer pageSize) {
Result result = checkPageParams(pageNo, pageSize);
if (!result.checkResult()) {
return result;
@@ -604,7 +594,7 @@ public class ResourcesController extends BaseController {
*/
@ApiOperation(value = "queryUdfFuncList", notes = "QUERY_UDF_FUNC_LIST_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "type", value = "UDF_TYPE", required = true, dataType = "UdfType")
+ @ApiImplicitParam(name = "type", value = "UDF_TYPE", required = true, dataTypeClass = UdfType.class)
})
@GetMapping(value = "/udf-func/list")
@ResponseStatus(HttpStatus.OK)
@@ -624,7 +614,7 @@ public class ResourcesController extends BaseController {
*/
@ApiOperation(value = "verifyUdfFuncName", notes = "VERIFY_UDF_FUNCTION_NAME_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "name", value = "FUNC_NAME", required = true, dataType = "String")
+ @ApiImplicitParam(name = "name", value = "FUNC_NAME", required = true, dataTypeClass = String.class)
})
@GetMapping(value = "/udf-func/verify-name")
@@ -632,8 +622,7 @@ public class ResourcesController extends BaseController {
@ApiException(VERIFY_UDF_FUNCTION_NAME_ERROR)
@AccessLogAnnotation
public Result verifyUdfFuncName(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
- @RequestParam(value = "name") String name
- ) {
+ @RequestParam(value = "name") String name) {
return udfFuncService.verifyUdfFuncByName(loginUser, name);
}
@@ -646,15 +635,14 @@ public class ResourcesController extends BaseController {
*/
@ApiOperation(value = "deleteUdfFunc", notes = "DELETE_UDF_FUNCTION_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "id", value = "UDF_FUNC_ID", required = true, dataType = "Int", example = "100")
+ @ApiImplicitParam(name = "id", value = "UDF_FUNC_ID", required = true, dataTypeClass = int.class, example = "100")
})
@DeleteMapping(value = "/udf-func/{id}")
@ResponseStatus(HttpStatus.OK)
@ApiException(DELETE_UDF_FUNCTION_ERROR)
@AccessLogAnnotation
public Result deleteUdfFunc(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
- @PathVariable(value = "id") int udfFuncId
- ) {
+ @PathVariable(value = "id") int udfFuncId) {
return udfFuncService.delete(loginUser, udfFuncId);
}
@@ -667,7 +655,7 @@ public class ResourcesController extends BaseController {
*/
@ApiOperation(value = "authorizedFile", notes = "AUTHORIZED_FILE_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "userId", value = "USER_ID", required = true, dataType = "Int", example = "100")
+ @ApiImplicitParam(name = "userId", value = "USER_ID", required = true, dataTypeClass = int.class, example = "100")
})
@GetMapping(value = "/authed-file")
@ResponseStatus(HttpStatus.CREATED)
@@ -679,7 +667,6 @@ public class ResourcesController extends BaseController {
return returnDataList(result);
}
-
/**
* unauthorized file resource list
*
@@ -689,7 +676,7 @@ public class ResourcesController extends BaseController {
*/
@ApiOperation(value = "authorizeResourceTree", notes = "AUTHORIZE_RESOURCE_TREE_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "userId", value = "USER_ID", required = true, dataType = "Int", example = "100")
+ @ApiImplicitParam(name = "userId", value = "USER_ID", required = true, dataTypeClass = int.class, example = "100")
})
@GetMapping(value = "/authed-resource-tree")
@ResponseStatus(HttpStatus.CREATED)
@@ -701,7 +688,6 @@ public class ResourcesController extends BaseController {
return returnDataList(result);
}
-
/**
* unauthorized udf function
*
@@ -711,7 +697,7 @@ public class ResourcesController extends BaseController {
*/
@ApiOperation(value = "unauthUDFFunc", notes = "UNAUTHORIZED_UDF_FUNC_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "userId", value = "USER_ID", required = true, dataType = "Int", example = "100")
+ @ApiImplicitParam(name = "userId", value = "USER_ID", required = true, dataTypeClass = int.class, example = "100")
})
@GetMapping(value = "/unauth-udf-func")
@ResponseStatus(HttpStatus.CREATED)
@@ -724,7 +710,6 @@ public class ResourcesController extends BaseController {
return returnDataList(result);
}
-
/**
* authorized udf function
*
@@ -734,7 +719,7 @@ public class ResourcesController extends BaseController {
*/
@ApiOperation(value = "authUDFFunc", notes = "AUTHORIZED_UDF_FUNC_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "userId", value = "USER_ID", required = true, dataType = "Int", example = "100")
+ @ApiImplicitParam(name = "userId", value = "USER_ID", required = true, dataTypeClass = int.class, example = "100")
})
@GetMapping(value = "/authed-udf-func")
@ResponseStatus(HttpStatus.CREATED)
@@ -755,15 +740,14 @@ public class ResourcesController extends BaseController {
*/
@ApiOperation(value = "queryResourceById", notes = "QUERY_BY_RESOURCE_NAME")
@ApiImplicitParams({
- @ApiImplicitParam(name = "id", value = "RESOURCE_ID", required = true, dataType = "Int", example = "10")
+ @ApiImplicitParam(name = "id", value = "RESOURCE_ID", required = true, dataTypeClass = int.class, example = "10")
})
@GetMapping(value = "/{id}/query")
@ResponseStatus(HttpStatus.OK)
@ApiException(RESOURCE_NOT_EXIST)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
public Result queryResourceById(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
- @PathVariable(value = "id", required = true) Integer id
- ) {
+ @PathVariable(value = "id", required = true) Integer id) {
return resourceService.queryResourceById(loginUser, id);
}
diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/SchedulerController.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/SchedulerController.java
index cf7f5a5dd7..e2a6429f8e 100644
--- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/SchedulerController.java
+++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/SchedulerController.java
@@ -38,6 +38,8 @@ import org.apache.dolphinscheduler.common.enums.WarningType;
import org.apache.dolphinscheduler.common.utils.ParameterUtils;
import org.apache.dolphinscheduler.dao.entity.User;
+import springfox.documentation.annotations.ApiIgnore;
+
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
@@ -58,7 +60,6 @@ import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
-import springfox.documentation.annotations.ApiIgnore;
/**
* scheduler controller
@@ -92,15 +93,14 @@ public class SchedulerController extends BaseController {
*/
@ApiOperation(value = "createSchedule", notes = "CREATE_SCHEDULE_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "processDefinitionCode", value = "PROCESS_DEFINITION_CODE", required = true, dataType = "Long", example = "100"),
- @ApiImplicitParam(name = "schedule", value = "SCHEDULE", dataType = "String",
- example = "{'startTime':'2019-06-10 00:00:00','endTime':'2019-06-13 00:00:00','timezoneId':'America/Phoenix','crontab':'0 0 3/6 * * ? *'}"),
- @ApiImplicitParam(name = "warningType", value = "WARNING_TYPE", type = "WarningType"),
- @ApiImplicitParam(name = "warningGroupId", value = "WARNING_GROUP_ID", dataType = "Int", example = "100"),
- @ApiImplicitParam(name = "failureStrategy", value = "FAILURE_STRATEGY", type = "FailureStrategy"),
- @ApiImplicitParam(name = "workerGroupId", value = "WORKER_GROUP_ID", dataType = "Int", example = "100"),
- @ApiImplicitParam(name = "environmentCode", value = "ENVIRONMENT_CODE", dataType = "Long"),
- @ApiImplicitParam(name = "processInstancePriority", value = "PROCESS_INSTANCE_PRIORITY", type = "Priority"),
+ @ApiImplicitParam(name = "processDefinitionCode", value = "PROCESS_DEFINITION_CODE", required = true, dataTypeClass = long.class, example = "100"),
+ @ApiImplicitParam(name = "schedule", value = "SCHEDULE", dataTypeClass = String.class, example = "{'startTime':'2019-06-10 00:00:00','endTime':'2019-06-13 00:00:00','timezoneId':'America/Phoenix','crontab':'0 0 3/6 * * ? *'}"),
+ @ApiImplicitParam(name = "warningType", value = "WARNING_TYPE", dataTypeClass = WarningType.class),
+ @ApiImplicitParam(name = "warningGroupId", value = "WARNING_GROUP_ID", dataTypeClass = int.class, example = "100"),
+ @ApiImplicitParam(name = "failureStrategy", value = "FAILURE_STRATEGY", dataTypeClass = FailureStrategy.class),
+ @ApiImplicitParam(name = "workerGroupId", value = "WORKER_GROUP_ID", dataTypeClass = int.class, example = "100"),
+ @ApiImplicitParam(name = "environmentCode", value = "ENVIRONMENT_CODE", dataTypeClass = long.class),
+ @ApiImplicitParam(name = "processInstancePriority", value = "PROCESS_INSTANCE_PRIORITY", dataTypeClass = Priority.class),
})
@PostMapping()
@ResponseStatus(HttpStatus.CREATED)
@@ -116,8 +116,9 @@ public class SchedulerController extends BaseController {
@RequestParam(value = "workerGroup", required = false, defaultValue = "default") String workerGroup,
@RequestParam(value = "environmentCode", required = false, defaultValue = "-1") Long environmentCode,
@RequestParam(value = "processInstancePriority", required = false, defaultValue = DEFAULT_PROCESS_INSTANCE_PRIORITY) Priority processInstancePriority) {
- Map<String, Object> result = schedulerService.insertSchedule(loginUser, projectCode, processDefinitionCode, schedule,
- warningType, warningGroupId, failureStrategy, processInstancePriority, workerGroup, environmentCode);
+ Map<String, Object> result = schedulerService.insertSchedule(loginUser, projectCode, processDefinitionCode,
+ schedule,
+ warningType, warningGroupId, failureStrategy, processInstancePriority, workerGroup, environmentCode);
return returnDataList(result);
}
@@ -138,14 +139,14 @@ public class SchedulerController extends BaseController {
*/
@ApiOperation(value = "updateSchedule", notes = "UPDATE_SCHEDULE_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "id", value = "SCHEDULE_ID", required = true, dataType = "Int", example = "100"),
- @ApiImplicitParam(name = "schedule", value = "SCHEDULE", dataType = "String", example = "{'startTime':'2019-06-10 00:00:00','endTime':'2019-06-13 00:00:00','crontab':'0 0 3/6 * * ? *'}"),
- @ApiImplicitParam(name = "warningType", value = "WARNING_TYPE", type = "WarningType"),
- @ApiImplicitParam(name = "warningGroupId", value = "WARNING_GROUP_ID", dataType = "Int", example = "100"),
- @ApiImplicitParam(name = "failureStrategy", value = "FAILURE_STRATEGY", type = "FailureStrategy"),
- @ApiImplicitParam(name = "workerGroup", value = "WORKER_GROUP", dataType = "String", example = "default"),
- @ApiImplicitParam(name = "processInstancePriority", value = "PROCESS_INSTANCE_PRIORITY", type = "Priority"),
- @ApiImplicitParam(name = "environmentCode", value = "ENVIRONMENT_CODE", dataType = "Long"),
+ @ApiImplicitParam(name = "id", value = "SCHEDULE_ID", required = true, dataTypeClass = int.class, example = "100"),
+ @ApiImplicitParam(name = "schedule", value = "SCHEDULE", dataTypeClass = String.class, example = "{'startTime':'2019-06-10 00:00:00','endTime':'2019-06-13 00:00:00','crontab':'0 0 3/6 * * ? *'}"),
+ @ApiImplicitParam(name = "warningType", value = "WARNING_TYPE", dataTypeClass = WarningType.class),
+ @ApiImplicitParam(name = "warningGroupId", value = "WARNING_GROUP_ID", dataTypeClass = int.class, example = "100"),
+ @ApiImplicitParam(name = "failureStrategy", value = "FAILURE_STRATEGY", dataTypeClass = FailureStrategy.class),
+ @ApiImplicitParam(name = "workerGroup", value = "WORKER_GROUP", dataTypeClass = String.class, example = "default"),
+ @ApiImplicitParam(name = "processInstancePriority", value = "PROCESS_INSTANCE_PRIORITY", dataTypeClass = Priority.class),
+ @ApiImplicitParam(name = "environmentCode", value = "ENVIRONMENT_CODE", dataTypeClass = long.class),
})
@PutMapping("/{id}")
@ResponseStatus(HttpStatus.OK)
@@ -163,7 +164,7 @@ public class SchedulerController extends BaseController {
@RequestParam(value = "processInstancePriority", required = false, defaultValue = DEFAULT_PROCESS_INSTANCE_PRIORITY) Priority processInstancePriority) {
Map<String, Object> result = schedulerService.updateSchedule(loginUser, projectCode, id, schedule,
- warningType, warningGroupId, failureStrategy, processInstancePriority, workerGroup, environmentCode);
+ warningType, warningGroupId, failureStrategy, processInstancePriority, workerGroup, environmentCode);
return returnDataList(result);
}
@@ -177,14 +178,14 @@ public class SchedulerController extends BaseController {
*/
@ApiOperation(value = "online", notes = "ONLINE_SCHEDULE_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "id", value = "SCHEDULE_ID", required = true, dataType = "Int", example = "100")
+ @ApiImplicitParam(name = "id", value = "SCHEDULE_ID", required = true, dataTypeClass = int.class, example = "100")
})
@PostMapping("/{id}/online")
@ApiException(PUBLISH_SCHEDULE_ONLINE_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
public Result publishScheduleOnline(@ApiIgnore @RequestAttribute(value = SESSION_USER) User loginUser,
- @ApiParam(name = "projectCode", value = "PROJECT_CODE", required = true) @PathVariable long projectCode,
- @PathVariable("id") Integer id) {
+ @ApiParam(name = "projectCode", value = "PROJECT_CODE", required = true) @PathVariable long projectCode,
+ @PathVariable("id") Integer id) {
Map<String, Object> result = schedulerService.setScheduleState(loginUser, projectCode, id, ReleaseState.ONLINE);
return returnDataList(result);
}
@@ -199,16 +200,17 @@ public class SchedulerController extends BaseController {
*/
@ApiOperation(value = "offline", notes = "OFFLINE_SCHEDULE_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "id", value = "SCHEDULE_ID", required = true, dataType = "Int", example = "100")
+ @ApiImplicitParam(name = "id", value = "SCHEDULE_ID", required = true, dataTypeClass = int.class, example = "100")
})
@PostMapping("/{id}/offline")
@ApiException(OFFLINE_SCHEDULE_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
public Result offlineSchedule(@ApiIgnore @RequestAttribute(value = SESSION_USER) User loginUser,
- @ApiParam(name = "projectCode", value = "PROJECT_CODE", required = true) @PathVariable long projectCode,
- @PathVariable("id") Integer id) {
+ @ApiParam(name = "projectCode", value = "PROJECT_CODE", required = true) @PathVariable long projectCode,
+ @PathVariable("id") Integer id) {
- Map<String, Object> result = schedulerService.setScheduleState(loginUser, projectCode, id, ReleaseState.OFFLINE);
+ Map<String, Object> result =
+ schedulerService.setScheduleState(loginUser, projectCode, id, ReleaseState.OFFLINE);
return returnDataList(result);
}
@@ -225,10 +227,10 @@ public class SchedulerController extends BaseController {
*/
@ApiOperation(value = "queryScheduleListPaging", notes = "QUERY_SCHEDULE_LIST_PAGING_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "processDefinitionId", value = "PROCESS_DEFINITION_ID", required = true, dataType = "Int", example = "100"),
- @ApiImplicitParam(name = "searchVal", value = "SEARCH_VAL", type = "String"),
- @ApiImplicitParam(name = "pageNo", value = "PAGE_NO", dataType = "Int", example = "1"),
- @ApiImplicitParam(name = "pageSize", value = "PAGE_SIZE", dataType = "Int", example = "20")
+ @ApiImplicitParam(name = "processDefinitionId", value = "PROCESS_DEFINITION_ID", required = true, dataTypeClass = int.class, example = "100"),
+ @ApiImplicitParam(name = "searchVal", value = "SEARCH_VAL", dataTypeClass = String.class),
+ @ApiImplicitParam(name = "pageNo", value = "PAGE_NO", dataTypeClass = int.class, example = "1"),
+ @ApiImplicitParam(name = "pageSize", value = "PAGE_SIZE", dataTypeClass = int.class, example = "20")
})
@GetMapping()
@ApiException(QUERY_SCHEDULE_LIST_PAGING_ERROR)
@@ -244,7 +246,8 @@ public class SchedulerController extends BaseController {
return result;
}
searchVal = ParameterUtils.handleEscapes(searchVal);
- result = schedulerService.querySchedule(loginUser, projectCode, processDefinitionCode, searchVal, pageNo, pageSize);
+ result = schedulerService.querySchedule(loginUser, projectCode, processDefinitionCode, searchVal, pageNo,
+ pageSize);
return result;
}
@@ -259,7 +262,7 @@ public class SchedulerController extends BaseController {
*/
@ApiOperation(value = "deleteScheduleById", notes = "OFFLINE_SCHEDULE_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "id", value = "SCHEDULE_ID", required = true, dataType = "Int", example = "100")
+ @ApiImplicitParam(name = "id", value = "SCHEDULE_ID", required = true, dataTypeClass = int.class, example = "100")
})
@DeleteMapping(value = "/{id}")
@ResponseStatus(HttpStatus.OK)
@@ -298,7 +301,7 @@ public class SchedulerController extends BaseController {
*/
@ApiOperation(value = "previewSchedule", notes = "PREVIEW_SCHEDULE_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "schedule", value = "SCHEDULE", dataType = "String", example = "{'startTime':'2019-06-10 00:00:00','endTime':'2019-06-13 00:00:00','crontab':'0 0 3/6 * * ? *'}"),
+ @ApiImplicitParam(name = "schedule", value = "SCHEDULE", dataTypeClass = String.class, example = "{'startTime':'2019-06-10 00:00:00','endTime':'2019-06-13 00:00:00','crontab':'0 0 3/6 * * ? *'}"),
})
@PostMapping("/preview")
@ResponseStatus(HttpStatus.CREATED)
@@ -326,14 +329,14 @@ public class SchedulerController extends BaseController {
*/
@ApiOperation(value = "updateScheduleByProcessDefinitionCode", notes = "UPDATE_SCHEDULE_BY_PROCESS_DEFINITION_CODE_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "processDefinitionCode", value = "PROCESS_DEFINITION_CODE", required = true, dataType = "Long", example = "12345678"),
- @ApiImplicitParam(name = "schedule", value = "SCHEDULE", dataType = "String", example = "{'startTime':'2019-06-10 00:00:00','endTime':'2019-06-13 00:00:00','crontab':'0 0 3/6 * * ? *'}"),
- @ApiImplicitParam(name = "warningType", value = "WARNING_TYPE", type = "WarningType"),
- @ApiImplicitParam(name = "warningGroupId", value = "WARNING_GROUP_ID", dataType = "Int", example = "100"),
- @ApiImplicitParam(name = "failureStrategy", value = "FAILURE_STRATEGY", type = "FailureStrategy"),
- @ApiImplicitParam(name = "workerGroup", value = "WORKER_GROUP", dataType = "String", example = "default"),
- @ApiImplicitParam(name = "processInstancePriority", value = "PROCESS_INSTANCE_PRIORITY", type = "Priority"),
- @ApiImplicitParam(name = "environmentCode", value = "ENVIRONMENT_CODE", dataType = "Long"),
+ @ApiImplicitParam(name = "processDefinitionCode", value = "PROCESS_DEFINITION_CODE", required = true, dataTypeClass = long.class, example = "12345678"),
+ @ApiImplicitParam(name = "schedule", value = "SCHEDULE", dataTypeClass = String.class, example = "{'startTime':'2019-06-10 00:00:00','endTime':'2019-06-13 00:00:00','crontab':'0 0 3/6 * * ? *'}"),
+ @ApiImplicitParam(name = "warningType", value = "WARNING_TYPE", dataTypeClass = WarningType.class),
+ @ApiImplicitParam(name = "warningGroupId", value = "WARNING_GROUP_ID", dataTypeClass = int.class, example = "100"),
+ @ApiImplicitParam(name = "failureStrategy", value = "FAILURE_STRATEGY", dataTypeClass = FailureStrategy.class),
+ @ApiImplicitParam(name = "workerGroup", value = "WORKER_GROUP", dataTypeClass = String.class, example = "default"),
+ @ApiImplicitParam(name = "processInstancePriority", value = "PROCESS_INSTANCE_PRIORITY", dataTypeClass = Priority.class),
+ @ApiImplicitParam(name = "environmentCode", value = "ENVIRONMENT_CODE", dataTypeClass = long.class),
})
@PutMapping("/update/{code}")
@ResponseStatus(HttpStatus.OK)
@@ -349,8 +352,9 @@ public class SchedulerController extends BaseController {
@RequestParam(value = "workerGroup", required = false, defaultValue = "default") String workerGroup,
@RequestParam(value = "environmentCode", required = false, defaultValue = "-1") long environmentCode,
@RequestParam(value = "processInstancePriority", required = false) Priority processInstancePriority) {
- Map<String, Object> result = schedulerService.updateScheduleByProcessDefinitionCode(loginUser, projectCode, processDefinitionCode, schedule,
- warningType, warningGroupId, failureStrategy, processInstancePriority, workerGroup, environmentCode);
+ Map<String, Object> result = schedulerService.updateScheduleByProcessDefinitionCode(loginUser, projectCode,
+ processDefinitionCode, schedule,
+ warningType, warningGroupId, failureStrategy, processInstancePriority, workerGroup, environmentCode);
return returnDataList(result);
}
}
diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/TaskDefinitionController.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/TaskDefinitionController.java
index 64269ddfa3..eda294756c 100644
--- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/TaskDefinitionController.java
+++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/TaskDefinitionController.java
@@ -38,6 +38,10 @@ import org.apache.dolphinscheduler.common.enums.TaskExecuteType;
import org.apache.dolphinscheduler.common.utils.ParameterUtils;
import org.apache.dolphinscheduler.dao.entity.User;
+import springfox.documentation.annotations.ApiIgnore;
+
+import org.apache.commons.lang3.StringUtils;
+
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
@@ -53,14 +57,11 @@ import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;
-import org.apache.commons.lang3.StringUtils;
-
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
-import springfox.documentation.annotations.ApiIgnore;
/**
* task definition controller
@@ -83,8 +84,8 @@ public class TaskDefinitionController extends BaseController {
*/
@ApiOperation(value = "save", notes = "CREATE_TASK_DEFINITION_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "projectCode", value = "PROJECT_CODE", required = true, type = "Long"),
- @ApiImplicitParam(name = "taskDefinitionJson", value = "TASK_DEFINITION_JSON", required = true, type = "String")
+ @ApiImplicitParam(name = "projectCode", value = "PROJECT_CODE", required = true, dataTypeClass = long.class),
+ @ApiImplicitParam(name = "taskDefinitionJson", value = "TASK_DEFINITION_JSON", required = true, dataTypeClass = String.class)
})
@PostMapping()
@ResponseStatus(HttpStatus.CREATED)
@@ -93,7 +94,8 @@ public class TaskDefinitionController extends BaseController {
public Result createTaskDefinition(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@ApiParam(name = "projectCode", value = "PROJECT_CODE", required = true) @PathVariable long projectCode,
@RequestParam(value = "taskDefinitionJson", required = true) String taskDefinitionJson) {
- Map<String, Object> result = taskDefinitionService.createTaskDefinition(loginUser, projectCode, taskDefinitionJson);
+ Map<String, Object> result =
+ taskDefinitionService.createTaskDefinition(loginUser, projectCode, taskDefinitionJson);
return returnDataList(result);
}
@@ -109,10 +111,10 @@ public class TaskDefinitionController extends BaseController {
*/
@ApiOperation(value = "saveSingle", notes = "CREATE_SINGLE_TASK_DEFINITION_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "projectCode", value = "PROJECT_CODE", required = true, type = "Long"),
- @ApiImplicitParam(name = "processDefinitionCode", value = "PROCESS_DEFINITION_CODE", required = true, type = "processDefinitionCode"),
- @ApiImplicitParam(name = "taskDefinitionJsonObj", value = "TASK_DEFINITION_JSON", required = true, type = "String"),
- @ApiImplicitParam(name = "upstreamCodes", value = "UPSTREAM_CODES", required = false, type = "String")
+ @ApiImplicitParam(name = "projectCode", value = "PROJECT_CODE", required = true, dataTypeClass = long.class),
+ @ApiImplicitParam(name = "processDefinitionCode", value = "PROCESS_DEFINITION_CODE", required = true, dataTypeClass = long.class),
+ @ApiImplicitParam(name = "taskDefinitionJsonObj", value = "TASK_DEFINITION_JSON", required = true, dataTypeClass = String.class),
+ @ApiImplicitParam(name = "upstreamCodes", value = "UPSTREAM_CODES", required = false, dataTypeClass = String.class)
})
@PostMapping("/save-single")
@ResponseStatus(HttpStatus.CREATED)
@@ -123,7 +125,8 @@ public class TaskDefinitionController extends BaseController {
@RequestParam(value = "processDefinitionCode", required = true) long processDefinitionCode,
@RequestParam(value = "taskDefinitionJsonObj", required = true) String taskDefinitionJsonObj,
@RequestParam(value = "upstreamCodes", required = false) String upstreamCodes) {
- Map<String, Object> result = taskDefinitionService.createTaskBindsWorkFlow(loginUser, projectCode, processDefinitionCode, taskDefinitionJsonObj, StringUtils.defaultString(upstreamCodes));
+ Map<String, Object> result = taskDefinitionService.createTaskBindsWorkFlow(loginUser, projectCode,
+ processDefinitionCode, taskDefinitionJsonObj, StringUtils.defaultString(upstreamCodes));
return returnDataList(result);
}
@@ -138,9 +141,9 @@ public class TaskDefinitionController extends BaseController {
*/
@ApiOperation(value = "update", notes = "UPDATE_TASK_DEFINITION_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "projectCode", value = "PROJECT_CODE", required = true, type = "Long"),
- @ApiImplicitParam(name = "code", value = "TASK_DEFINITION_CODE", required = true, dataType = "Long", example = "1"),
- @ApiImplicitParam(name = "taskDefinitionJsonObj", value = "TASK_DEFINITION_JSON", required = true, type = "String")
+ @ApiImplicitParam(name = "projectCode", value = "PROJECT_CODE", required = true, dataTypeClass = long.class),
+ @ApiImplicitParam(name = "code", value = "TASK_DEFINITION_CODE", required = true, dataTypeClass = long.class, example = "1"),
+ @ApiImplicitParam(name = "taskDefinitionJsonObj", value = "TASK_DEFINITION_JSON", required = true, dataTypeClass = String.class)
})
@PutMapping(value = "/{code}")
@ResponseStatus(HttpStatus.OK)
@@ -150,7 +153,8 @@ public class TaskDefinitionController extends BaseController {
@ApiParam(name = "projectCode", value = "PROJECT_CODE", required = true) @PathVariable long projectCode,
@PathVariable(value = "code") long code,
@RequestParam(value = "taskDefinitionJsonObj", required = true) String taskDefinitionJsonObj) {
- Map<String, Object> result = taskDefinitionService.updateTaskDefinition(loginUser, projectCode, code, taskDefinitionJsonObj);
+ Map<String, Object> result =
+ taskDefinitionService.updateTaskDefinition(loginUser, projectCode, code, taskDefinitionJsonObj);
return returnDataList(result);
}
@@ -166,10 +170,10 @@ public class TaskDefinitionController extends BaseController {
*/
@ApiOperation(value = "updateWithUpstream", notes = "UPDATE_TASK_DEFINITION_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "projectCode", value = "PROJECT_CODE", required = true, type = "Long"),
- @ApiImplicitParam(name = "code", value = "TASK_DEFINITION_CODE", required = true, dataType = "Long", example = "1"),
- @ApiImplicitParam(name = "taskDefinitionJsonObj", value = "TASK_DEFINITION_JSON", required = true, type = "String"),
- @ApiImplicitParam(name = "upstreamCodes", value = "UPSTREAM_CODES", required = false, type = "String")
+ @ApiImplicitParam(name = "projectCode", value = "PROJECT_CODE", required = true, dataTypeClass = long.class),
+ @ApiImplicitParam(name = "code", value = "TASK_DEFINITION_CODE", required = true, dataTypeClass = long.class, example = "1"),
+ @ApiImplicitParam(name = "taskDefinitionJsonObj", value = "TASK_DEFINITION_JSON", required = true, dataTypeClass = String.class),
+ @ApiImplicitParam(name = "upstreamCodes", value = "UPSTREAM_CODES", required = false, dataTypeClass = String.class)
})
@PutMapping(value = "/{code}/with-upstream")
@ResponseStatus(HttpStatus.OK)
@@ -180,7 +184,8 @@ public class TaskDefinitionController extends BaseController {
@PathVariable(value = "code") long code,
@RequestParam(value = "taskDefinitionJsonObj", required = true) String taskDefinitionJsonObj,
@RequestParam(value = "upstreamCodes", required = false) String upstreamCodes) {
- Map<String, Object> result = taskDefinitionService.updateTaskWithUpstream(loginUser, projectCode, code, taskDefinitionJsonObj, upstreamCodes);
+ Map<String, Object> result = taskDefinitionService.updateTaskWithUpstream(loginUser, projectCode, code,
+ taskDefinitionJsonObj, upstreamCodes);
return returnDataList(result);
}
@@ -197,9 +202,9 @@ public class TaskDefinitionController extends BaseController {
*/
@ApiOperation(value = "queryVersions", notes = "QUERY_TASK_DEFINITION_VERSIONS_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "code", value = "TASK_DEFINITION_CODE", required = true, dataType = "Long", example = "1"),
- @ApiImplicitParam(name = "pageNo", value = "PAGE_NO", required = true, dataType = "Int", example = "1"),
- @ApiImplicitParam(name = "pageSize", value = "PAGE_SIZE", required = true, dataType = "Int", example = "10")
+ @ApiImplicitParam(name = "code", value = "TASK_DEFINITION_CODE", required = true, dataTypeClass = long.class, example = "1"),
+ @ApiImplicitParam(name = "pageNo", value = "PAGE_NO", required = true, dataTypeClass = int.class, example = "1"),
+ @ApiImplicitParam(name = "pageSize", value = "PAGE_SIZE", required = true, dataTypeClass = int.class, example = "10")
})
@GetMapping(value = "/{code}/versions")
@ResponseStatus(HttpStatus.OK)
@@ -228,8 +233,8 @@ public class TaskDefinitionController extends BaseController {
*/
@ApiOperation(value = "switchVersion", notes = "SWITCH_TASK_DEFINITION_VERSION_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "code", value = "TASK_DEFINITION_CODE", required = true, dataType = "Long", example = "1"),
- @ApiImplicitParam(name = "version", value = "VERSION", required = true, dataType = "Int", example = "100")
+ @ApiImplicitParam(name = "code", value = "TASK_DEFINITION_CODE", required = true, dataTypeClass = long.class, example = "1"),
+ @ApiImplicitParam(name = "version", value = "VERSION", required = true, dataTypeClass = int.class, example = "100")
})
@GetMapping(value = "/{code}/versions/{version}")
@ResponseStatus(HttpStatus.OK)
@@ -254,8 +259,8 @@ public class TaskDefinitionController extends BaseController {
*/
@ApiOperation(value = "deleteVersion", notes = "DELETE_TASK_DEFINITION_VERSION_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "code", value = "TASK_DEFINITION_CODE", required = true, dataType = "Long", example = "1"),
- @ApiImplicitParam(name = "version", value = "VERSION", required = true, dataType = "Int", example = "100")
+ @ApiImplicitParam(name = "code", value = "TASK_DEFINITION_CODE", required = true, dataTypeClass = long.class, example = "1"),
+ @ApiImplicitParam(name = "version", value = "VERSION", required = true, dataTypeClass = int.class, example = "100")
})
@DeleteMapping(value = "/{code}/versions/{version}")
@ResponseStatus(HttpStatus.OK)
@@ -265,7 +270,8 @@ public class TaskDefinitionController extends BaseController {
@ApiParam(name = "projectCode", value = "PROJECT_CODE", required = true) @PathVariable long projectCode,
@PathVariable(value = "code") long code,
@PathVariable(value = "version") int version) {
- Map<String, Object> result = taskDefinitionService.deleteByCodeAndVersion(loginUser, projectCode, code, version);
+ Map<String, Object> result =
+ taskDefinitionService.deleteByCodeAndVersion(loginUser, projectCode, code, version);
return returnDataList(result);
}
@@ -279,7 +285,7 @@ public class TaskDefinitionController extends BaseController {
*/
@ApiOperation(value = "deleteTaskDefinition", notes = "DELETE_TASK_DEFINITION_BY_CODE_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "code", value = "TASK_DEFINITION_CODE", required = true, dataType = "Long", example = "1")
+ @ApiImplicitParam(name = "code", value = "TASK_DEFINITION_CODE", required = true, dataTypeClass = long.class, example = "1")
})
@DeleteMapping(value = "/{code}")
@ResponseStatus(HttpStatus.OK)
@@ -302,7 +308,7 @@ public class TaskDefinitionController extends BaseController {
*/
@ApiOperation(value = "queryTaskDefinitionByCode", notes = "QUERY_TASK_DEFINITION_DETAIL_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "code", value = "TASK_DEFINITION_CODE", required = true, dataType = "Long", example = "1")
+ @ApiImplicitParam(name = "code", value = "TASK_DEFINITION_CODE", required = true, dataTypeClass = long.class, example = "1")
})
@GetMapping(value = "/{code}")
@ResponseStatus(HttpStatus.OK)
@@ -330,13 +336,13 @@ public class TaskDefinitionController extends BaseController {
*/
@ApiOperation(value = "queryTaskDefinitionListPaging", notes = "QUERY_TASK_DEFINITION_LIST_PAGING_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "projectCode", value = "PROJECT_CODE", required = false, type = "Long"),
- @ApiImplicitParam(name = "searchWorkflowName", value = "SEARCH_WORKFLOW_NAME", required = false, type = "String"),
- @ApiImplicitParam(name = "searchTaskName", value = "SEARCH_TASK_NAME", required = false, type = "String"),
- @ApiImplicitParam(name = "taskType", value = "TASK_TYPE", required = false, dataType = "TaskType", example = "SHELL"),
- @ApiImplicitParam(name = "taskExecuteType", value = "TASK_EXECUTE_TYPE", required = false, dataType = "TaskExecuteType", example = "STREAM"),
- @ApiImplicitParam(name = "pageNo", value = "PAGE_NO", required = true, dataType = "Int", example = "1"),
- @ApiImplicitParam(name = "pageSize", value = "PAGE_SIZE", required = true, dataType = "Int", example = "10")
+ @ApiImplicitParam(name = "projectCode", value = "PROJECT_CODE", required = false, dataTypeClass = long.class),
+ @ApiImplicitParam(name = "searchWorkflowName", value = "SEARCH_WORKFLOW_NAME", required = false, dataTypeClass = String.class),
+ @ApiImplicitParam(name = "searchTaskName", value = "SEARCH_TASK_NAME", required = false, dataTypeClass = String.class),
+ @ApiImplicitParam(name = "taskType", value = "TASK_TYPE", required = false, dataTypeClass = String.class, example = "SHELL"),
+ @ApiImplicitParam(name = "taskExecuteType", value = "TASK_EXECUTE_TYPE", required = false, dataTypeClass = TaskExecuteType.class, example = "STREAM"),
+ @ApiImplicitParam(name = "pageNo", value = "PAGE_NO", required = true, dataTypeClass = int.class, example = "1"),
+ @ApiImplicitParam(name = "pageSize", value = "PAGE_SIZE", required = true, dataTypeClass = int.class, example = "10")
})
@GetMapping()
@ResponseStatus(HttpStatus.OK)
@@ -356,7 +362,8 @@ public class TaskDefinitionController extends BaseController {
}
searchWorkflowName = ParameterUtils.handleEscapes(searchWorkflowName);
searchTaskName = ParameterUtils.handleEscapes(searchTaskName);
- return taskDefinitionService.queryTaskDefinitionListPaging(loginUser, projectCode, searchWorkflowName, searchTaskName, taskType, taskExecuteType, pageNo, pageSize);
+ return taskDefinitionService.queryTaskDefinitionListPaging(loginUser, projectCode, searchWorkflowName,
+ searchTaskName, taskType, taskExecuteType, pageNo, pageSize);
}
/**
@@ -368,7 +375,7 @@ public class TaskDefinitionController extends BaseController {
*/
@ApiOperation(value = "genTaskCodeList", notes = "GEN_TASK_CODE_LIST_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "genNum", value = "GEN_NUM", required = true, dataType = "Int", example = "1")
+ @ApiImplicitParam(name = "genNum", value = "GEN_NUM", required = true, dataTypeClass = int.class, example = "1")
})
@GetMapping(value = "/gen-task-codes")
@ResponseStatus(HttpStatus.OK)
@@ -391,9 +398,9 @@ public class TaskDefinitionController extends BaseController {
*/
@ApiOperation(value = "releaseTaskDefinition", notes = "RELEASE_TASK_DEFINITION_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "projectCode", value = "PROCESS_DEFINITION_NAME", required = true, type = "Long"),
- @ApiImplicitParam(name = "code", value = "TASK_DEFINITION_CODE", required = true, dataType = "Long", example = "123456789"),
- @ApiImplicitParam(name = "releaseState", value = "RELEASE_PROCESS_DEFINITION_NOTES", required = true, dataType = "ReleaseState")
+ @ApiImplicitParam(name = "projectCode", value = "PROCESS_DEFINITION_NAME", required = true, dataTypeClass = long.class),
+ @ApiImplicitParam(name = "code", value = "TASK_DEFINITION_CODE", required = true, dataTypeClass = long.class, example = "123456789"),
+ @ApiImplicitParam(name = "releaseState", value = "RELEASE_PROCESS_DEFINITION_NOTES", required = true, dataTypeClass = ReleaseState.class)
})
@PostMapping(value = "/{code}/release")
@ResponseStatus(HttpStatus.OK)
@@ -403,7 +410,8 @@ public class TaskDefinitionController extends BaseController {
@ApiParam(name = "projectCode", value = "PROJECT_CODE", required = true) @PathVariable long projectCode,
@PathVariable(value = "code", required = true) long code,
@RequestParam(value = "releaseState", required = true, defaultValue = "OFFLINE") ReleaseState releaseState) {
- Map<String, Object> result = taskDefinitionService.releaseTaskDefinition(loginUser, projectCode, code, releaseState);
+ Map<String, Object> result =
+ taskDefinitionService.releaseTaskDefinition(loginUser, projectCode, code, releaseState);
return returnDataList(result);
}
}
diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/TaskGroupController.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/TaskGroupController.java
index ca65ac78fe..86f0b33171 100644
--- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/TaskGroupController.java
+++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/TaskGroupController.java
@@ -32,10 +32,7 @@ import org.apache.dolphinscheduler.api.utils.Result;
import org.apache.dolphinscheduler.common.Constants;
import org.apache.dolphinscheduler.dao.entity.User;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiImplicitParam;
-import io.swagger.annotations.ApiImplicitParams;
-import io.swagger.annotations.ApiOperation;
+import springfox.documentation.annotations.ApiIgnore;
import java.util.Map;
@@ -48,7 +45,11 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;
-import springfox.documentation.annotations.ApiIgnore;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
/**
* task group controller
@@ -73,10 +74,10 @@ public class TaskGroupController extends BaseController {
*/
@ApiOperation(value = "create", notes = "CREATE_TASK_GROUP_NOTE")
@ApiImplicitParams({
- @ApiImplicitParam(name = "name", value = "NAME", dataType = "String"),
- @ApiImplicitParam(name = "projectCode", value = "PROJECT_CODE", type = "Long"),
- @ApiImplicitParam(name = "description", value = "DESCRIPTION", dataType = "String"),
- @ApiImplicitParam(name = "groupSize", value = "GROUPSIZE", dataType = "Int"),
+ @ApiImplicitParam(name = "name", value = "NAME", dataTypeClass = String.class),
+ @ApiImplicitParam(name = "projectCode", value = "PROJECT_CODE", dataTypeClass = long.class),
+ @ApiImplicitParam(name = "description", value = "DESCRIPTION", dataTypeClass = String.class),
+ @ApiImplicitParam(name = "groupSize", value = "GROUPSIZE", dataTypeClass = int.class),
})
@PostMapping(value = "/create")
@@ -88,7 +89,8 @@ public class TaskGroupController extends BaseController {
@RequestParam(value = "projectCode", required = false, defaultValue = "0") Long projectcode,
@RequestParam("description") String description,
@RequestParam("groupSize") Integer groupSize) {
- Map<String, Object> result = taskGroupService.createTaskGroup(loginUser, projectcode, name, description, groupSize);
+ Map<String, Object> result =
+ taskGroupService.createTaskGroup(loginUser, projectcode, name, description, groupSize);
return returnDataList(result);
}
@@ -104,10 +106,10 @@ public class TaskGroupController extends BaseController {
*/
@ApiOperation(value = "update", notes = "UPDATE_TASK_GROUP_NOTE")
@ApiImplicitParams({
- @ApiImplicitParam(name = "id", value = "id", dataType = "Int"),
- @ApiImplicitParam(name = "name", value = "NAME", dataType = "String"),
- @ApiImplicitParam(name = "description", value = "DESCRIPTION", dataType = "String"),
- @ApiImplicitParam(name = "groupSize", value = "GROUPSIZE", dataType = "Int"),
+ @ApiImplicitParam(name = "id", value = "id", dataTypeClass = int.class),
+ @ApiImplicitParam(name = "name", value = "NAME", dataTypeClass = String.class),
+ @ApiImplicitParam(name = "description", value = "DESCRIPTION", dataTypeClass = String.class),
+ @ApiImplicitParam(name = "groupSize", value = "GROUPSIZE", dataTypeClass = int.class),
})
@PostMapping(value = "/update")
@@ -133,9 +135,9 @@ public class TaskGroupController extends BaseController {
*/
@ApiOperation(value = "list-paging", notes = "QUERY_ALL_TASK_GROUP_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "pageNo", value = "PAGE_NO", required = true, dataType = "Int", example = "1"),
- @ApiImplicitParam(name = "name", value = "NAME", required = false, dataType = "String"),
- @ApiImplicitParam(name = "pageSize", value = "PAGE_SIZE", required = true, dataType = "Int", example = "20")
+ @ApiImplicitParam(name = "pageNo", value = "PAGE_NO", required = true, dataTypeClass = int.class, example = "1"),
+ @ApiImplicitParam(name = "name", value = "NAME", required = false, dataTypeClass = String.class),
+ @ApiImplicitParam(name = "pageSize", value = "PAGE_SIZE", required = true, dataTypeClass = int.class, example = "20")
})
@GetMapping(value = "/list-paging")
@ResponseStatus(HttpStatus.OK)
@@ -161,9 +163,9 @@ public class TaskGroupController extends BaseController {
*/
@ApiOperation(value = "queryTaskGroupByStatus", notes = "QUERY_TASK_GROUP_LIST_BY_STATUS_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "pageNo", value = "PAGE_NO", required = true, dataType = "Int", example = "1"),
- @ApiImplicitParam(name = "pageSize", value = "PAGE_SIZE", required = true, dataType = "Int", example = "20"),
- @ApiImplicitParam(name = "status", value = "status", required = true, dataType = "Int")
+ @ApiImplicitParam(name = "pageNo", value = "PAGE_NO", required = true, dataTypeClass = int.class, example = "1"),
+ @ApiImplicitParam(name = "pageSize", value = "PAGE_SIZE", required = true, dataTypeClass = int.class, example = "20"),
+ @ApiImplicitParam(name = "status", value = "status", required = true, dataTypeClass = int.class)
})
@GetMapping(value = "/query-list-by-status")
@ResponseStatus(HttpStatus.OK)
@@ -188,9 +190,9 @@ public class TaskGroupController extends BaseController {
*/
@ApiOperation(value = "queryTaskGroupByName", notes = "QUERY_TASK_GROUP_LIST_BY_PROJECT_ID_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "pageNo", value = "PAGE_NO", required = true, dataType = "Int", example = "1"),
- @ApiImplicitParam(name = "pageSize", value = "PAGE_SIZE", required = true, dataType = "Int", example = "20"),
- @ApiImplicitParam(name = "projectCode", value = "PROJECT_CODE", required = true, dataType = "String")
+ @ApiImplicitParam(name = "pageNo", value = "PAGE_NO", required = true, dataTypeClass = int.class, example = "1"),
+ @ApiImplicitParam(name = "pageSize", value = "PAGE_SIZE", required = true, dataTypeClass = int.class, example = "20"),
+ @ApiImplicitParam(name = "projectCode", value = "PROJECT_CODE", required = true, dataTypeClass = String.class)
})
@GetMapping(value = "/query-list-by-projectCode")
@ResponseStatus(HttpStatus.OK)
@@ -200,7 +202,8 @@ public class TaskGroupController extends BaseController {
@RequestParam("pageNo") Integer pageNo,
@RequestParam(value = "projectCode", required = false) Long projectCode,
@RequestParam("pageSize") Integer pageSize) {
- Map<String, Object> result = taskGroupService.queryTaskGroupByProjectCode(loginUser, pageNo, pageSize, projectCode);
+ Map<String, Object> result =
+ taskGroupService.queryTaskGroupByProjectCode(loginUser, pageNo, pageSize, projectCode);
return returnDataList(result);
}
@@ -213,7 +216,7 @@ public class TaskGroupController extends BaseController {
*/
@ApiOperation(value = "closeTaskGroup", notes = "CLOSE_TASK_GROUP_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "id", value = "ID", required = true, dataType = "Int")
+ @ApiImplicitParam(name = "id", value = "ID", required = true, dataTypeClass = int.class)
})
@PostMapping(value = "/close-task-group")
@ResponseStatus(HttpStatus.CREATED)
@@ -235,7 +238,7 @@ public class TaskGroupController extends BaseController {
*/
@ApiOperation(value = "startTaskGroup", notes = "START_TASK_GROUP_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "id", value = "ID", required = true, dataType = "Int")
+ @ApiImplicitParam(name = "id", value = "ID", required = true, dataTypeClass = int.class)
})
@PostMapping(value = "/start-task-group")
@ResponseStatus(HttpStatus.CREATED)
@@ -256,7 +259,7 @@ public class TaskGroupController extends BaseController {
*/
@ApiOperation(value = "forceStart", notes = "WAKE_TASK_COMPULSIVELY_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "queueId", value = "TASK_GROUP_QUEUEID", required = true, dataType = "Int")
+ @ApiImplicitParam(name = "queueId", value = "TASK_GROUP_QUEUEID", required = true, dataTypeClass = int.class)
})
@PostMapping(value = "/forceStart")
@ResponseStatus(HttpStatus.CREATED)
@@ -277,8 +280,8 @@ public class TaskGroupController extends BaseController {
*/
@ApiOperation(value = "modifyPriority", notes = "WAKE_TASK_COMPULSIVELY_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "queueId", value = "TASK_GROUP_QUEUEID", required = true, dataType = "Int"),
- @ApiImplicitParam(name = "priority", value = "TASK_GROUP_QUEUE_PRIORITY", required = true, dataType = "Int")
+ @ApiImplicitParam(name = "queueId", value = "TASK_GROUP_QUEUEID", required = true, dataTypeClass = int.class),
+ @ApiImplicitParam(name = "priority", value = "TASK_GROUP_QUEUE_PRIORITY", required = true, dataTypeClass = int.class)
})
@PostMapping(value = "/modifyPriority")
@ResponseStatus(HttpStatus.CREATED)
@@ -287,7 +290,7 @@ public class TaskGroupController extends BaseController {
public Result modifyPriority(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@RequestParam(value = "queueId") Integer queueId,
@RequestParam(value = "priority") Integer priority) {
- Map<String, Object> result = taskGroupService.modifyPriority(loginUser, queueId,priority);
+ Map<String, Object> result = taskGroupService.modifyPriority(loginUser, queueId, priority);
return returnDataList(result);
}
@@ -308,12 +311,12 @@ public class TaskGroupController extends BaseController {
*/
@ApiOperation(value = "queryTasksByGroupId", notes = "QUERY_ALL_TASKS_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "groupId", value = "GROUP_ID", required = false, dataType = "Int", example = "1", defaultValue = "-1"),
- @ApiImplicitParam(name = "taskInstanceName", value = "TASK_INSTANCE_NAME", required = false, dataType = "String", example = "taskName"),
- @ApiImplicitParam(name = "processInstanceName", value = "PROCESS_INSTANCE_NAME", required = false, dataType = "String", example = "processName"),
- @ApiImplicitParam(name = "status", value = "STATUS", required = false, dataType = "Int", example = "1"),
- @ApiImplicitParam(name = "pageNo", value = "PAGE_NO", required = true, dataType = "Int", example = "1"),
- @ApiImplicitParam(name = "pageSize", value = "PAGE_SIZE", required = true, dataType = "Int", example = "20")
+ @ApiImplicitParam(name = "groupId", value = "GROUP_ID", required = false, dataTypeClass = int.class, example = "1", defaultValue = "-1"),
+ @ApiImplicitParam(name = "taskInstanceName", value = "TASK_INSTANCE_NAME", required = false, dataTypeClass = String.class, example = "taskName"),
+ @ApiImplicitParam(name = "processInstanceName", value = "PROCESS_INSTANCE_NAME", required = false, dataTypeClass = String.class, example = "processName"),
+ @ApiImplicitParam(name = "status", value = "STATUS", required = false, dataTypeClass = int.class, example = "1"),
+ @ApiImplicitParam(name = "pageNo", value = "PAGE_NO", required = true, dataTypeClass = int.class, example = "1"),
+ @ApiImplicitParam(name = "pageSize", value = "PAGE_SIZE", required = true, dataTypeClass = int.class, example = "20")
})
@GetMapping(value = "/query-list-by-group-id")
@ResponseStatus(HttpStatus.OK)
@@ -321,13 +324,13 @@ public class TaskGroupController extends BaseController {
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
public Result queryTasksByGroupId(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@RequestParam(value = "groupId", required = false, defaultValue = "-1") Integer groupId,
- @RequestParam(value = "taskInstanceName",required = false) String taskName,
- @RequestParam(value = "processInstanceName",required = false) String processName,
- @RequestParam(value = "status",required = false) Integer status,
+ @RequestParam(value = "taskInstanceName", required = false) String taskName,
+ @RequestParam(value = "processInstanceName", required = false) String processName,
+ @RequestParam(value = "status", required = false) Integer status,
@RequestParam("pageNo") Integer pageNo,
@RequestParam("pageSize") Integer pageSize) {
- Map<String, Object> result = taskGroupQueueService.queryTasksByGroupId(loginUser, taskName,processName,status,
- groupId, pageNo, pageSize);
+ Map<String, Object> result = taskGroupQueueService.queryTasksByGroupId(loginUser, taskName, processName, status,
+ groupId, pageNo, pageSize);
return returnDataList(result);
}
diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/TaskInstanceController.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/TaskInstanceController.java
index e7a707af28..1ee0f30f78 100644
--- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/TaskInstanceController.java
+++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/TaskInstanceController.java
@@ -30,10 +30,12 @@ import org.apache.dolphinscheduler.common.Constants;
import org.apache.dolphinscheduler.common.enums.TaskExecuteType;
import org.apache.dolphinscheduler.common.utils.ParameterUtils;
import org.apache.dolphinscheduler.dao.entity.User;
+import org.apache.dolphinscheduler.plugin.task.api.enums.TaskExecutionStatus;
+
+import springfox.documentation.annotations.ApiIgnore;
import java.util.Map;
-import org.apache.dolphinscheduler.plugin.task.api.enums.TaskExecutionStatus;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.GetMapping;
@@ -50,7 +52,6 @@ import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
-import springfox.documentation.annotations.ApiIgnore;
/**
* task instance controller
@@ -82,18 +83,18 @@ public class TaskInstanceController extends BaseController {
*/
@ApiOperation(value = "queryTaskListPaging", notes = "QUERY_TASK_INSTANCE_LIST_PAGING_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "processInstanceId", value = "PROCESS_INSTANCE_ID", required = false, dataType = "Int", example = "100"),
- @ApiImplicitParam(name = "processInstanceName", value = "PROCESS_INSTANCE_NAME", required = false, type = "String"),
- @ApiImplicitParam(name = "searchVal", value = "SEARCH_VAL", type = "String"),
- @ApiImplicitParam(name = "taskName", value = "TASK_NAME", type = "String"),
- @ApiImplicitParam(name = "executorName", value = "EXECUTOR_NAME", type = "String"),
- @ApiImplicitParam(name = "stateType", value = "EXECUTION_STATUS", type = "ExecutionStatus"),
- @ApiImplicitParam(name = "host", value = "HOST", type = "String"),
- @ApiImplicitParam(name = "startDate", value = "START_DATE", type = "String"),
- @ApiImplicitParam(name = "endDate", value = "END_DATE", type = "String"),
- @ApiImplicitParam(name = "taskExecuteType", value = "TASK_EXECUTE_TYPE", required = false, dataType = "TaskExecuteType", example = "STREAM"),
- @ApiImplicitParam(name = "pageNo", value = "PAGE_NO", required = true, dataType = "Int", example = "1"),
- @ApiImplicitParam(name = "pageSize", value = "PAGE_SIZE", required = true, dataType = "Int", example = "20"),
+ @ApiImplicitParam(name = "processInstanceId", value = "PROCESS_INSTANCE_ID", required = false, dataTypeClass = int.class, example = "100"),
+ @ApiImplicitParam(name = "processInstanceName", value = "PROCESS_INSTANCE_NAME", required = false, dataTypeClass = String.class),
+ @ApiImplicitParam(name = "searchVal", value = "SEARCH_VAL", dataTypeClass = String.class),
+ @ApiImplicitParam(name = "taskName", value = "TASK_NAME", dataTypeClass = String.class),
+ @ApiImplicitParam(name = "executorName", value = "EXECUTOR_NAME", dataTypeClass = String.class),
+ @ApiImplicitParam(name = "stateType", value = "EXECUTION_STATUS", dataTypeClass = TaskExecutionStatus.class),
+ @ApiImplicitParam(name = "host", value = "HOST", dataTypeClass = String.class),
+ @ApiImplicitParam(name = "startDate", value = "START_DATE", dataTypeClass = String.class),
+ @ApiImplicitParam(name = "endDate", value = "END_DATE", dataTypeClass = String.class),
+ @ApiImplicitParam(name = "taskExecuteType", value = "TASK_EXECUTE_TYPE", required = false, dataTypeClass = TaskExecuteType.class, example = "STREAM"),
+ @ApiImplicitParam(name = "pageNo", value = "PAGE_NO", required = true, dataTypeClass = int.class, example = "1"),
+ @ApiImplicitParam(name = "pageSize", value = "PAGE_SIZE", required = true, dataTypeClass = int.class, example = "20"),
})
@GetMapping()
@ResponseStatus(HttpStatus.OK)
@@ -119,8 +120,10 @@ public class TaskInstanceController extends BaseController {
return result;
}
searchVal = ParameterUtils.handleEscapes(searchVal);
- result = taskInstanceService.queryTaskListPaging(loginUser, projectCode, processInstanceId, processInstanceName, processDefinitionName,
- taskName, executorName, startTime, endTime, searchVal, stateType, host, taskExecuteType, pageNo, pageSize);
+ result = taskInstanceService.queryTaskListPaging(loginUser, projectCode, processInstanceId, processInstanceName,
+ processDefinitionName,
+ taskName, executorName, startTime, endTime, searchVal, stateType, host, taskExecuteType, pageNo,
+ pageSize);
return result;
}
@@ -134,7 +137,7 @@ public class TaskInstanceController extends BaseController {
*/
@ApiOperation(value = "force-success", notes = "FORCE_TASK_SUCCESS")
@ApiImplicitParams({
- @ApiImplicitParam(name = "id", value = "TASK_INSTANCE_ID", required = true, dataType = "Int", example = "12")
+ @ApiImplicitParam(name = "id", value = "TASK_INSTANCE_ID", required = true, dataTypeClass = int.class, example = "12")
})
@PostMapping(value = "/{id}/force-success")
@ResponseStatus(HttpStatus.OK)
@@ -157,15 +160,15 @@ public class TaskInstanceController extends BaseController {
*/
@ApiOperation(value = "savepoint", notes = "TASK_SAVEPOINT")
@ApiImplicitParams({
- @ApiImplicitParam(name = "id", value = "TASK_INSTANCE_ID", required = true, dataType = "Int", example = "12")
+ @ApiImplicitParam(name = "id", value = "TASK_INSTANCE_ID", required = true, dataTypeClass = int.class, example = "12")
})
@PostMapping(value = "/{id}/savepoint")
@ResponseStatus(HttpStatus.OK)
@ApiException(TASK_SAVEPOINT_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
public Result<Object> taskSavePoint(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
- @ApiParam(name = "projectCode", value = "PROJECT_CODE", required = true) @PathVariable long projectCode,
- @PathVariable(value = "id") Integer id) {
+ @ApiParam(name = "projectCode", value = "PROJECT_CODE", required = true) @PathVariable long projectCode,
+ @PathVariable(value = "id") Integer id) {
return taskInstanceService.taskSavePoint(loginUser, projectCode, id);
}
@@ -179,15 +182,15 @@ public class TaskInstanceController extends BaseController {
*/
@ApiOperation(value = "stop", notes = "TASK_STOP")
@ApiImplicitParams({
- @ApiImplicitParam(name = "id", value = "TASK_INSTANCE_ID", required = true, dataType = "Int", example = "12")
+ @ApiImplicitParam(name = "id", value = "TASK_INSTANCE_ID", required = true, dataTypeClass = int.class, example = "12")
})
@PostMapping(value = "/{id}/stop")
@ResponseStatus(HttpStatus.OK)
@ApiException(TASK_STOP_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
public Result<Object> stopTask(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
- @ApiParam(name = "projectCode", value = "PROJECT_CODE", required = true) @PathVariable long projectCode,
- @PathVariable(value = "id") Integer id) {
+ @ApiParam(name = "projectCode", value = "PROJECT_CODE", required = true) @PathVariable long projectCode,
+ @PathVariable(value = "id") Integer id) {
return taskInstanceService.stopTask(loginUser, projectCode, id);
}
}
diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/TenantController.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/TenantController.java
index 6d1ea6b218..e45e08f95d 100644
--- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/TenantController.java
+++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/TenantController.java
@@ -32,6 +32,8 @@ import org.apache.dolphinscheduler.common.Constants;
import org.apache.dolphinscheduler.common.utils.ParameterUtils;
import org.apache.dolphinscheduler.dao.entity.User;
+import springfox.documentation.annotations.ApiIgnore;
+
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
@@ -51,7 +53,6 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
-import springfox.documentation.annotations.ApiIgnore;
/**
* tenant controller
@@ -75,9 +76,9 @@ public class TenantController extends BaseController {
*/
@ApiOperation(value = "createTenant", notes = "CREATE_TENANT_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "tenantCode", value = "TENANT_CODE", required = true, dataType = "String"),
- @ApiImplicitParam(name = "queueId", value = "QUEUE_ID", required = true, dataType = "Int", example = "100"),
- @ApiImplicitParam(name = "description", value = "TENANT_DESC", dataType = "String")
+ @ApiImplicitParam(name = "tenantCode", value = "TENANT_CODE", required = true, dataTypeClass = String.class),
+ @ApiImplicitParam(name = "queueId", value = "QUEUE_ID", required = true, dataTypeClass = int.class, example = "100"),
+ @ApiImplicitParam(name = "description", value = "TENANT_DESC", dataTypeClass = String.class)
})
@PostMapping()
@ResponseStatus(HttpStatus.CREATED)
@@ -103,9 +104,9 @@ public class TenantController extends BaseController {
*/
@ApiOperation(value = "queryTenantlistPaging", notes = "QUERY_TENANT_LIST_PAGING_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "searchVal", value = "SEARCH_VAL", dataType = "String"),
- @ApiImplicitParam(name = "pageNo", value = "PAGE_NO", required = true, dataType = "Int", example = "1"),
- @ApiImplicitParam(name = "pageSize", value = "PAGE_SIZE", required = true, dataType = "Int", example = "20")
+ @ApiImplicitParam(name = "searchVal", value = "SEARCH_VAL", dataTypeClass = String.class),
+ @ApiImplicitParam(name = "pageNo", value = "PAGE_NO", required = true, dataTypeClass = int.class, example = "1"),
+ @ApiImplicitParam(name = "pageSize", value = "PAGE_SIZE", required = true, dataTypeClass = int.class, example = "20")
})
@GetMapping()
@ResponseStatus(HttpStatus.OK)
@@ -125,7 +126,6 @@ public class TenantController extends BaseController {
return result;
}
-
/**
* tenant list
*
@@ -142,7 +142,6 @@ public class TenantController extends BaseController {
return returnDataList(result);
}
-
/**
* update tenant
*
@@ -155,10 +154,10 @@ public class TenantController extends BaseController {
*/
@ApiOperation(value = "updateTenant", notes = "UPDATE_TENANT_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "id", value = "TENANT_ID", required = true, dataType = "Int", example = "100"),
- @ApiImplicitParam(name = "tenantCode", value = "TENANT_CODE", required = true, dataType = "String"),
- @ApiImplicitParam(name = "queueId", value = "QUEUE_ID", required = true, dataType = "Int", example = "100"),
- @ApiImplicitParam(name = "description", value = "TENANT_DESC", type = "String")
+ @ApiImplicitParam(name = "id", value = "TENANT_ID", required = true, dataTypeClass = int.class, example = "100"),
+ @ApiImplicitParam(name = "tenantCode", value = "TENANT_CODE", required = true, dataTypeClass = String.class),
+ @ApiImplicitParam(name = "queueId", value = "QUEUE_ID", required = true, dataTypeClass = int.class, example = "100"),
+ @ApiImplicitParam(name = "description", value = "TENANT_DESC", dataTypeClass = String.class)
})
@PutMapping(value = "/{id}")
@ResponseStatus(HttpStatus.OK)
@@ -183,7 +182,7 @@ public class TenantController extends BaseController {
*/
@ApiOperation(value = "deleteTenantById", notes = "DELETE_TENANT_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "id", value = "TENANT_ID", required = true, dataType = "Int", example = "100")
+ @ApiImplicitParam(name = "id", value = "TENANT_ID", required = true, dataTypeClass = int.class, example = "100")
})
@DeleteMapping(value = "/{id}")
@ResponseStatus(HttpStatus.OK)
@@ -204,7 +203,7 @@ public class TenantController extends BaseController {
*/
@ApiOperation(value = "verifyTenantCode", notes = "VERIFY_TENANT_CODE_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "tenantCode", value = "TENANT_CODE", required = true, dataType = "String")
+ @ApiImplicitParam(name = "tenantCode", value = "TENANT_CODE", required = true, dataTypeClass = String.class)
})
@GetMapping(value = "/verify-code")
@ResponseStatus(HttpStatus.OK)
diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/UiPluginController.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/UiPluginController.java
index 949e0292e7..ca960b6779 100644
--- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/UiPluginController.java
+++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/UiPluginController.java
@@ -27,6 +27,8 @@ import org.apache.dolphinscheduler.common.Constants;
import org.apache.dolphinscheduler.common.enums.PluginType;
import org.apache.dolphinscheduler.dao.entity.User;
+import springfox.documentation.annotations.ApiIgnore;
+
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
@@ -43,7 +45,6 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
-import springfox.documentation.annotations.ApiIgnore;
/**
* ui plugin controller
@@ -61,7 +62,7 @@ public class UiPluginController extends BaseController {
@ApiOperation(value = "queryUiPluginsByType", notes = "QUERY_UI_PLUGINS_BY_TYPE")
@ApiImplicitParams({
- @ApiImplicitParam(name = "pluginType", value = "pluginType", required = true, dataType = "PluginType"),
+ @ApiImplicitParam(name = "pluginType", value = "pluginType", required = true, dataTypeClass = PluginType.class),
})
@GetMapping(value = "/query-by-type")
@ResponseStatus(HttpStatus.CREATED)
@@ -76,7 +77,7 @@ public class UiPluginController extends BaseController {
@ApiOperation(value = "queryUiPluginDetailById", notes = "QUERY_UI_PLUGIN_DETAIL_BY_ID")
@ApiImplicitParams({
- @ApiImplicitParam(name = "id", value = "PLUGIN_ID", required = true, dataType = "Int", example = "100"),
+ @ApiImplicitParam(name = "id", value = "PLUGIN_ID", required = true, dataTypeClass = int.class, example = "100"),
})
@GetMapping(value = "/{id}")
@ResponseStatus(HttpStatus.CREATED)
diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/UsersController.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/UsersController.java
index 81f0041db0..30bb447b4c 100644
--- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/UsersController.java
+++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/UsersController.java
@@ -42,6 +42,8 @@ import org.apache.dolphinscheduler.common.Constants;
import org.apache.dolphinscheduler.common.utils.ParameterUtils;
import org.apache.dolphinscheduler.dao.entity.User;
+import springfox.documentation.annotations.ApiIgnore;
+
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
@@ -63,7 +65,6 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
-import springfox.documentation.annotations.ApiIgnore;
/**
* users controller
@@ -92,13 +93,13 @@ public class UsersController extends BaseController {
*/
@ApiOperation(value = "createUser", notes = "CREATE_USER_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "userName", value = "USER_NAME", required = true, type = "String"),
- @ApiImplicitParam(name = "userPassword", value = "USER_PASSWORD", required = true, type = "String"),
- @ApiImplicitParam(name = "tenantId", value = "TENANT_ID", required = true, dataType = "Int", example = "100"),
- @ApiImplicitParam(name = "queue", value = "QUEUE", dataType = "String"),
- @ApiImplicitParam(name = "email", value = "EMAIL", required = true, dataType = "String"),
- @ApiImplicitParam(name = "phone", value = "PHONE", dataType = "String"),
- @ApiImplicitParam(name = "state", value = "STATE", dataType = "Int", example = "1")
+ @ApiImplicitParam(name = "userName", value = "USER_NAME", required = true, dataTypeClass = String.class),
+ @ApiImplicitParam(name = "userPassword", value = "USER_PASSWORD", required = true, dataTypeClass = String.class),
+ @ApiImplicitParam(name = "tenantId", value = "TENANT_ID", required = true, dataTypeClass = int.class, example = "100"),
+ @ApiImplicitParam(name = "queue", value = "QUEUE", dataTypeClass = String.class),
+ @ApiImplicitParam(name = "email", value = "EMAIL", required = true, dataTypeClass = String.class),
+ @ApiImplicitParam(name = "phone", value = "PHONE", dataTypeClass = String.class),
+ @ApiImplicitParam(name = "state", value = "STATE", dataTypeClass = int.class, example = "1")
})
@PostMapping(value = "/create")
@ResponseStatus(HttpStatus.CREATED)
@@ -112,7 +113,8 @@ public class UsersController extends BaseController {
@RequestParam(value = "email") String email,
@RequestParam(value = "phone", required = false) String phone,
@RequestParam(value = "state", required = false) int state) throws Exception {
- Map<String, Object> result = usersService.createUser(loginUser, userName, userPassword, email, tenantId, phone, queue, state);
+ Map<String, Object> result =
+ usersService.createUser(loginUser, userName, userPassword, email, tenantId, phone, queue, state);
return returnDataList(result);
}
@@ -127,9 +129,9 @@ public class UsersController extends BaseController {
*/
@ApiOperation(value = "queryUserList", notes = "QUERY_USER_LIST_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "pageNo", value = "PAGE_NO", required = true, dataType = "Int", example = "1"),
- @ApiImplicitParam(name = "pageSize", value = "PAGE_SIZE", required = true, dataType = "Int", example = "10"),
- @ApiImplicitParam(name = "searchVal", value = "SEARCH_VAL", type = "String")
+ @ApiImplicitParam(name = "pageNo", value = "PAGE_NO", required = true, dataTypeClass = int.class, example = "1"),
+ @ApiImplicitParam(name = "pageSize", value = "PAGE_SIZE", required = true, dataTypeClass = int.class, example = "10"),
+ @ApiImplicitParam(name = "searchVal", value = "SEARCH_VAL", dataTypeClass = String.class)
})
@GetMapping(value = "/list-paging")
@ResponseStatus(HttpStatus.OK)
@@ -149,7 +151,6 @@ public class UsersController extends BaseController {
return result;
}
-
/**
* update user
*
@@ -165,14 +166,14 @@ public class UsersController extends BaseController {
*/
@ApiOperation(value = "updateUser", notes = "UPDATE_USER_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "id", value = "USER_ID", required = true, dataType = "Int", example = "100"),
- @ApiImplicitParam(name = "userName", value = "USER_NAME", required = true, type = "String"),
- @ApiImplicitParam(name = "userPassword", value = "USER_PASSWORD", required = true, type = "String"),
- @ApiImplicitParam(name = "tenantId", value = "TENANT_ID", required = true, dataType = "Int", example = "100"),
- @ApiImplicitParam(name = "queue", value = "QUEUE", dataType = "String"),
- @ApiImplicitParam(name = "email", value = "EMAIL", required = true, dataType = "String"),
- @ApiImplicitParam(name = "phone", value = "PHONE", dataType = "String"),
- @ApiImplicitParam(name = "state", value = "STATE", dataType = "Int", example = "1")
+ @ApiImplicitParam(name = "id", value = "USER_ID", required = true, dataTypeClass = int.class, example = "100"),
+ @ApiImplicitParam(name = "userName", value = "USER_NAME", required = true, dataTypeClass = String.class),
+ @ApiImplicitParam(name = "userPassword", value = "USER_PASSWORD", required = true, dataTypeClass = String.class),
+ @ApiImplicitParam(name = "tenantId", value = "TENANT_ID", required = true, dataTypeClass = int.class, example = "100"),
+ @ApiImplicitParam(name = "queue", value = "QUEUE", dataTypeClass = String.class),
+ @ApiImplicitParam(name = "email", value = "EMAIL", required = true, dataTypeClass = String.class),
+ @ApiImplicitParam(name = "phone", value = "PHONE", dataTypeClass = String.class),
+ @ApiImplicitParam(name = "state", value = "STATE", dataTypeClass = int.class, example = "1")
})
@PostMapping(value = "/update")
@ResponseStatus(HttpStatus.OK)
@@ -188,7 +189,8 @@ public class UsersController extends BaseController {
@RequestParam(value = "phone", required = false) String phone,
@RequestParam(value = "state", required = false) int state,
@RequestParam(value = "timeZone", required = false) String timeZone) throws Exception {
- Map<String, Object> result = usersService.updateUser(loginUser, id, userName, userPassword, email, tenantId, phone, queue, state, timeZone);
+ Map<String, Object> result = usersService.updateUser(loginUser, id, userName, userPassword, email, tenantId,
+ phone, queue, state, timeZone);
return returnDataList(result);
}
@@ -201,7 +203,7 @@ public class UsersController extends BaseController {
*/
@ApiOperation(value = "delUserById", notes = "DELETE_USER_BY_ID_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "id", value = "USER_ID", required = true, dataType = "Int", example = "100")
+ @ApiImplicitParam(name = "id", value = "USER_ID", required = true, dataTypeClass = int.class, example = "100")
})
@PostMapping(value = "/delete")
@ResponseStatus(HttpStatus.OK)
@@ -223,8 +225,8 @@ public class UsersController extends BaseController {
*/
@ApiOperation(value = "grantProject", notes = "GRANT_PROJECT_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "userId", value = "USER_ID", required = true, dataType = "Int", example = "100"),
- @ApiImplicitParam(name = "projectIds", value = "PROJECT_IDS", required = true, type = "String")
+ @ApiImplicitParam(name = "userId", value = "USER_ID", required = true, dataTypeClass = int.class, example = "100"),
+ @ApiImplicitParam(name = "projectIds", value = "PROJECT_IDS", required = true, dataTypeClass = String.class)
})
@PostMapping(value = "/grant-project")
@ResponseStatus(HttpStatus.OK)
@@ -247,16 +249,16 @@ public class UsersController extends BaseController {
*/
@ApiOperation(value = "grantProjectByCode", notes = "GRANT_PROJECT_BY_CODE_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "userId", value = "USER_ID", required = true, dataType = "Int", example = "100"),
- @ApiImplicitParam(name = "projectCode", value = "PROJECT_CODE", required = true, type = "Long")
+ @ApiImplicitParam(name = "userId", value = "USER_ID", required = true, dataTypeClass = int.class, example = "100"),
+ @ApiImplicitParam(name = "projectCode", value = "PROJECT_CODE", required = true, dataTypeClass = long.class)
})
@PostMapping(value = "/grant-project-by-code")
@ResponseStatus(HttpStatus.OK)
@ApiException(GRANT_PROJECT_ERROR)
@AccessLogAnnotation
public Result grantProjectByCode(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
- @RequestParam(value = "userId") int userId,
- @RequestParam(value = "projectCode") long projectCode) {
+ @RequestParam(value = "userId") int userId,
+ @RequestParam(value = "projectCode") long projectCode) {
Map<String, Object> result = this.usersService.grantProjectByCode(loginUser, userId, projectCode);
return this.returnDataList(result);
}
@@ -271,16 +273,16 @@ public class UsersController extends BaseController {
*/
@ApiOperation(value = "revokeProject", notes = "REVOKE_PROJECT_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "userId", value = "USER_ID", required = true, dataType = "Int", example = "100"),
- @ApiImplicitParam(name = "projectCode", value = "PROJECT_CODE", required = true, type = "Long", example = "100")
+ @ApiImplicitParam(name = "userId", value = "USER_ID", required = true, dataTypeClass = int.class, example = "100"),
+ @ApiImplicitParam(name = "projectCode", value = "PROJECT_CODE", required = true, dataTypeClass = long.class, example = "100")
})
@PostMapping(value = "/revoke-project")
@ResponseStatus(HttpStatus.OK)
@ApiException(REVOKE_PROJECT_ERROR)
@AccessLogAnnotation
public Result revokeProject(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
- @RequestParam(value = "userId") int userId,
- @RequestParam(value = "projectCode") long projectCode) {
+ @RequestParam(value = "userId") int userId,
+ @RequestParam(value = "projectCode") long projectCode) {
Map<String, Object> result = this.usersService.revokeProject(loginUser, userId, projectCode);
return returnDataList(result);
}
@@ -295,8 +297,8 @@ public class UsersController extends BaseController {
*/
@ApiOperation(value = "grantResource", notes = "GRANT_RESOURCE_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "userId", value = "USER_ID", required = true, dataType = "Int", example = "100"),
- @ApiImplicitParam(name = "resourceIds", value = "RESOURCE_IDS", required = true, type = "String")
+ @ApiImplicitParam(name = "userId", value = "USER_ID", required = true, dataTypeClass = int.class, example = "100"),
+ @ApiImplicitParam(name = "resourceIds", value = "RESOURCE_IDS", required = true, dataTypeClass = String.class)
})
@PostMapping(value = "/grant-file")
@ResponseStatus(HttpStatus.OK)
@@ -309,7 +311,6 @@ public class UsersController extends BaseController {
return returnDataList(result);
}
-
/**
* grant udf function
*
@@ -320,8 +321,8 @@ public class UsersController extends BaseController {
*/
@ApiOperation(value = "grantUDFFunc", notes = "GRANT_UDF_FUNC_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "userId", value = "USER_ID", required = true, dataType = "Int", example = "100"),
- @ApiImplicitParam(name = "udfIds", value = "UDF_IDS", required = true, type = "String")
+ @ApiImplicitParam(name = "userId", value = "USER_ID", required = true, dataTypeClass = int.class, example = "100"),
+ @ApiImplicitParam(name = "udfIds", value = "UDF_IDS", required = true, dataTypeClass = String.class)
})
@PostMapping(value = "/grant-udf-func")
@ResponseStatus(HttpStatus.OK)
@@ -334,7 +335,6 @@ public class UsersController extends BaseController {
return returnDataList(result);
}
-
/**
* grant namespace
*
@@ -345,8 +345,8 @@ public class UsersController extends BaseController {
*/
@ApiOperation(value = "grantNamespace", notes = "GRANT_NAMESPACE_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "userId", value = "USER_ID", required = true, dataType = "Int", example = "100"),
- @ApiImplicitParam(name = "namespaceIds", value = "NAMESPACE_IDS", required = true, type = "String")
+ @ApiImplicitParam(name = "userId", value = "USER_ID", required = true, dataTypeClass = int.class, example = "100"),
+ @ApiImplicitParam(name = "namespaceIds", value = "NAMESPACE_IDS", required = true, dataTypeClass = String.class)
})
@PostMapping(value = "/grant-namespace")
@ResponseStatus(HttpStatus.OK)
@@ -359,7 +359,6 @@ public class UsersController extends BaseController {
return returnDataList(result);
}
-
/**
* grant datasource
*
@@ -370,8 +369,8 @@ public class UsersController extends BaseController {
*/
@ApiOperation(value = "grantDataSource", notes = "GRANT_DATASOURCE_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "userId", value = "USER_ID", required = true, dataType = "Int", example = "100"),
- @ApiImplicitParam(name = "datasourceIds", value = "DATASOURCE_IDS", required = true, type = "String")
+ @ApiImplicitParam(name = "userId", value = "USER_ID", required = true, dataTypeClass = int.class, example = "100"),
+ @ApiImplicitParam(name = "datasourceIds", value = "DATASOURCE_IDS", required = true, dataTypeClass = String.class)
})
@PostMapping(value = "/grant-datasource")
@ResponseStatus(HttpStatus.OK)
@@ -384,7 +383,6 @@ public class UsersController extends BaseController {
return returnDataList(result);
}
-
/**
* get user info
*
@@ -417,7 +415,6 @@ public class UsersController extends BaseController {
return returnDataList(result);
}
-
/**
* user list no paging
*
@@ -433,7 +430,6 @@ public class UsersController extends BaseController {
return returnDataList(result);
}
-
/**
* verify username
*
@@ -443,19 +439,17 @@ public class UsersController extends BaseController {
*/
@ApiOperation(value = "verifyUserName", notes = "VERIFY_USER_NAME_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "userName", value = "USER_NAME", required = true, type = "String")
+ @ApiImplicitParam(name = "userName", value = "USER_NAME", required = true, dataTypeClass = String.class)
})
@GetMapping(value = "/verify-user-name")
@ResponseStatus(HttpStatus.OK)
@ApiException(VERIFY_USERNAME_ERROR)
@AccessLogAnnotation
public Result verifyUserName(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
- @RequestParam(value = "userName") String userName
- ) {
+ @RequestParam(value = "userName") String userName) {
return usersService.verifyUserName(userName);
}
-
/**
* unauthorized user
*
@@ -465,7 +459,7 @@ public class UsersController extends BaseController {
*/
@ApiOperation(value = "unauthorizedUser", notes = "UNAUTHORIZED_USER_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "alertgroupId", value = "ALERT_GROUP_ID", required = true, type = "String")
+ @ApiImplicitParam(name = "alertgroupId", value = "ALERT_GROUP_ID", required = true, dataTypeClass = String.class)
})
@GetMapping(value = "/unauth-user")
@ResponseStatus(HttpStatus.OK)
@@ -477,7 +471,6 @@ public class UsersController extends BaseController {
return returnDataList(result);
}
-
/**
* authorized user
*
@@ -487,7 +480,7 @@ public class UsersController extends BaseController {
*/
@ApiOperation(value = "authorizedUser", notes = "AUTHORIZED_USER_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "alertgroupId", value = "ALERT_GROUP_ID", required = true, type = "String")
+ @ApiImplicitParam(name = "alertgroupId", value = "ALERT_GROUP_ID", required = true, dataTypeClass = String.class)
})
@GetMapping(value = "/authed-user")
@ResponseStatus(HttpStatus.OK)
@@ -514,10 +507,10 @@ public class UsersController extends BaseController {
*/
@ApiOperation(value = "registerUser", notes = "REGISTER_USER_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "userName", value = "USER_NAME", required = true, type = "String"),
- @ApiImplicitParam(name = "userPassword", value = "USER_PASSWORD", required = true, type = "String"),
- @ApiImplicitParam(name = "repeatPassword", value = "REPEAT_PASSWORD", required = true, type = "String"),
- @ApiImplicitParam(name = "email", value = "EMAIL", required = true, type = "String"),
+ @ApiImplicitParam(name = "userName", value = "USER_NAME", required = true, dataTypeClass = String.class),
+ @ApiImplicitParam(name = "userPassword", value = "USER_PASSWORD", required = true, dataTypeClass = String.class),
+ @ApiImplicitParam(name = "repeatPassword", value = "REPEAT_PASSWORD", required = true, dataTypeClass = String.class),
+ @ApiImplicitParam(name = "email", value = "EMAIL", required = true, dataTypeClass = String.class),
})
@PostMapping("/register")
@ResponseStatus(HttpStatus.OK)
@@ -542,7 +535,7 @@ public class UsersController extends BaseController {
*/
@ApiOperation(value = "activateUser", notes = "ACTIVATE_USER_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "userName", value = "USER_NAME", type = "String"),
+ @ApiImplicitParam(name = "userName", value = "USER_NAME", dataTypeClass = String.class),
})
@PostMapping("/activate")
@ResponseStatus(HttpStatus.OK)
@@ -562,7 +555,7 @@ public class UsersController extends BaseController {
*/
@ApiOperation(value = "batchActivateUser", notes = "BATCH_ACTIVATE_USER_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "userNames", value = "USER_NAMES", required = true, type = "String"),
+ @ApiImplicitParam(name = "userNames", value = "USER_NAMES", required = true, dataTypeClass = List.class),
})
@PostMapping("/batch/activate")
@ResponseStatus(HttpStatus.OK)
@@ -570,7 +563,8 @@ public class UsersController extends BaseController {
@AccessLogAnnotation
public Result<Object> batchActivateUser(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@RequestBody List<String> userNames) {
- List<String> formatUserNames = userNames.stream().map(ParameterUtils::handleEscapes).collect(Collectors.toList());
+ List<String> formatUserNames =
+ userNames.stream().map(ParameterUtils::handleEscapes).collect(Collectors.toList());
Map<String, Object> result = usersService.batchActivateUser(loginUser, formatUserNames);
return returnDataList(result);
}
diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/WorkFlowLineageController.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/WorkFlowLineageController.java
index 8319acc2ad..b92d25d4aa 100644
--- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/WorkFlowLineageController.java
+++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/WorkFlowLineageController.java
@@ -32,6 +32,8 @@ import org.apache.dolphinscheduler.common.utils.ParameterUtils;
import org.apache.dolphinscheduler.dao.entity.User;
import org.apache.dolphinscheduler.dao.entity.WorkFlowLineage;
+import springfox.documentation.annotations.ApiIgnore;
+
import java.util.List;
import java.util.Map;
import java.util.Optional;
@@ -54,7 +56,6 @@ import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
-import springfox.documentation.annotations.ApiIgnore;
/**
* work flow lineage controller
@@ -63,6 +64,7 @@ import springfox.documentation.annotations.ApiIgnore;
@RestController
@RequestMapping("projects/{projectCode}/lineages")
public class WorkFlowLineageController extends BaseController {
+
private static final Logger logger = LoggerFactory.getLogger(WorkFlowLineageController.class);
@Autowired
@@ -90,8 +92,8 @@ public class WorkFlowLineageController extends BaseController {
@ResponseStatus(HttpStatus.OK)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
public Result<Map<String, Object>> queryWorkFlowLineageByCode(@ApiIgnore @RequestAttribute(value = SESSION_USER) User loginUser,
- @ApiParam(name = "projectCode", value = "PROJECT_CODE", required = true) @PathVariable long projectCode,
- @PathVariable(value = "workFlowCode", required = true) long workFlowCode) {
+ @ApiParam(name = "projectCode", value = "PROJECT_CODE", required = true) @PathVariable long projectCode,
+ @PathVariable(value = "workFlowCode", required = true) long workFlowCode) {
try {
Map<String, Object> result = workFlowLineageService.queryWorkFlowLineageByCode(projectCode, workFlowCode);
return returnDataList(result);
@@ -106,7 +108,7 @@ public class WorkFlowLineageController extends BaseController {
@ResponseStatus(HttpStatus.OK)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
public Result<Map<String, Object>> queryWorkFlowLineage(@ApiIgnore @RequestAttribute(value = SESSION_USER) User loginUser,
- @ApiParam(name = "projectCode", value = "PROJECT_CODE", required = true) @PathVariable long projectCode) {
+ @ApiParam(name = "projectCode", value = "PROJECT_CODE", required = true) @PathVariable long projectCode) {
try {
Map<String, Object> result = workFlowLineageService.queryWorkFlowLineage(projectCode);
return returnDataList(result);
@@ -127,9 +129,9 @@ public class WorkFlowLineageController extends BaseController {
*/
@ApiOperation(value = "verifyTaskCanDelete", notes = "VERIFY_TASK_CAN_DELETE")
@ApiImplicitParams({
- @ApiImplicitParam(name = "projectCode", value = "PROCESS_DEFINITION_NAME", required = true, type = "Long"),
- @ApiImplicitParam(name = "processDefinitionCode", value = "PROCESS_DEFINITION_CODE", required = true, type = "processDefinitionCode"),
- @ApiImplicitParam(name = "taskCode", value = "TASK_DEFINITION_CODE", required = true, dataType = "Long", example = "123456789"),
+ @ApiImplicitParam(name = "projectCode", value = "PROCESS_DEFINITION_NAME", required = true, dataTypeClass = long.class),
+ @ApiImplicitParam(name = "processDefinitionCode", value = "PROCESS_DEFINITION_CODE", required = true, dataTypeClass = long.class),
+ @ApiImplicitParam(name = "taskCode", value = "TASK_DEFINITION_CODE", required = true, dataTypeClass = long.class, example = "123456789"),
})
@PostMapping(value = "/tasks/verify-delete")
@ResponseStatus(HttpStatus.OK)
@@ -140,7 +142,8 @@ public class WorkFlowLineageController extends BaseController {
@RequestParam(value = "processDefinitionCode", required = true) long processDefinitionCode,
@RequestParam(value = "taskCode", required = true) long taskCode) {
Result result = new Result();
- Optional<String> taskDepMsg = workFlowLineageService.taskDepOnTaskMsg(projectCode, processDefinitionCode, taskCode);
+ Optional<String> taskDepMsg =
+ workFlowLineageService.taskDepOnTaskMsg(projectCode, processDefinitionCode, taskCode);
if (taskDepMsg.isPresent()) {
throw new ServiceException(taskDepMsg.get());
}
diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/WorkerGroupController.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/WorkerGroupController.java
index 71a678f4e9..ccb196eb6a 100644
--- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/WorkerGroupController.java
+++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/WorkerGroupController.java
@@ -30,6 +30,8 @@ import org.apache.dolphinscheduler.common.Constants;
import org.apache.dolphinscheduler.common.utils.ParameterUtils;
import org.apache.dolphinscheduler.dao.entity.User;
+import springfox.documentation.annotations.ApiIgnore;
+
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
@@ -48,7 +50,6 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
-import springfox.documentation.annotations.ApiIgnore;
/**
* worker group controller
@@ -72,9 +73,9 @@ public class WorkerGroupController extends BaseController {
*/
@ApiOperation(value = "saveWorkerGroup", notes = "CREATE_WORKER_GROUP_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "id", value = "WORKER_GROUP_ID", dataType = "Int", example = "10", defaultValue = "0"),
- @ApiImplicitParam(name = "name", value = "WORKER_GROUP_NAME", required = true, dataType = "String"),
- @ApiImplicitParam(name = "addrList", value = "WORKER_ADDR_LIST", required = true, dataType = "String")
+ @ApiImplicitParam(name = "id", value = "WORKER_GROUP_ID", dataTypeClass = int.class, example = "10", defaultValue = "0"),
+ @ApiImplicitParam(name = "name", value = "WORKER_GROUP_NAME", required = true, dataTypeClass = String.class),
+ @ApiImplicitParam(name = "addrList", value = "WORKER_ADDR_LIST", required = true, dataTypeClass = String.class)
})
@PostMapping()
@ResponseStatus(HttpStatus.OK)
@@ -83,8 +84,7 @@ public class WorkerGroupController extends BaseController {
public Result saveWorkerGroup(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@RequestParam(value = "id", required = false, defaultValue = "0") int id,
@RequestParam(value = "name") String name,
- @RequestParam(value = "addrList") String addrList
- ) {
+ @RequestParam(value = "addrList") String addrList) {
Map<String, Object> result = workerGroupService.saveWorkerGroup(loginUser, id, name, addrList);
return returnDataList(result);
}
@@ -100,9 +100,9 @@ public class WorkerGroupController extends BaseController {
*/
@ApiOperation(value = "queryAllWorkerGroupsPaging", notes = "QUERY_WORKER_GROUP_PAGING_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "pageNo", value = "PAGE_NO", required = true, dataType = "Int", example = "1"),
- @ApiImplicitParam(name = "pageSize", value = "PAGE_SIZE", required = true, dataType = "Int", example = "20"),
- @ApiImplicitParam(name = "searchVal", value = "SEARCH_VAL", dataType = "String")
+ @ApiImplicitParam(name = "pageNo", value = "PAGE_NO", required = true, dataTypeClass = int.class, example = "1"),
+ @ApiImplicitParam(name = "pageSize", value = "PAGE_SIZE", required = true, dataTypeClass = int.class, example = "20"),
+ @ApiImplicitParam(name = "searchVal", value = "SEARCH_VAL", dataTypeClass = String.class)
})
@GetMapping()
@ResponseStatus(HttpStatus.OK)
@@ -111,8 +111,7 @@ public class WorkerGroupController extends BaseController {
public Result queryAllWorkerGroupsPaging(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@RequestParam("pageNo") Integer pageNo,
@RequestParam("pageSize") Integer pageSize,
- @RequestParam(value = "searchVal", required = false) String searchVal
- ) {
+ @RequestParam(value = "searchVal", required = false) String searchVal) {
Result result = checkPageParams(pageNo, pageSize);
if (!result.checkResult()) {
return result;
@@ -148,15 +147,14 @@ public class WorkerGroupController extends BaseController {
*/
@ApiOperation(value = "deleteWorkerGroupById", notes = "DELETE_WORKER_GROUP_BY_ID_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "id", value = "WORKER_GROUP_ID", required = true, dataType = "Int", example = "10"),
+ @ApiImplicitParam(name = "id", value = "WORKER_GROUP_ID", required = true, dataTypeClass = int.class, example = "10"),
})
@DeleteMapping(value = "/{id}")
@ResponseStatus(HttpStatus.OK)
@ApiException(DELETE_WORKER_GROUP_FAIL)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
public Result deleteWorkerGroupById(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
- @PathVariable("id") Integer id
- ) {
+ @PathVariable("id") Integer id) {
Map<String, Object> result = workerGroupService.deleteWorkerGroupById(loginUser, id);
return returnDataList(result);
}
diff --git a/dolphinscheduler-api/src/main/resources/application.yaml b/dolphinscheduler-api/src/main/resources/application.yaml
index 23db3389f1..62342b004b 100644
--- a/dolphinscheduler-api/src/main/resources/application.yaml
+++ b/dolphinscheduler-api/src/main/resources/application.yaml
@@ -78,6 +78,9 @@ spring:
org.quartz.scheduler.makeSchedulerThreadDaemon: true
org.quartz.jobStore.driverDelegateClass: org.quartz.impl.jdbcjobstore.PostgreSQLDelegate
org.quartz.jobStore.clusterCheckinInterval: 5000
+ mvc:
+ pathmatch:
+ matching-strategy: ANT_PATH_MATCHER
management:
endpoints:
diff --git a/dolphinscheduler-bom/pom.xml b/dolphinscheduler-bom/pom.xml
index 8603c3b116..5d609106f1 100644
--- a/dolphinscheduler-bom/pom.xml
+++ b/dolphinscheduler-bom/pom.xml
@@ -29,7 +29,7 @@
<properties>
<netty.version>4.1.53.Final</netty.version>
- <spring-boot.version>2.5.6</spring-boot.version>
+ <spring-boot.version>2.7.3</spring-boot.version>
<spring.version>5.3.19</spring.version>
<java-websocket.version>1.5.1</java-websocket.version>
<mybatis-plus.version>3.2.0</mybatis-plus.version>
@@ -57,8 +57,7 @@
<h2.version>1.4.200</h2.version>
<mysql-connector.version>8.0.16</mysql-connector.version>
<oracle-jdbc.version>21.5.0.0</oracle-jdbc.version>
- <slf4j-api.version>1.7.5</slf4j-api.version>
- <slf4j-log4j12.version>1.7.5</slf4j-log4j12.version>
+ <slf4j.version>1.7.36</slf4j.version>
<poi.version>4.1.2</poi.version>
<javax.servlet-api.version>3.1.0</javax.servlet-api.version>
<activation.version>1.1</activation.version>
@@ -72,9 +71,7 @@
<mssql-jdbc.version>6.1.0.jre8</mssql-jdbc.version>
<presto-jdbc.version>0.238.1</presto-jdbc.version>
<servlet-api.version>2.5</servlet-api.version>
- <swagger.version>1.9.3</swagger.version>
- <springfox.version>2.9.2</springfox.version>
- <swagger-models.version>1.5.24</swagger-models.version>
+ <springfox.version>3.0.0</springfox.version>
<guava-retry.version>2.0.0</guava-retry.version>
<reflections.version>0.9.12</reflections.version>
<py4j.version>0.10.9</py4j.version>
@@ -87,7 +84,7 @@
<joda-time.version>2.10.13</joda-time.version>
<okhttp.version>3.14.9</okhttp.version>
<json-path.version>2.7.0</json-path.version>
- <spring-cloud-dependencies.version>2020.0.6</spring-cloud-dependencies.version>
+ <spring-cloud-dependencies.version>2021.0.3</spring-cloud-dependencies.version>
</properties>
<dependencyManagement>
@@ -355,12 +352,12 @@
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
- <version>${slf4j-api.version}</version>
+ <version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
- <version>${slf4j-log4j12.version}</version>
+ <version>${slf4j.version}</version>
</dependency>
<!-- logback -->
<dependency>
@@ -507,28 +504,10 @@
</dependency>
<dependency>
<groupId>io.springfox</groupId>
- <artifactId>springfox-swagger2</artifactId>
+ <artifactId>springfox-boot-starter</artifactId>
<version>${springfox.version}</version>
</dependency>
- <dependency>
- <groupId>io.springfox</groupId>
- <artifactId>springfox-swagger-ui</artifactId>
- <version>${springfox.version}</version>
- </dependency>
-
- <dependency>
- <groupId>io.swagger</groupId>
- <artifactId>swagger-models</artifactId>
- <version>${swagger-models.version}</version>
- </dependency>
-
- <dependency>
- <groupId>com.github.xiaoymin</groupId>
- <artifactId>swagger-bootstrap-ui</artifactId>
- <version>${swagger.version}</version>
- </dependency>
-
<dependency>
<groupId>com.github.rholder</groupId>
<artifactId>guava-retrying</artifactId>
diff --git a/dolphinscheduler-dist/release-docs/LICENSE b/dolphinscheduler-dist/release-docs/LICENSE
index 42e201d82c..52c7758455 100644
--- a/dolphinscheduler-dist/release-docs/LICENSE
+++ b/dolphinscheduler-dist/release-docs/LICENSE
@@ -215,17 +215,17 @@ Apache 2.0 licenses
The following components are provided under the Apache License. See project link for details.
The text of each license is also included at licenses/LICENSE-[project].txt.
- accessors-smart 2.4.7: https://github.com/netplex/json-smart-v2, Apache 2.0
+ accessors-smart 2.4.8: https://github.com/netplex/json-smart-v2, Apache 2.0
apacheds-i18n 2.0.0-M15: https://mvnrepository.com/artifact/org.apache.directory.server/apacheds-i18n/2.0.0-M15, Apache 2.0
apacheds-kerberos-codec 2.0.0-M15: https://mvnrepository.com/artifact/org.apache.directory.server/apacheds-kerberos-codec/2.0.0-M15, Apache 2.0
- tomcat-embed-el 9.0.55: https://mvnrepository.com/artifact/org.apache.tomcat.embed/tomcat-embed-el/9.0.55, Apache 2.0
+ tomcat-embed-el 9.0.65: https://mvnrepository.com/artifact/org.apache.tomcat.embed/tomcat-embed-el/9.0.65, Apache 2.0
api-asn1-api 1.0.0-M20: https://mvnrepository.com/artifact/org.apache.directory.api/api-asn1-api/1.0.0-M20, Apache 2.0
api-util 1.0.0-M20: https://mvnrepository.com/artifact/org.apache.directory.api/api-util/1.0.0-M20, Apache 2.0
audience-annotations 0.5.0: https://mvnrepository.com/artifact/org.apache.yetus/audience-annotations/0.5.0, Apache 2.0
avro 1.7.4: https://github.com/apache/avro, Apache 2.0
bonecp 0.8.0.RELEASE: https://github.com/wwadge/bonecp, Apache 2.0
byte-buddy 1.9.16: https://mvnrepository.com/artifact/net.bytebuddy/byte-buddy/1.9.16, Apache 2.0
- caffeine 2.9.2: https://mvnrepository.com/artifact/com.github.ben-manes.caffeine/caffeine/2.9.2, Apache 2.0
+ caffeine 2.9.3: https://mvnrepository.com/artifact/com.github.ben-manes.caffeine/caffeine/2.9.3, Apache 2.0
classmate 1.5.1: https://mvnrepository.com/artifact/com.fasterxml/classmate/1.5.1, Apache 2.0
clickhouse-jdbc 0.1.52: https://mvnrepository.com/artifact/ru.yandex.clickhouse/clickhouse-jdbc/0.1.52, Apache 2.0
commons-beanutils 1.9.4 https://mvnrepository.com/artifact/commons-beanutils/commons-beanutils/1.9.4, Apache 2.0
@@ -255,7 +255,7 @@ The text of each license is also included at licenses/LICENSE-[project].txt.
derby 10.14.2.0: https://github.com/apache/derby, Apache 2.0
druid 1.1.14: https://mvnrepository.com/artifact/com.alibaba/druid/1.1.14, Apache 2.0
error_prone_annotations 2.1.3 https://mvnrepository.com/artifact/com.google.errorprone/error_prone_annotations/2.1.3, Apache 2.0
- gson 2.8.8: https://github.com/google/gson, Apache 2.0
+ gson 2.9.1: https://github.com/google/gson, Apache 2.0
guava 24.1-jre: https://mvnrepository.com/artifact/com.google.guava/guava/24.1-jre, Apache 2.0
guava-retrying 2.0.0: https://mvnrepository.com/artifact/com.github.rholder/guava-retrying/2.0.0, Apache 2.0
hadoop-annotations 2.7.3:https://mvnrepository.com/artifact/org.apache.hadoop/hadoop-annotations/2.7.3, Apache 2.0
@@ -298,24 +298,24 @@ The text of each license is also included at licenses/LICENSE-[project].txt.
jets3t 0.9.0: https://mvnrepository.com/artifact/net.java.dev.jets3t/jets3t/0.9.0, Apache 2.0
jettison 1.1: https://github.com/jettison-json/jettison, Apache 2.0
jetty 6.1.26: https://mvnrepository.com/artifact/org.mortbay.jetty/jetty/6.1.26, Apache 2.0 and EPL 1.0
- jetty-continuation 9.4.44.v20210927: https://mvnrepository.com/artifact/org.eclipse.jetty/jetty-continuation/9.4.44.v20210927, Apache 2.0 and EPL 1.0
- jetty-http 9.4.44.v20210927: https://mvnrepository.com/artifact/org.eclipse.jetty/jetty-http/9.4.44.v20210927, Apache 2.0 and EPL 1.0
- jetty-io 9.4.44.v20210927: https://mvnrepository.com/artifact/org.eclipse.jetty/jetty-io/9.4.44.v20210927, Apache 2.0 and EPL 1.0
- jetty-security 9.4.44.v20210927: https://mvnrepository.com/artifact/org.eclipse.jetty/jetty-security/9.4.44.v20210927, Apache 2.0 and EPL 1.0
- jetty-server 9.4.44.v20210927: https://mvnrepository.com/artifact/org.eclipse.jetty/jetty-server/9.4.44.v20210927, Apache 2.0 and EPL 1.0
- jetty-servlet 9.4.44.v20210927: https://mvnrepository.com/artifact/org.eclipse.jetty/jetty-servlet/9.4.44.v20210927, Apache 2.0 and EPL 1.0
- jetty-servlets 9.4.44.v20210927: https://mvnrepository.com/artifact/org.eclipse.jetty/jetty-servlets/9.4.44.v20210927, Apache 2.0 and EPL 1.0
+ jetty-continuation 9.4.48.v20220622: https://mvnrepository.com/artifact/org.eclipse.jetty/jetty-continuation/9.4.48.v20220622, Apache 2.0 and EPL 1.0
+ jetty-http 9.4.48.v20220622: https://mvnrepository.com/artifact/org.eclipse.jetty/jetty-http/9.4.48.v20220622, Apache 2.0 and EPL 1.0
+ jetty-io 9.4.48.v20220622: https://mvnrepository.com/artifact/org.eclipse.jetty/jetty-io/9.4.48.v20220622, Apache 2.0 and EPL 1.0
+ jetty-security 9.4.48.v20220622: https://mvnrepository.com/artifact/org.eclipse.jetty/jetty-security/9.4.48.v20220622, Apache 2.0 and EPL 1.0
+ jetty-server 9.4.48.v20220622: https://mvnrepository.com/artifact/org.eclipse.jetty/jetty-server/9.4.48.v20220622, Apache 2.0 and EPL 1.0
+ jetty-servlet 9.4.48.v20220622: https://mvnrepository.com/artifact/org.eclipse.jetty/jetty-servlet/9.4.48.v20220622, Apache 2.0 and EPL 1.0
+ jetty-servlets 9.4.48.v20220622: https://mvnrepository.com/artifact/org.eclipse.jetty/jetty-servlets/9.4.48.v20220622, Apache 2.0 and EPL 1.0
jetty-util 6.1.26: https://mvnrepository.com/artifact/org.mortbay.jetty/jetty-util/6.1.26, Apache 2.0 and EPL 1.0
- jetty-util 9.4.44.v20210927: https://mvnrepository.com/artifact/org.eclipse.jetty/jetty-util/9.4.44.v20210927, Apache 2.0 and EPL 1.0
- jetty-util-ajax 9.4.44.v20210927: https://mvnrepository.com/artifact/org.eclipse.jetty/jetty-util-ajax/9.4.44.v20210927, Apache 2.0 and EPL 1.0
- jetty-webapp 9.4.44.v20210927: https://mvnrepository.com/artifact/org.eclipse.jetty/jetty-webapp/9.4.44.v20210927, Apache 2.0 and EPL 1.0
- jetty-xml 9.4.44.v20210927: https://mvnrepository.com/artifact/org.eclipse.jetty/jetty-xml/9.4.44.v20210927, Apache 2.0 and EPL 1.0
+ jetty-util 9.4.48.v20220622: https://mvnrepository.com/artifact/org.eclipse.jetty/jetty-util/9.4.48.v20220622, Apache 2.0 and EPL 1.0
+ jetty-util-ajax 9.4.48.v20220622: https://mvnrepository.com/artifact/org.eclipse.jetty/jetty-util-ajax/9.4.48.v20220622, Apache 2.0 and EPL 1.0
+ jetty-webapp 9.4.48.v20220622: https://mvnrepository.com/artifact/org.eclipse.jetty/jetty-webapp/9.4.48.v20220622, Apache 2.0 and EPL 1.0
+ jetty-xml 9.4.48.v20220622: https://mvnrepository.com/artifact/org.eclipse.jetty/jetty-xml/9.4.48.v20220622, Apache 2.0 and EPL 1.0
jna 5.10.0: https://mvnrepository.com/artifact/net.java.dev.jna/jna/5.10.0, Apache 2.0 and LGPL 2.1
jna-platform 5.10.0: https://mvnrepository.com/artifact/net.java.dev.jna/jna-platform/5.10.0, Apache 2.0 and LGPL 2.1
joda-time 2.10.13: https://github.com/JodaOrg/joda-time, Apache 2.0
jpam 1.1: https://mvnrepository.com/artifact/net.sf.jpam/jpam/1.1, Apache 2.0
json-path 2.7.0: https://github.com/json-path/JsonPath, Apache 2.0
- json-smart 2.4.7: https://github.com/netplex/json-smart-v2, Apache 2.0
+ json-smart 2.4.8: https://github.com/netplex/json-smart-v2, Apache 2.0
jsqlparser 2.1: https://github.com/JSQLParser/JSqlParser, Apache 2.0 or LGPL 2.1
jsr305 3.0.0: https://mvnrepository.com/artifact/com.google.code.findbugs/jsr305, Apache 2.0
j2objc-annotations 1.1 https://mvnrepository.com/artifact/com.google.j2objc/j2objc-annotations/1.1, Apache 2.0
@@ -324,9 +324,9 @@ The text of each license is also included at licenses/LICENSE-[project].txt.
log4j-api 2.11.2: https://mvnrepository.com/artifact/org.apache.logging.log4j/log4j-api/2.11.2, Apache 2.0
log4j-core-2.11.2: https://mvnrepository.com/artifact/org.apache.logging.log4j/log4j-core/2.11.2, Apache 2.0
log4j 1.2.17: https://mvnrepository.com/artifact/log4j/log4j/1.2.17, Apache 2.0
- log4j-1.2-api 2.14.1: https://mvnrepository.com/artifact/org.apache.logging.log4j/log4j-1.2-api/2.14.1, Apache 2.0
+ log4j-1.2-api 2.17.2: https://mvnrepository.com/artifact/org.apache.logging.log4j/log4j-1.2-api/2.17.2, Apache 2.0
lz4 1.3.0: https://mvnrepository.com/artifact/net.jpountz.lz4/lz4/1.3.0, Apache 2.0
- mapstruct 1.2.0.Final: https://github.com/mapstruct/mapstruct, Apache 2.0
+ mapstruct 1.3.1.Final: https://github.com/mapstruct/mapstruct, Apache 2.0
mybatis 3.5.2 https://mvnrepository.com/artifact/org.mybatis/mybatis/3.5.2, Apache 2.0
mybatis-plus 3.2.0: https://github.com/baomidou/mybatis-plus, Apache 2.0
mybatis-plus-annotation 3.2.0: https://mvnrepository.com/artifact/com.baomidou/mybatis-plus-annotation/3.2.0, Apache 2.0
@@ -342,50 +342,49 @@ The text of each license is also included at licenses/LICENSE-[project].txt.
poi-ooxml 4.1.2: https://mvnrepository.com/artifact/org.apache.poi/poi-ooxml/4.1.2, Apache 2.0
poi-ooxml-schemas-4.1.2: https://mvnrepository.com/artifact/org.apache.poi/poi-ooxml-schemas/4.1.2, Apache 2.0
quartz 2.3.2: https://mvnrepository.com/artifact/org.quartz-scheduler/quartz/2.3.2, Apache 2.0
- snakeyaml 1.28: https://mvnrepository.com/artifact/org.yaml/snakeyaml/1.28, Apache 2.0
+ snakeyaml 1.30: https://mvnrepository.com/artifact/org.yaml/snakeyaml/1.30, Apache 2.0
snappy 0.2: https://mvnrepository.com/artifact/org.iq80.snappy/snappy/0.2, Apache 2.0
snappy-java 1.0.4.1: https://github.com/xerial/snappy-java, Apache 2.0
SparseBitSet 1.2: https://mvnrepository.com/artifact/com.zaxxer/SparseBitSet/1.2, Apache 2.0
spring-aop 5.3.13: https://mvnrepository.com/artifact/org.springframework/spring-aop/5.3.13, Apache 2.0
spring-beans 5.3.19: https://mvnrepository.com/artifact/org.springframework/spring-beans/5.3.19, Apache 2.0
- spring-boot 2.6.1: https://mvnrepository.com/artifact/org.springframework.boot/spring-boot/2.6.1, Apache 2.0
- spring-boot-actuator 2.6.1: https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-actuator/2.6.1, Apache 2.0
- spring-boot-actuator-autoconfigure 2.6.1: https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-actuator-autoconfigure/2.6.1, Apache 2.0
- spring-boot-configuration-processor 2.6.1: https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-configuration-processor/2.6.1, Apache 2.0
- spring-boot-autoconfigure 2.6.1: https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-autoconfigure/2.6.1, Apache 2.0
- spring-boot-starter 2.6.1: https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter/2.6.1, Apache 2.0
- spring-boot-starter-actuator 2.6.1: https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-actuator/2.6.1, Apache 2.0
- spring-boot-starter-aop 2.6.1: https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-aop/2.6.1, Apache 2.0
- spring-boot-starter-jdbc 2.6.1: https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-jdbc/2.6.1, Apache 2.0
- spring-boot-starter-jetty 2.6.1: https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-jetty/2.6.1, Apache 2.0
- spring-boot-starter-json 2.6.1: https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-json/2.6.1, Apache 2.0
- spring-boot-starter-logging 2.6.1: https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-logging/2.6.1, Apache 2.0
- spring-boot-starter-quartz 2.6.1: https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-quartz/2.6.1, Apache 2.0
- spring-boot-starter-web 2.6.1: https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-web/2.6.1, Apache 2.0
- spring-boot-starter-cache 2.6.1: https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-cache/2.6.1, Apache 2.0
+ spring-boot 2.7.3: https://mvnrepository.com/artifact/org.springframework.boot/spring-boot/2.7.3, Apache 2.0
+ spring-boot-actuator 2.7.3: https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-actuator/2.7.3, Apache 2.0
+ spring-boot-actuator-autoconfigure 2.7.3: https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-actuator-autoconfigure/2.7.3, Apache 2.0
+ spring-boot-configuration-processor 2.7.3: https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-configuration-processor/2.7.3, Apache 2.0
+ spring-boot-autoconfigure 2.7.3: https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-autoconfigure/2.7.3, Apache 2.0
+ spring-boot-starter 2.7.3: https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter/2.7.3, Apache 2.0
+ spring-boot-starter-actuator 2.7.3: https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-actuator/2.7.3, Apache 2.0
+ spring-boot-starter-aop 2.7.3: https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-aop/2.7.3, Apache 2.0
+ spring-boot-starter-jdbc 2.7.3: https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-jdbc/2.7.3, Apache 2.0
+ spring-boot-starter-jetty 2.7.3: https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-jetty/2.7.3, Apache 2.0
+ spring-boot-starter-json 2.7.3: https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-json/2.7.3, Apache 2.0
+ spring-boot-starter-logging 2.7.3: https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-logging/2.7.3, Apache 2.0
+ spring-boot-starter-quartz 2.7.3: https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-quartz/2.7.3, Apache 2.0
+ spring-boot-starter-web 2.7.3: https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-web/2.7.3, Apache 2.0
+ spring-boot-starter-cache 2.7.3: https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-cache/2.7.3, Apache 2.0
spring-context 5.3.19: https://mvnrepository.com/artifact/org.springframework/spring-context/5.3.19, Apache 2.0
spring-context-support 5.3.13: https://mvnrepository.com/artifact/org.springframework/spring-context-support/5.3.13, Apache 2.0
spring-core 5.3.19: https://mvnrepository.com/artifact/org.springframework/spring-core/5.3.19, Apache 2.0
spring-expression 5.3.13: https://mvnrepository.com/artifact/org.springframework/spring-expression/5.3.13, Apache 2.0
- springfox-core 2.9.2: https://mvnrepository.com/artifact/io.springfox/springfox-core/2.9.2, Apache 2.0
- springfox-schema 2.9.2: https://mvnrepository.com/artifact/io.springfox/springfox-schema/2.9.2, Apache 2.0
- springfox-spi 2.9.2: https://mvnrepository.com/artifact/io.springfox/springfox-spi/2.9.2, Apache 2.0
- springfox-spring-web 2.9.2: https://mvnrepository.com/artifact/io.springfox/springfox-spring-web/2.9.2, Apache 2.0
- springfox-swagger2 2.9.2: https://mvnrepository.com/artifact/io.springfox/springfox-swagger2/2.9.2, Apache 2.0
- springfox-swagger-common 2.9.2: https://mvnrepository.com/artifact/io.springfox/springfox-swagger-common/2.9.2, Apache 2.0
- springfox-swagger-ui 2.9.2: https://mvnrepository.com/artifact/io.springfox/springfox-swagger-ui/2.9.2, Apache 2.0
+ springfox-core 3.0.0: https://mvnrepository.com/artifact/io.springfox/springfox-core/3.0.0, Apache 2.0
+ springfox-schema 3.0.0: https://mvnrepository.com/artifact/io.springfox/springfox-schema/3.0.0, Apache 2.0
+ springfox-spi 3.0.0: https://mvnrepository.com/artifact/io.springfox/springfox-spi/3.0.0, Apache 2.0
+ springfox-spring-web 3.0.0: https://mvnrepository.com/artifact/io.springfox/springfox-spring-web/3.0.0, Apache 2.0
+ springfox-swagger2 3.0.0: https://mvnrepository.com/artifact/io.springfox/springfox-swagger2/3.0.0, Apache 2.0
+ springfox-swagger-common 3.0.0: https://mvnrepository.com/artifact/io.springfox/springfox-swagger-common/3.0.0, Apache 2.0
+ springfox-swagger-ui 3.0.0: https://mvnrepository.com/artifact/io.springfox/springfox-swagger-ui/3.0.0, Apache 2.0
spring-jcl 5.3.13: https://mvnrepository.com/artifact/org.springframework/spring-jcl/5.3.13, Apache 2.0
spring-jdbc 5.3.19: https://mvnrepository.com/artifact/org.springframework/spring-jdbc/5.3.19, Apache 2.0
- spring-plugin-core 1.2.0.RELEASE: https://mvnrepository.com/artifact/org.springframework.plugin/spring-plugin-core/1.2.0.RELEASE, Apache 2.0
- spring-plugin-metadata 1.2.0.RELEASE: https://mvnrepository.com/artifact/org.springframework.plugin/spring-plugin-metadata/1.2.0.RELEASE, Apache 2.0
+ spring-plugin-core 2.0.0.RELEASE: https://mvnrepository.com/artifact/org.springframework.plugin/spring-plugin-core/2.0.0.RELEASE, Apache 2.0
+ spring-plugin-metadata 2.0.0.RELEASE: https://mvnrepository.com/artifact/org.springframework.plugin/spring-plugin-metadata/2.0.0.RELEASE, Apache 2.0
spring-tx 5.3.19: https://mvnrepository.com/artifact/org.springframework/spring-tx/5.3.19, Apache 2.0
spring-web 5.3.13: https://mvnrepository.com/artifact/org.springframework/spring-web/5.3.13, Apache 2.0
spring-webmvc 5.3.13: https://mvnrepository.com/artifact/org.springframework/spring-webmvc/5.3.13, Apache 2.0
swagger-annotations 1.5.20: https://mvnrepository.com/artifact/io.swagger/swagger-annotations/1.5.20, Apache 2.0
- swagger-bootstrap-ui 1.9.3: https://mvnrepository.com/artifact/com.github.xiaoymin/swagger-bootstrap-ui/1.9.3, Apache 2.0
swagger-models 1.5.24: https://mvnrepository.com/artifact/io.swagger/swagger-models/1.5.24, Apache 2.0
tephra-api 0.6.0: https://mvnrepository.com/artifact/co.cask.tephra/tephra-api/0.6.0, Apache 2.0
- tomcat-embed-el 9.0.55: https://mvnrepository.com/artifact/org.apache.tomcat.embed/tomcat-embed-el/9.0.55, Apache 2.0
+ tomcat-embed-el 9.0.65: https://mvnrepository.com/artifact/org.apache.tomcat.embed/tomcat-embed-el/9.0.65, Apache 2.0
xercesImpl 2.9.1: https://mvnrepository.com/artifact/xerces/xercesImpl/2.9.1, Apache 2.0
xmlbeans 3.1.0: https://mvnrepository.com/artifact/org.apache.xmlbeans/xmlbeans/3.1.0, Apache 2.0
xml-apis 1.3.04: https://mvnrepository.com/artifact/xml-apis/xml-apis/1.3.04, Apache 2.0 and W3C
@@ -395,38 +394,38 @@ The text of each license is also included at licenses/LICENSE-[project].txt.
protostuff-runtime 1.7.2: https://github.com/protostuff/protostuff/protostuff-core Apache-2.0
protostuff-api 1.7.2: https://github.com/protostuff/protostuff/protostuff-api Apache-2.0
protostuff-collectionschema 1.7.2: https://github.com/protostuff/protostuff/protostuff-collectionschema Apache-2.0
- prometheus client_java(simpleclient) 0.12.0: https://github.com/prometheus/client_java, Apache 2.0
+ prometheus client_java(simpleclient) 0.15.0: https://github.com/prometheus/client_java, Apache 2.0
snowflake snowflake-2010: https://github.com/twitter-archive/snowflake/tree/snowflake-2010, Apache 2.0
- kubernetes-client 4.13.3: https://mvnrepository.com/artifact/io.fabric8/kubernetes-client/4.13.3, Apache 2.0
- kubernetes-model-admissionregistration 4.13.3: https://mvnrepository.com/artifact/io.fabric8/kubernetes-model-admissionregistration/4.13.3, Apache 2.0
- kubernetes-model-apiextensions 4.13.3: https://mvnrepository.com/artifact/io.fabric8/kubernetes-model-apiextensions/4.13.3, Apache 2.0
- kubernetes-model-apps 4.13.3: https://mvnrepository.com/artifact/io.fabric8/kubernetes-model-apps/4.13.3, Apache 2.0
- kubernetes-model-autoscaling 4.13.3: https://mvnrepository.com/artifact/io.fabric8/kubernetes-model-autoscaling/4.13.3, Apache 2.0
- kubernetes-model-batch 4.13.3: https://mvnrepository.com/artifact/io.fabric8/kubernetes-model-autoscaling/4.13.3, Apache 2.0
- kubernetes-model-certificates 4.13.3: https://mvnrepository.com/artifact/io.fabric8/kubernetes-model-certificates/4.13.3, Apache 2.0
- kubernetes-model-common 4.13.3: https://mvnrepository.com/artifact/io.fabric8/kubernetes-model-common/4.13.3, Apache 2.0
- kubernetes-model-coordination 4.13.3: https://mvnrepository.com/artifact/io.fabric8/kubernetes-model-coordination/4.13.3, Apache 2.0
- kubernetes-model-core 4.13.3: https://mvnrepository.com/artifact/io.fabric8/kubernetes-model-core/4.13.3, Apache 2.0
- kubernetes-model-discovery 4.13.3: https://mvnrepository.com/artifact/io.fabric8/kubernetes-model-discovery/4.13.3, Apache 2.0
- kubernetes-model-events 4.13.3: https://mvnrepository.com/artifact/io.fabric8/kubernetes-model-events/4.13.3, Apache 2.0
- kubernetes-model-extensions 4.13.3: https://mvnrepository.com/artifact/io.fabric8/kubernetes-model-extensions/4.13.3, Apache 2.0
- kubernetes-model-flowcontrol 4.13.3: https://mvnrepository.com/artifact/io.fabric8/kubernetes-model-flowcontrol/4.13.3, Apache 2.0
- kubernetes-model-metrics 4.13.3: https://mvnrepository.com/artifact/io.fabric8/kubernetes-model-metrics/4.13.3, Apache 2.0
- kubernetes-model-networking 4.13.3: https://mvnrepository.com/artifact/io.fabric8/kubernetes-model-networking/4.13.3, Apache 2.0
- kubernetes-model-node 4.13.3: https://mvnrepository.com/artifact/io.fabric8/kubernetes-model-node/4.13.3, Apache 2.0
- kubernetes-model-policy 4.13.3: https://mvnrepository.com/artifact/io.fabric8/kubernetes-model-policy/4.13.3, Apache 2.0
- kubernetes-model-rbac 4.13.3: https://mvnrepository.com/artifact/io.fabric8/kubernetes-model-rbac/4.13.3, Apache 2.0
- kubernetes-model-scheduling 4.13.3: https://mvnrepository.com/artifact/io.fabric8/kubernetes-model-scheduling/4.13.3, Apache 2.0
- kubernetes-model-storageclass 4.13.3: https://mvnrepository.com/artifact/io.fabric8/kubernetes-model-storageclass/4.13.3, Apache 2.0
+ kubernetes-client 5.10.2: https://mvnrepository.com/artifact/io.fabric8/kubernetes-client/5.10.2, Apache 2.0
+ kubernetes-model-admissionregistration 5.10.2: https://mvnrepository.com/artifact/io.fabric8/kubernetes-model-admissionregistration/5.10.2, Apache 2.0
+ kubernetes-model-apiextensions 5.10.2: https://mvnrepository.com/artifact/io.fabric8/kubernetes-model-apiextensions/5.10.2, Apache 2.0
+ kubernetes-model-apps 5.10.2: https://mvnrepository.com/artifact/io.fabric8/kubernetes-model-apps/5.10.2, Apache 2.0
+ kubernetes-model-autoscaling 5.10.2: https://mvnrepository.com/artifact/io.fabric8/kubernetes-model-autoscaling/5.10.2, Apache 2.0
+ kubernetes-model-batch 5.10.2: https://mvnrepository.com/artifact/io.fabric8/kubernetes-model-autoscaling/5.10.2, Apache 2.0
+ kubernetes-model-certificates 5.10.2: https://mvnrepository.com/artifact/io.fabric8/kubernetes-model-certificates/5.10.2, Apache 2.0
+ kubernetes-model-common 5.10.2: https://mvnrepository.com/artifact/io.fabric8/kubernetes-model-common/5.10.2, Apache 2.0
+ kubernetes-model-coordination 5.10.2: https://mvnrepository.com/artifact/io.fabric8/kubernetes-model-coordination/5.10.2, Apache 2.0
+ kubernetes-model-core 5.10.2: https://mvnrepository.com/artifact/io.fabric8/kubernetes-model-core/5.10.2, Apache 2.0
+ kubernetes-model-discovery 5.10.2: https://mvnrepository.com/artifact/io.fabric8/kubernetes-model-discovery/5.10.2, Apache 2.0
+ kubernetes-model-events 5.10.2: https://mvnrepository.com/artifact/io.fabric8/kubernetes-model-events/5.10.2, Apache 2.0
+ kubernetes-model-extensions 5.10.2: https://mvnrepository.com/artifact/io.fabric8/kubernetes-model-extensions/5.10.2, Apache 2.0
+ kubernetes-model-flowcontrol 5.10.2: https://mvnrepository.com/artifact/io.fabric8/kubernetes-model-flowcontrol/5.10.2, Apache 2.0
+ kubernetes-model-metrics 5.10.2: https://mvnrepository.com/artifact/io.fabric8/kubernetes-model-metrics/5.10.2, Apache 2.0
+ kubernetes-model-networking 5.10.2: https://mvnrepository.com/artifact/io.fabric8/kubernetes-model-networking/5.10.2, Apache 2.0
+ kubernetes-model-node 5.10.2: https://mvnrepository.com/artifact/io.fabric8/kubernetes-model-node/5.10.2, Apache 2.0
+ kubernetes-model-policy 5.10.2: https://mvnrepository.com/artifact/io.fabric8/kubernetes-model-policy/5.10.2, Apache 2.0
+ kubernetes-model-rbac 5.10.2: https://mvnrepository.com/artifact/io.fabric8/kubernetes-model-rbac/5.10.2, Apache 2.0
+ kubernetes-model-scheduling 5.10.2: https://mvnrepository.com/artifact/io.fabric8/kubernetes-model-scheduling/5.10.2, Apache 2.0
+ kubernetes-model-storageclass 5.10.2: https://mvnrepository.com/artifact/io.fabric8/kubernetes-model-storageclass/5.10.2, Apache 2.0
zjsonpatch 0.3.0 https://mvnrepository.com/artifact/io.fabric8/zjsonpatch/0.3.0, Apache 2.0
generex 1.0.2 https://mvnrepository.com/artifact/com.github.mifmif/generex/1.0.2, Apache 2.0
jackson-dataformat-yaml 2.13.0 https://mvnrepository.com/artifact/com.fasterxml.jackson.dataformat/jackson-dataformat-yaml/2.13.0, Apache 2.0
- logging-interceptor 3.14.9 https://mvnrepository.com/artifact/com.squareup.okhttp3/logging-interceptor/3.14.9, Apache 2.0
+ logging-interceptor 4.9.3 https://mvnrepository.com/artifact/com.squareup.okhttp3/logging-interceptor/4.9.3, Apache 2.0
okhttp 3.14.3 https://mvnrepository.com/artifact/com.squareup.okhttp3/okhttp/3.14.3, Apache 2.0
okio 1.17.2 https://mvnrepository.com/artifact/com.squareup.okio/okio/1.17.2, Apache 2.0
hibernate-validator 6.2.2.Final https://mvnrepository.com/artifact/org.hibernate.validator/hibernate-validator/6.2.2.Final, Apache 2.0
jakarta.validation-api 2.0.2 https://mvnrepository.com/artifact/jakarta.validation/jakarta.validation-api/2.0.2, Apache 2.0
- jboss-logging:jar 3.4.2.Final https://mvnrepository.com/artifact/org.jboss.logging/jboss-logging/3.4.2.Final, Apache 2.0
+ jboss-logging:jar 3.4.3.Final https://mvnrepository.com/artifact/org.jboss.logging/jboss-logging/3.4.3.Final, Apache 2.0
ion-java 1.0.2 https://mvnrepository.com/artifact/software.amazon.ion/ion-java/1.0.2 Apache 2.0
jmespath-java 1.12.160 https://mvnrepository.com/artifact/com.amazonaws/jmespath-java/1.12.160 Apache 2.0
jackson-dataformat-cbor 2.13.0 https://mvnrepository.com/artifact/com.fasterxml.jackson.dataformat/jackson-dataformat-cbor/2.13.0 Apache 2.0
@@ -437,14 +436,16 @@ The text of each license is also included at licenses/LICENSE-[project].txt.
aws-java-sdk-kms-1.12.160 https://mvnrepository.com/artifact/com.amazonaws/aws-java-sdk-kms/1.12.160 Apache 2.0
aws-java-sdk-sagemaker-1.12.160 https://mvnrepository.com/artifact/com.amazonaws/aws-java-sdk-sagemaker/1.12.160 Apache 2.0
commons-text 1.8: https://mvnrepository.com/artifact/org.apache.commons/commons-text/1.8, Apache 2.0
- httpasyncclient 4.1.4: https://mvnrepository.com/artifact/org.apache.httpcomponents/httpasyncclient/4.1.4, Apache 2.0
- httpcore-nio 4.4.14: https://mvnrepository.com/artifact/org.apache.httpcomponents/httpcore-nio/4.4.14, Apache 2.0
- jetty-client 9.4.44.v20210927: https://mvnrepository.com/artifact/org.eclipse.jetty/jetty-client/9.4.44.v20210927, Apache 2.0
- websocket-api 9.4.44.v20210927: https://mvnrepository.com/artifact/org.eclipse.jetty.websocket/websocket-api/9.4.44.v20210927, Apache 2.0
- websocket-client 9.4.44.v20210927: https://mvnrepository.com/artifact/org.eclipse.jetty.websocket/websocket-client/9.4.44.v20210927, Apache 2.0
- websocket-common 9.4.44.v20210927: https://mvnrepository.com/artifact/org.eclipse.jetty.websocket/websocket-common/9.4.44.v20210927, Apache 2.0
+ httpasyncclient 4.1.5: https://mvnrepository.com/artifact/org.apache.httpcomponents/httpasyncclient/4.1.4, Apache 2.0
+ httpcore-nio 4.4.15: https://mvnrepository.com/artifact/org.apache.httpcomponents/httpcore-nio/4.4.15, Apache 2.0
+ jetty-client 9.4.48.v20220622: https://mvnrepository.com/artifact/org.eclipse.jetty/jetty-client/9.4.48.v20220622, Apache 2.0
+ websocket-api 9.4.48.v20220622: https://mvnrepository.com/artifact/org.eclipse.jetty.websocket/websocket-api/9.4.48.v20220622, Apache 2.0
+ websocket-client 9.4.48.v20220622: https://mvnrepository.com/artifact/org.eclipse.jetty.websocket/websocket-client/9.4.48.v20220622, Apache 2.0
+ websocket-common 9.4.48.v20220622: https://mvnrepository.com/artifact/org.eclipse.jetty.websocket/websocket-common/9.4.48.v20220622, Apache 2.0
zeppelin-client 0.10.1: https://mvnrepository.com/artifact/org.apache.zeppelin/zeppelin-client/0.10.1, Apache 2.0
zeppelin-common 0.10.1: https://mvnrepository.com/artifact/org.apache.zeppelin/zeppelin-common/0.10.1, Apache 2.0
+ kotlin 1.6.21: https://mvnrepository.com/artifact/org.jetbrains.kotlin/kotlin-stdlib, Apache 2.0
+ JetBrains annotations: https://mvnrepository.com/artifact/org.jetbrains/annotations, Apache 2.0
========================================================================
BSD licenses
@@ -466,8 +467,8 @@ The text of each license is also included at licenses/LICENSE-[project].txt.
xmlenc 0.52: https://mvnrepository.com/artifact/xmlenc/xmlenc/0.52, BSD
py4j 0.10.9: https://mvnrepository.com/artifact/net.sf.py4j/py4j/0.10.9, BSD 2-clause
LatencyUtils 2.0.3: https://github.com/LatencyUtils/LatencyUtils, BSD-2-Clause
- janino 3.1.6: https://mvnrepository.com/artifact/org.codehaus.janino/janino/3.1.6, BSD 3-clause
- commons-compiler 3.1.6: https://mvnrepository.com/artifact/org.codehaus.janino/janino/3.1.6, BSD 3-clause
+ janino 3.1.7: https://mvnrepository.com/artifact/org.codehaus.janino/janino/3.1.7, BSD 3-clause
+ commons-compiler 3.1.7: https://mvnrepository.com/artifact/org.codehaus.janino/janino/3.1.7, BSD 3-clause
automaton 1.11-8 https://mvnrepository.com/artifact/dk.brics.automaton/automaton/1.11-8, BSD 2-clause
========================================================================
@@ -509,16 +510,17 @@ MIT licenses
The following components are provided under a MIT 2.0 license. See project link for details.
The text of each license is also included at licenses/LICENSE-[project].txt.
- jul-to-slf4j 1.7.32: https://mvnrepository.com/artifact/org.slf4j/jul-to-slf4j/1.7.32, MIT
+ jul-to-slf4j 1.7.36: https://mvnrepository.com/artifact/org.slf4j/jul-to-slf4j/1.7.36, MIT
mssql-jdbc 6.1.0.jre8: https://mvnrepository.com/artifact/com.microsoft.sqlserver/mssql-jdbc/6.1.0.jre8, MIT
ruamel.yaml 0.17: https://sourceforge.net/projects/ruamel-yaml, MIT
- slf4j-api 1.7.5: https://mvnrepository.com/artifact/org.slf4j/slf4j-api/1.7.5, MIT
+ slf4j-api 1.7.36: https://mvnrepository.com/artifact/org.slf4j/slf4j-api/1.7.36, MIT
animal-sniffer-annotations 1.14 https://mvnrepository.com/artifact/org.codehaus.mojo/animal-sniffer-annotations/1.14, MIT
checker-compat-qual 2.0.0 https://mvnrepository.com/artifact/org.checkerframework/checker-compat-qual/2.0.0, MIT + GPLv2
- checker-qual 3.10.0 https://mvnrepository.com/artifact/org.checkerframework/checker-qual/3.10.0, MIT + GPLv2
+ checker-qual 3.19.0 https://mvnrepository.com/artifact/org.checkerframework/checker-qual/3.19.0, MIT + GPLv2
Java-WebSocket 1.5.1: https://github.com/TooTallNate/Java-WebSocket MIT
oshi-core 6.1.1: https://mvnrepository.com/artifact/com.github.oshi/oshi-core/6.1.1, MIT
unirest-java 3.7.04-standalone: https://mvnrepository.com/artifact/com.konghq/unirest-java/3.7.04, MIT
+ classgraph 4.8.83: https://mvnrepository.com/artifact/io.github.classgraph/classgraph, MIT
========================================================================
MPL 1.1 licenses
diff --git a/dolphinscheduler-e2e/pom.xml b/dolphinscheduler-e2e/pom.xml
index e404bf6b02..8a0d5dd55c 100644
--- a/dolphinscheduler-e2e/pom.xml
+++ b/dolphinscheduler-e2e/pom.xml
@@ -41,7 +41,7 @@
<assertj-core.version>3.20.2</assertj-core.version>
<awaitility.version>4.1.0</awaitility.version>
<kotlin.version>1.5.30</kotlin.version>
- <slf4j-api.version>1.7.32</slf4j-api.version>
+ <slf4j-api.version>1.7.36</slf4j-api.version>
<log4j-slf4j-impl.version>2.17.2</log4j-slf4j-impl.version>
<guava.version>31.0.1-jre</guava.version>
</properties>
diff --git a/dolphinscheduler-standalone-server/pom.xml b/dolphinscheduler-standalone-server/pom.xml
index fd90e39d24..8b69742f9f 100644
--- a/dolphinscheduler-standalone-server/pom.xml
+++ b/dolphinscheduler-standalone-server/pom.xml
@@ -23,9 +23,9 @@
<artifactId>dolphinscheduler</artifactId>
<version>dev-SNAPSHOT</version>
</parent>
-
+
<artifactId>dolphinscheduler-standalone-server</artifactId>
-
+
<dependencyManagement>
<dependencies>
<dependency>
@@ -37,7 +37,7 @@
</dependency>
</dependencies>
</dependencyManagement>
-
+
<dependencies>
<dependency>
<groupId>org.apache.dolphinscheduler</groupId>
@@ -55,17 +55,17 @@
<groupId>org.apache.dolphinscheduler</groupId>
<artifactId>dolphinscheduler-alert-server</artifactId>
</dependency>
-
+
<dependency>
<groupId>org.apache.dolphinscheduler</groupId>
<artifactId>dolphinscheduler-log-server</artifactId>
</dependency>
-
+
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
</dependency>
-
+
<dependency>
<groupId>org.apache.curator</groupId>
<artifactId>curator-test</artifactId>
@@ -79,18 +79,14 @@
<dependency>
<groupId>org.springframework.cloud</groupId>
- <artifactId>spring-cloud-context</artifactId>
- </dependency>
- <dependency>
- <groupId>org.springframework.cloud</groupId>
- <artifactId>spring-cloud-kubernetes-commons</artifactId>
+ <artifactId>spring-cloud-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-kubernetes-fabric8-config</artifactId>
</dependency>
</dependencies>
-
+
<build>
<plugins>
<plugin>
@@ -124,7 +120,7 @@
</plugin>
</plugins>
</build>
-
+
<profiles>
<profile>
<id>docker</id>
diff --git a/dolphinscheduler-standalone-server/src/main/resources/application.yaml b/dolphinscheduler-standalone-server/src/main/resources/application.yaml
index d952cbb5b1..02bd42b32b 100644
--- a/dolphinscheduler-standalone-server/src/main/resources/application.yaml
+++ b/dolphinscheduler-standalone-server/src/main/resources/application.yaml
@@ -71,6 +71,9 @@ spring:
jpa:
hibernate:
ddl-auto: none
+ mvc:
+ pathmatch:
+ matching-strategy: ANT_PATH_MATCHER
registry:
type: zookeeper
diff --git a/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/k8s/impl/K8sTaskExecutor.java b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/k8s/impl/K8sTaskExecutor.java
index 7800d70bf0..e1ac8db05c 100644
--- a/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/k8s/impl/K8sTaskExecutor.java
+++ b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/k8s/impl/K8sTaskExecutor.java
@@ -32,7 +32,6 @@ import static org.apache.dolphinscheduler.plugin.task.api.TaskConstants.NAME_LAB
import static org.apache.dolphinscheduler.plugin.task.api.TaskConstants.RESTART_POLICY;
import static org.apache.dolphinscheduler.plugin.task.api.TaskConstants.TASK_INSTANCE_ID;
-import io.fabric8.kubernetes.client.KubernetesClientException;
import org.apache.dolphinscheduler.plugin.task.api.K8sTaskExecutionContext;
import org.apache.dolphinscheduler.plugin.task.api.TaskConstants;
import org.apache.dolphinscheduler.plugin.task.api.TaskException;
@@ -59,11 +58,12 @@ import org.slf4j.Logger;
import io.fabric8.kubernetes.api.model.EnvVar;
import io.fabric8.kubernetes.api.model.Quantity;
import io.fabric8.kubernetes.api.model.ResourceRequirements;
-import io.fabric8.kubernetes.api.model.batch.Job;
-import io.fabric8.kubernetes.api.model.batch.JobBuilder;
-import io.fabric8.kubernetes.api.model.batch.JobStatus;
+import io.fabric8.kubernetes.api.model.batch.v1.Job;
+import io.fabric8.kubernetes.api.model.batch.v1.JobBuilder;
+import io.fabric8.kubernetes.api.model.batch.v1.JobStatus;
import io.fabric8.kubernetes.client.Watch;
import io.fabric8.kubernetes.client.Watcher;
+import io.fabric8.kubernetes.client.WatcherException;
/**
* K8sTaskExecutor used to submit k8s task to K8S
@@ -148,7 +148,7 @@ public class K8sTaskExecutor extends AbstractK8sTaskExecutor {
}
@Override
- public void onClose(KubernetesClientException e) {
+ public void onClose(WatcherException e) {
logStringBuffer.append(String.format("[K8sJobExecutor-%s] fail in k8s: %s", job.getMetadata().getName(),
e.getMessage()));
taskResponse.setExitStatusCode(EXIT_CODE_FAILURE);
diff --git a/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/utils/K8sUtils.java b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/utils/K8sUtils.java
index 89fcbf8627..2733cebae3 100644
--- a/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/utils/K8sUtils.java
+++ b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/utils/K8sUtils.java
@@ -28,8 +28,8 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import io.fabric8.kubernetes.api.model.Pod;
-import io.fabric8.kubernetes.api.model.batch.Job;
-import io.fabric8.kubernetes.api.model.batch.JobList;
+import io.fabric8.kubernetes.api.model.batch.v1.Job;
+import io.fabric8.kubernetes.api.model.batch.v1.JobList;
import io.fabric8.kubernetes.client.Config;
import io.fabric8.kubernetes.client.DefaultKubernetesClient;
import io.fabric8.kubernetes.client.KubernetesClient;
diff --git a/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/test/java/org/apache/dolphinscheduler/plugin/task/api/k8s/K8sTaskExecutorTest.java b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/test/java/org/apache/dolphinscheduler/plugin/task/api/k8s/K8sTaskExecutorTest.java
index f8af0b64e9..19b37ca413 100644
--- a/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/test/java/org/apache/dolphinscheduler/plugin/task/api/k8s/K8sTaskExecutorTest.java
+++ b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/test/java/org/apache/dolphinscheduler/plugin/task/api/k8s/K8sTaskExecutorTest.java
@@ -16,8 +16,6 @@
*/
package org.apache.dolphinscheduler.plugin.task.api.k8s;
-import io.fabric8.kubernetes.api.model.batch.Job;
-import io.fabric8.kubernetes.api.model.batch.JobStatus;
import static org.apache.dolphinscheduler.plugin.task.api.TaskConstants.CLUSTER;
import static org.apache.dolphinscheduler.plugin.task.api.TaskConstants.EXIT_CODE_KILL;
@@ -36,7 +34,11 @@ import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
+import io.fabric8.kubernetes.api.model.batch.v1.Job;
+import io.fabric8.kubernetes.api.model.batch.v1.JobStatus;
+
public class K8sTaskExecutorTest {
+
private K8sTaskExecutor k8sTaskExecutor = null;
private K8sTaskMainParameters k8sTaskMainParameters = null;
private final String image = "ds-dev";
@@ -51,10 +53,10 @@ public class K8sTaskExecutorTest {
TaskExecutionContext taskRequest = new TaskExecutionContext();
taskRequest.setTaskInstanceId(taskInstanceId);
taskRequest.setTaskName(taskName);
- Map<String,String> namespace = JSONUtils.toMap(this.namespace);
+ Map<String, String> namespace = JSONUtils.toMap(this.namespace);
String namespaceName = namespace.get(NAMESPACE_NAME);
String clusterName = namespace.get(CLUSTER);
- k8sTaskExecutor = new K8sTaskExecutor(null,taskRequest);
+ k8sTaskExecutor = new K8sTaskExecutor(null, taskRequest);
k8sTaskMainParameters = new K8sTaskMainParameters();
k8sTaskMainParameters.setImage(image);
k8sTaskMainParameters.setNamespaceName(namespaceName);
@@ -68,7 +70,7 @@ public class K8sTaskExecutorTest {
JobStatus jobStatus = new JobStatus();
jobStatus.setSucceeded(1);
job.setStatus(jobStatus);
- Assert.assertEquals(0, Integer.compare(0,k8sTaskExecutor.getK8sJobStatus(job)));
+ Assert.assertEquals(0, Integer.compare(0, k8sTaskExecutor.getK8sJobStatus(job)));
}
@Test
public void testSetTaskStatusNormal() {
@@ -76,15 +78,15 @@ public class K8sTaskExecutorTest {
TaskResponse taskResponse = new TaskResponse();
K8sTaskMainParameters k8STaskMainParameters = new K8sTaskMainParameters();
k8sTaskExecutor.setJob(job);
- k8sTaskExecutor.setTaskStatus(jobStatus,String.valueOf(taskInstanceId),taskResponse,k8STaskMainParameters);
- Assert.assertEquals(0, Integer.compare(EXIT_CODE_KILL,taskResponse.getExitStatusCode()));
+ k8sTaskExecutor.setTaskStatus(jobStatus, String.valueOf(taskInstanceId), taskResponse, k8STaskMainParameters);
+ Assert.assertEquals(0, Integer.compare(EXIT_CODE_KILL, taskResponse.getExitStatusCode()));
}
@Test
public void testWaitTimeoutNormal() {
try {
k8sTaskExecutor.waitTimeout(true);
} catch (TaskException e) {
- Assert.assertThat(e.getMessage(),is("K8sTask is timeout"));
+ Assert.assertThat(e.getMessage(), is("K8sTask is timeout"));
}
}
}
diff --git a/tools/dependencies/known-dependencies.txt b/tools/dependencies/known-dependencies.txt
index 1380796af4..4487231d5b 100755
--- a/tools/dependencies/known-dependencies.txt
+++ b/tools/dependencies/known-dependencies.txt
@@ -1,45 +1,55 @@
HdrHistogram-2.1.12.jar
HikariCP-4.0.3.jar
+Java-WebSocket-1.5.1.jar
LatencyUtils-2.0.3.jar
+SparseBitSet-1.2.jar
+accessors-smart-2.4.8.jar
activation-1.1.jar
animal-sniffer-annotations-1.14.jar
+annotations-13.0.jar
apacheds-i18n-2.0.0-M15.jar
apacheds-kerberos-codec-2.0.0-M15.jar
api-asn1-api-1.0.0-M20.jar
api-util-1.0.0-M20.jar
+asm-9.1.jar
aspectjweaver-1.9.7.jar
audience-annotations-0.5.0.jar
+automaton-1.11-8.jar
avro-1.7.4.jar
+aws-java-sdk-core-1.12.160.jar
+aws-java-sdk-emr-1.12.160.jar
+aws-java-sdk-kms-1.12.160.jar
+aws-java-sdk-s3-1.12.160.jar
+aws-java-sdk-sagemaker-1.12.160.jar
bonecp-0.8.0.RELEASE.jar
byte-buddy-1.9.16.jar
-caffeine-2.9.2.jar
+caffeine-2.9.3.jar
checker-compat-qual-2.0.0.jar
-checker-qual-3.10.0.jar
+checker-qual-3.19.0.jar
checker-qual-3.5.0.jar
+classgraph-4.8.83.jar
classmate-1.5.1.jar
clickhouse-jdbc-0.1.52.jar
-commons-email-1.5.jar
+commons-beanutils-1.9.4.jar
commons-cli-1.2.jar
commons-codec-1.11.jar
commons-collections-3.2.2.jar
commons-collections4-4.1.jar
-commons-compiler-3.1.6.jar
+commons-compiler-3.1.7.jar
commons-compress-1.21.jar
commons-configuration-1.10.jar
-commons-beanutils-1.9.4.jar
commons-dbcp-1.4.jar
+commons-email-1.5.jar
commons-httpclient-3.0.1.jar
commons-io-2.11.0.jar
commons-lang-2.6.jar
+commons-lang3-3.12.0.jar
commons-logging-1.1.1.jar
commons-math3-3.1.1.jar
commons-net-3.1.jar
commons-pool-1.6.jar
+commons-text-1.8.jar
cron-utils-9.1.3.jar
-error_prone_annotations-2.5.1.jar
-janino-3.1.6.jar
-javax.el-3.0.0.jar
-commons-lang3-3.12.0.jar
curator-client-4.3.0.jar
curator-framework-4.3.0.jar
curator-recipes-4.3.0.jar
@@ -50,7 +60,9 @@ datanucleus-core-4.1.6.jar
datanucleus-rdbms-4.1.7.jar
derby-10.14.2.0.jar
druid-1.2.4.jar
-gson-2.8.8.jar
+error_prone_annotations-2.5.1.jar
+generex-1.0.2.jar
+gson-2.9.1.jar
guava-24.1-jre.jar
guava-retrying-2.0.0.jar
h2-1.4.200.jar
@@ -77,69 +89,105 @@ hive-service-2.1.0.jar
hive-service-rpc-2.1.0.jar
hive-storage-api-2.1.0.jar
htrace-core-3.1.0-incubating.jar
+httpasyncclient-4.1.5.jar
httpclient-4.5.13.jar
httpcore-4.4.15.jar
+httpcore-nio-4.4.15.jar
httpmime-4.5.13.jar
+ion-java-1.0.2.jar
j2objc-annotations-1.1.jar
jackson-annotations-2.13.0.jar
jackson-core-2.13.0.jar
jackson-core-asl-1.9.13.jar
jackson-databind-2.13.0.jar
-jackson-datatype-jdk8-2.12.5.jar
-jackson-datatype-jsr310-2.12.5.jar
+jackson-dataformat-cbor-2.13.3.jar
+jackson-dataformat-yaml-2.13.3.jar
+jackson-datatype-jdk8-2.13.3.jar
+jackson-datatype-jsr310-2.13.3.jar
jackson-mapper-asl-1.9.13.jar
-jakarta.activation-api-1.2.2.jar
+jackson-module-parameter-names-2.13.3.jar
jakarta.annotation-api-1.3.5.jar
jakarta.servlet-api-4.0.4.jar
jakarta.validation-api-2.0.2.jar
jakarta.websocket-api-1.1.2.jar
-jakarta.xml.bind-api-2.3.3.jar
jamon-runtime-2.3.1.jar
+janino-3.1.7.jar
java-xmlbuilder-0.4.jar
javassist-3.27.0-GA.jar
-javax.annotation-api-1.3.2.jar
javax.activation-api-1.2.0.jar
+javax.annotation-api-1.3.2.jar
+javax.el-3.0.0.jar
javax.jdo-3.2.0-m3.jar
javax.mail-1.6.2.jar
javolution-5.5.1.jar
jaxb-api-2.3.1.jar
-jboss-logging-3.4.2.Final.jar
+jboss-logging-3.4.3.Final.jar
jdo-api-3.0.1.jar
jets3t-0.9.0.jar
jetty-6.1.26.jar
-jetty-continuation-9.4.44.v20210927.jar
-jetty-http-9.4.44.v20210927.jar
-jetty-io-9.4.44.v20210927.jar
-jetty-security-9.4.44.v20210927.jar
-jetty-server-9.4.44.v20210927.jar
-jetty-servlet-9.4.44.v20210927.jar
-jetty-servlets-9.4.44.v20210927.jar
+jetty-client-9.4.48.v20220622.jar
+jetty-continuation-9.4.48.v20220622.jar
+jetty-http-9.4.48.v20220622.jar
+jetty-io-9.4.48.v20220622.jar
+jetty-security-9.4.48.v20220622.jar
+jetty-server-9.4.48.v20220622.jar
+jetty-servlet-9.4.48.v20220622.jar
+jetty-servlets-9.4.48.v20220622.jar
jetty-util-6.1.26.jar
-jetty-util-9.4.44.v20210927.jar
-jetty-util-ajax-9.4.44.v20210927.jar
-jetty-webapp-9.4.44.v20210927.jar
-jetty-xml-9.4.44.v20210927.jar
+jetty-util-9.4.48.v20220622.jar
+jetty-util-ajax-9.4.48.v20220622.jar
+jetty-webapp-9.4.48.v20220622.jar
+jetty-xml-9.4.48.v20220622.jar
jline-0.9.94.jar
+jmespath-java-1.12.160.jar
jna-5.10.0.jar
jna-platform-5.10.0.jar
joda-time-2.10.13.jar
jpam-1.1.jar
jsch-0.1.55.jar
+json-path-2.7.0.jar
+json-smart-2.4.8.jar
jsp-api-2.1.jar
jsqlparser-2.1.jar
jsr305-3.0.0.jar
jta-1.1.jar
-jul-to-slf4j-1.7.32.jar
+jul-to-slf4j-1.7.36.jar
+kotlin-stdlib-1.6.21.jar
+kotlin-stdlib-common-1.6.21.jar
+kotlin-stdlib-jdk7-1.6.21.jar
+kotlin-stdlib-jdk8-1.6.21.jar
+kubernetes-client-5.10.2.jar
+kubernetes-model-admissionregistration-5.10.2.jar
+kubernetes-model-apiextensions-5.10.2.jar
+kubernetes-model-apps-5.10.2.jar
+kubernetes-model-autoscaling-5.10.2.jar
+kubernetes-model-batch-5.10.2.jar
+kubernetes-model-certificates-5.10.2.jar
+kubernetes-model-common-5.10.2.jar
+kubernetes-model-coordination-5.10.2.jar
+kubernetes-model-core-5.10.2.jar
+kubernetes-model-discovery-5.10.2.jar
+kubernetes-model-events-5.10.2.jar
+kubernetes-model-extensions-5.10.2.jar
+kubernetes-model-flowcontrol-5.10.2.jar
+kubernetes-model-metrics-5.10.2.jar
+kubernetes-model-networking-5.10.2.jar
+kubernetes-model-node-5.10.2.jar
+kubernetes-model-policy-5.10.2.jar
+kubernetes-model-rbac-5.10.2.jar
+kubernetes-model-scheduling-5.10.2.jar
+kubernetes-model-storageclass-5.10.2.jar
libfb303-0.9.3.jar
libthrift-0.9.3.jar
-log4j-1.2-api-2.14.1.jar
+log4j-1.2-api-2.17.2.jar
log4j-1.2.17.jar
logback-classic-1.2.11.jar
logback-core-1.2.11.jar
+logging-interceptor-4.9.3.jar
lz4-1.3.0.jar
-mapstruct-1.2.0.Final.jar
-micrometer-core-1.7.5.jar
-micrometer-registry-prometheus-1.7.5.jar
+mapstruct-1.3.1.Final.jar
+micrometer-core-1.9.3.jar
+micrometer-registry-prometheus-1.9.3.jar
mssql-jdbc-6.1.0.jre8.jar
mybatis-3.5.2.jar
mybatis-plus-3.2.0.jar
@@ -150,6 +198,8 @@ mybatis-plus-extension-3.2.0.jar
mybatis-spring-2.0.2.jar
netty-3.6.2.Final.jar
netty-all-4.1.53.Final.jar
+okhttp-3.14.9.jar
+okio-1.17.2.jar
opencsv-2.3.jar
oshi-core-6.1.1.jar
paranamer-2.3.jar
@@ -160,119 +210,81 @@ poi-ooxml-schemas-4.1.2.jar
postgresql-42.3.4.jar
presto-jdbc-0.238.1.jar
protobuf-java-2.5.0.jar
-protostuff-core-1.7.2.jar
-protostuff-runtime-1.7.2.jar
protostuff-api-1.7.2.jar
protostuff-collectionschema-1.7.2.jar
+protostuff-core-1.7.2.jar
+protostuff-runtime-1.7.2.jar
py4j-0.10.9.jar
quartz-2.3.2.jar
reflections-0.9.12.jar
-simpleclient-0.10.0.jar
-simpleclient_common-0.10.0.jar
-slf4j-api-1.7.5.jar
-snakeyaml-1.28.jar
+simpleclient-0.15.0.jar
+simpleclient_common-0.15.0.jar
+simpleclient_tracer_common-0.15.0.jar
+simpleclient_tracer_otel-0.15.0.jar
+simpleclient_tracer_otel_agent-0.15.0.jar
+slf4j-api-1.7.36.jar
+snakeyaml-1.30.jar
snappy-0.2.jar
snappy-java-1.0.4.1.jar
-SparseBitSet-1.2.jar
-spring-aop-5.3.12.jar
+spring-aop-5.3.22.jar
spring-beans-5.3.19.jar
-spring-boot-2.5.6.jar
-spring-boot-actuator-2.5.6.jar
-spring-boot-actuator-autoconfigure-2.5.6.jar
-spring-boot-autoconfigure-2.5.6.jar
+spring-boot-2.7.3.jar
+spring-boot-actuator-2.7.3.jar
+spring-boot-actuator-autoconfigure-2.7.3.jar
+spring-boot-autoconfigure-2.7.3.jar
spring-boot-configuration-processor-2.6.1.jar
-spring-boot-starter-2.5.6.jar
-spring-boot-starter-actuator-2.5.6.jar
-spring-boot-starter-aop-2.5.6.jar
-spring-boot-starter-jdbc-2.5.6.jar
-spring-boot-starter-jetty-2.5.6.jar
-spring-boot-starter-json-2.5.6.jar
-spring-boot-starter-logging-2.5.6.jar
-spring-boot-starter-quartz-2.5.6.jar
-spring-boot-starter-web-2.5.6.jar
-spring-boot-starter-cache-2.5.6.jar
-spring-cloud-context-3.0.6.jar
-spring-cloud-kubernetes-commons-2.0.6.jar
-spring-cloud-starter-kubernetes-fabric8-config-2.0.6.jar
+spring-boot-starter-2.7.3.jar
+spring-boot-starter-actuator-2.7.3.jar
+spring-boot-starter-aop-2.7.3.jar
+spring-boot-starter-cache-2.7.3.jar
+spring-boot-starter-jdbc-2.7.3.jar
+spring-boot-starter-jetty-2.7.3.jar
+spring-boot-starter-json-2.7.3.jar
+spring-boot-starter-logging-2.7.3.jar
+spring-boot-starter-quartz-2.7.3.jar
+spring-boot-starter-web-2.7.3.jar
+spring-cloud-starter-3.1.3.jar
+spring-cloud-starter-kubernetes-fabric8-config-2.1.3.jar
spring-context-5.3.19.jar
-spring-context-support-5.3.12.jar
+spring-context-support-5.3.22.jar
spring-core-5.3.19.jar
-spring-expression-5.3.12.jar
-spring-jcl-5.3.12.jar
+spring-expression-5.3.22.jar
+spring-jcl-5.3.22.jar
spring-jdbc-5.3.19.jar
-spring-plugin-core-1.2.0.RELEASE.jar
-spring-plugin-metadata-1.2.0.RELEASE.jar
+spring-plugin-core-2.0.0.RELEASE.jar
+spring-plugin-metadata-2.0.0.RELEASE.jar
spring-tx-5.3.19.jar
-spring-web-5.3.12.jar
-spring-webmvc-5.3.12.jar
-springfox-core-2.9.2.jar
-springfox-schema-2.9.2.jar
-springfox-spi-2.9.2.jar
-springfox-spring-web-2.9.2.jar
-springfox-swagger-common-2.9.2.jar
-springfox-swagger-ui-2.9.2.jar
-springfox-swagger2-2.9.2.jar
+spring-web-5.3.22.jar
+spring-webmvc-5.3.22.jar
+springfox-bean-validators-3.0.0.jar
+springfox-boot-starter-3.0.0.jar
+springfox-core-3.0.0.jar
+springfox-data-rest-3.0.0.jar
+springfox-oas-3.0.0.jar
+springfox-schema-3.0.0.jar
+springfox-spi-3.0.0.jar
+springfox-spring-web-3.0.0.jar
+springfox-spring-webflux-3.0.0.jar
+springfox-spring-webmvc-3.0.0.jar
+springfox-swagger-common-3.0.0.jar
+springfox-swagger-ui-3.0.0.jar
+springfox-swagger2-3.0.0.jar
swagger-annotations-1.5.20.jar
-swagger-bootstrap-ui-1.9.3.jar
-swagger-models-1.5.24.jar
-tomcat-embed-el-9.0.54.jar
+swagger-annotations-2.1.2.jar
+swagger-models-1.5.20.jar
+swagger-models-2.1.2.jar
tephra-api-0.6.0.jar
+tomcat-embed-el-9.0.65.jar
transaction-api-1.1.jar
+unirest-java-3.7.04-standalone.jar
+websocket-api-9.4.48.v20220622.jar
+websocket-client-9.4.48.v20220622.jar
+websocket-common-9.4.48.v20220622.jar
xercesImpl-2.9.1.jar
xml-apis-1.3.04.jar
xmlbeans-3.1.0.jar
xmlenc-0.52.jar
-zookeeper-3.4.14.jar
-Java-WebSocket-1.5.1.jar
-kubernetes-client-4.13.3.jar
-kubernetes-model-admissionregistration-4.13.3.jar
-kubernetes-model-apiextensions-4.13.3.jar
-kubernetes-model-apps-4.13.3.jar
-kubernetes-model-autoscaling-4.13.3.jar
-kubernetes-model-batch-4.13.3.jar
-kubernetes-model-certificates-4.13.3.jar
-kubernetes-model-common-4.13.3.jar
-kubernetes-model-coordination-4.13.3.jar
-kubernetes-model-core-4.13.3.jar
-kubernetes-model-discovery-4.13.3.jar
-kubernetes-model-events-4.13.3.jar
-kubernetes-model-extensions-4.13.3.jar
-kubernetes-model-metrics-4.13.3.jar
-kubernetes-model-networking-4.13.3.jar
-kubernetes-model-node-4.13.3.jar
-kubernetes-model-policy-4.13.3.jar
-kubernetes-model-rbac-4.13.3.jar
-kubernetes-model-settings-4.13.3.jar
-kubernetes-model-scheduling-4.13.3.jar
-kubernetes-model-storageclass-4.13.3.jar
-zjsonpatch-0.3.0.jar
-automaton-1.11-8.jar
-generex-1.0.2.jar
-jackson-dataformat-yaml-2.12.5.jar
-jackson-module-jaxb-annotations-2.12.5.jar
-jackson-module-parameter-names-2.12.5.jar
-logging-interceptor-3.14.9.jar
-okhttp-3.14.9.jar
-okio-1.17.2.jar
-jmespath-java-1.12.160.jar
-jackson-dataformat-cbor-2.12.5.jar
-ion-java-1.0.2.jar
-aws-java-sdk-s3-1.12.160.jar
-aws-java-sdk-kms-1.12.160.jar
-aws-java-sdk-emr-1.12.160.jar
-aws-java-sdk-core-1.12.160.jar
-aws-java-sdk-sagemaker-1.12.160.jar
-commons-text-1.8.jar
-httpasyncclient-4.1.4.jar
-httpcore-nio-4.4.14.jar
-jetty-client-9.4.44.v20210927.jar
-unirest-java-3.7.04-standalone.jar
-websocket-api-9.4.44.v20210927.jar
-websocket-client-9.4.44.v20210927.jar
-websocket-common-9.4.44.v20210927.jar
zeppelin-client-0.10.1.jar
zeppelin-common-0.10.1.jar
-json-path-2.7.0.jar
-accessors-smart-2.4.7.jar
-asm-9.1.jar
-json-smart-2.4.7.jar
+zjsonpatch-0.3.0.jar
+zookeeper-3.4.14.jar