From 9aecbc873beb88ae3ec51b2d2d2982364d31c8f8 Mon Sep 17 00:00:00 2001
From: fuchanghai <‘2875334588@qq.com’>
Date: Fri, 14 Oct 2022 16:27:58 +0800
Subject: [PATCH 01/14] [improvement] add springdoc-openapi-ui
---
dolphinscheduler-api/pom.xml | 4 +
dolphinscheduler-bom/pom.xml | 7 +
dolphinscheduler-dist/release-docs/LICENSE | 1 +
.../licenses/LICENSE-springdoc-openapi-ui.txt | 201 ++++++++++++++++++
tools/dependencies/known-dependencies.txt | 1 +
5 files changed, 214 insertions(+)
create mode 100644 dolphinscheduler-dist/release-docs/licenses/LICENSE-springdoc-openapi-ui.txt
diff --git a/dolphinscheduler-api/pom.xml b/dolphinscheduler-api/pom.xml
index 7e03f01b6ebf..61fe0b4ab414 100644
--- a/dolphinscheduler-api/pom.xml
+++ b/dolphinscheduler-api/pom.xml
@@ -195,6 +195,10 @@
test
+
+ org.springdoc
+ springdoc-openapi-ui
+
diff --git a/dolphinscheduler-bom/pom.xml b/dolphinscheduler-bom/pom.xml
index aacfc896f15b..ea9124e2916a 100644
--- a/dolphinscheduler-bom/pom.xml
+++ b/dolphinscheduler-bom/pom.xml
@@ -98,6 +98,7 @@
1.31
4.1.1
2.17.282
+ 1.6.9
@@ -753,6 +754,12 @@
datasync
${datasync.version}
+
+
+ org.springdoc
+ springdoc-openapi-ui
+ ${springdoc-openapi-ui.version}
+
diff --git a/dolphinscheduler-dist/release-docs/LICENSE b/dolphinscheduler-dist/release-docs/LICENSE
index 2ad573a24115..ef14fc1b55d5 100644
--- a/dolphinscheduler-dist/release-docs/LICENSE
+++ b/dolphinscheduler-dist/release-docs/LICENSE
@@ -377,6 +377,7 @@ The text of each license is also included at licenses/LICENSE-[project].txt.
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.22: https://mvnrepository.com/artifact/org.springframework/spring-core/5.3.22, Apache 2.0
spring-expression 5.3.13: https://mvnrepository.com/artifact/org.springframework/spring-expression/5.3.13, Apache 2.0
+ springdoc-openapi-ui 1.6.9: https://mvnrepository.com/artifact/org.springdoc/springdoc-openapi-ui/1.6.9, 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
diff --git a/dolphinscheduler-dist/release-docs/licenses/LICENSE-springdoc-openapi-ui.txt b/dolphinscheduler-dist/release-docs/licenses/LICENSE-springdoc-openapi-ui.txt
new file mode 100644
index 000000000000..835428fbaa90
--- /dev/null
+++ b/dolphinscheduler-dist/release-docs/licenses/LICENSE-springdoc-openapi-ui.txt
@@ -0,0 +1,201 @@
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed 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.
\ No newline at end of file
diff --git a/tools/dependencies/known-dependencies.txt b/tools/dependencies/known-dependencies.txt
index 9a6c44d58453..304b63887187 100644
--- a/tools/dependencies/known-dependencies.txt
+++ b/tools/dependencies/known-dependencies.txt
@@ -318,6 +318,7 @@ spring-security-rsa-1.0.10.RELEASE.jar
spring-tx-5.3.22.jar
spring-web-5.3.22.jar
spring-webmvc-5.3.22.jar
+springdoc-openapi-ui-1.6.9.jar
springfox-bean-validators-3.0.0.jar
springfox-boot-starter-3.0.0.jar
springfox-core-3.0.0.jar
From d193dccc66d6dc40b3c77df69065cf6cdf766875 Mon Sep 17 00:00:00 2001
From: fuchanghai <1105596917@qq.com>
Date: Sat, 15 Oct 2022 19:57:21 +0800
Subject: [PATCH 02/14] [improvement-#12266]remove swagger-v2 dependencies. and
update annotation
---
dolphinscheduler-api/pom.xml | 4 +-
.../api/configuration/AppConfiguration.java | 2 +-
.../configuration/OpenAPIConfiguration.java | 93 +----
.../OpenAPITranslationConfiguration.java | 55 +--
.../api/controller/AccessTokenController.java | 65 ++--
.../controller/AccessTokenV2Controller.java | 16 +-
.../api/controller/AlertGroupController.java | 93 +++--
.../AlertPluginInstanceController.java | 73 ++--
.../api/controller/AuditLogController.java | 32 +-
.../api/controller/ClusterController.java | 79 ++---
.../controller/DataAnalysisController.java | 52 +--
.../api/controller/DataQualityController.java | 64 ++--
.../api/controller/DataSourceController.java | 123 ++++---
.../api/controller/EnvironmentController.java | 84 +++--
.../api/controller/ExecutorController.java | 170 +++++----
.../api/controller/FavTaskController.java | 36 +-
.../controller/K8sNamespaceController.java | 92 +++--
.../api/controller/LoggerController.java | 63 ++--
.../api/controller/LoginController.java | 26 +-
.../api/controller/MonitorController.java | 22 +-
.../ProcessDefinitionController.java | 335 +++++++++---------
.../controller/ProcessInstanceController.java | 195 +++++-----
.../ProcessTaskRelationController.java | 113 +++---
.../ProcessTaskRelationV2Controller.java | 34 +-
.../api/controller/ProjectController.java | 102 +++---
.../api/controller/ProjectV2Controller.java | 94 +++--
.../api/controller/QueueController.java | 62 ++--
.../api/controller/QueueV2Controller.java | 51 ++-
.../api/controller/ResourcesController.java | 302 ++++++++--------
.../api/controller/ScheduleV2Controller.java | 38 +-
.../api/controller/SchedulerController.java | 145 ++++----
.../controller/TaskDefinitionController.java | 175 +++++----
.../TaskDefinitionV2Controller.java | 46 ++-
.../api/controller/TaskGroupController.java | 130 ++++---
.../controller/TaskInstanceController.java | 77 ++--
.../api/controller/TenantController.java | 72 ++--
.../api/controller/UiPluginController.java | 30 +-
.../api/controller/UsersController.java | 206 ++++++-----
.../controller/WorkFlowLineageController.java | 47 ++-
.../api/controller/WorkerGroupController.java | 60 ++--
.../api/controller/WorkflowV2Controller.java | 38 +-
.../api/dto/CreateTokenRequest.java | 10 +-
.../api/dto/PageQueryDto.java | 10 +-
.../api/dto/project/ProjectCreateRequest.java | 6 +-
.../api/dto/project/ProjectQueryRequest.java | 10 +-
.../api/dto/project/ProjectUpdateRequest.java | 12 +-
.../api/dto/queue/QueueCreateRequest.java | 10 +-
.../api/dto/queue/QueueQueryRequest.java | 11 +-
.../api/dto/queue/QueueUpdateRequest.java | 13 +-
.../api/dto/queue/QueueVerifyRequest.java | 10 +-
.../dto/schedule/ScheduleCreateRequest.java | 26 +-
.../dto/schedule/ScheduleFilterRequest.java | 12 +-
.../dto/schedule/ScheduleUpdateRequest.java | 24 +-
.../api/dto/task/TaskCreateRequest.java | 44 +--
.../api/dto/task/TaskFilterRequest.java | 12 +-
.../api/dto/task/TaskUpdateRequest.java | 42 +--
.../TaskRelationCreateRequest.java | 10 +-
.../TaskRelationDeleteRequest.java | 4 +-
.../TaskRelationFilterRequest.java | 12 +-
.../TaskRelationUpdateUpstreamRequest.java | 6 +-
.../dto/workflow/WorkflowCreateRequest.java | 20 +-
.../dto/workflow/WorkflowFilterRequest.java | 14 +-
.../dto/workflow/WorkflowUpdateRequest.java | 20 +-
.../src/main/resources/application.yaml | 4 +
64 files changed, 1875 insertions(+), 2063 deletions(-)
diff --git a/dolphinscheduler-api/pom.xml b/dolphinscheduler-api/pom.xml
index 61fe0b4ab414..a070bb8d1e27 100644
--- a/dolphinscheduler-api/pom.xml
+++ b/dolphinscheduler-api/pom.xml
@@ -134,10 +134,10 @@
spring-context
-
+
org.hibernate.validator
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 d67163581019..5cfb11ad72c0 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
@@ -103,7 +103,7 @@ public void addInterceptors(InterceptorRegistry registry) {
registry.addInterceptor(loginInterceptor())
.addPathPatterns(LOGIN_INTERCEPTOR_PATH_PATTERN)
.excludePathPatterns(LOGIN_PATH_PATTERN, REGISTER_PATH_PATTERN,
- "/swagger-resources/**", "/webjars/**", "/v3/api-docs/**", "/api-docs/**",
+ "/swagger-resources/**", "/webjars/**", "/v3/api-docs/**", "/api-docs/**","/swagger-ui.html",
"/doc.html", "/swagger-ui/**", "*.html", "/ui/**", "/error");
}
diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/configuration/OpenAPIConfiguration.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/configuration/OpenAPIConfiguration.java
index deab4dd3455c..1c89f7b5b5df 100644
--- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/configuration/OpenAPIConfiguration.java
+++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/configuration/OpenAPIConfiguration.java
@@ -16,33 +16,19 @@
*/
package org.apache.dolphinscheduler.api.configuration;
-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.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 io.swagger.v3.oas.models.OpenAPI;
+import io.swagger.v3.oas.models.info.Info;
+import org.springdoc.core.GroupedOpenApi;
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;
/**
- *
* swager2 config class
- *
*/
@Configuration
@ConditionalOnWebApplication
@@ -50,73 +36,20 @@
public class OpenAPIConfiguration implements WebMvcConfigurer {
@Bean
- public Docket createV1RestApi() {
- return new Docket(DocumentationType.OAS_30)
- .groupName("v1(current)")
- .apiInfo(apiV1Info())
- .select()
- .apis(RequestHandlerSelectors.basePackage("org.apache.dolphinscheduler.api.controller"))
- .paths(PathSelectors.any().and(PathSelectors.ant("/v2/**").negate()))
- .build();
- }
-
- private ApiInfo apiV1Info() {
- return new ApiInfoBuilder()
- .title("Dolphin Scheduler Api Docs")
- .description("Dolphin Scheduler Api Docs")
- .version("V1")
- .build();
+ public OpenAPI apiV1Info() {
+ return new OpenAPI()
+ .info(new Info()
+ .title("Dolphin Scheduler Api Docs")
+ .description("Dolphin Scheduler Api Docs")
+ .version("V1"));
}
@Bean
- public Docket createV2RestApi() {
- return new Docket(DocumentationType.OAS_30)
- .groupName("v2")
- .apiInfo(apiV2Info())
- .select()
- .apis(RequestHandlerSelectors.basePackage("org.apache.dolphinscheduler.api.controller"))
- .paths(PathSelectors.any().and(PathSelectors.ant("/v2/**")))
- .build();
- }
-
- private ApiInfo apiV2Info() {
- return new ApiInfoBuilder()
- .title("Dolphin Scheduler Api Docs")
- .description("Dolphin Scheduler Api Docs")
- .version("V2")
+ public GroupedOpenApi publicApi() {
+ return GroupedOpenApi.builder()
+ .group("v1")
+ .pathsToMatch("/**")
.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 void customizeSpringfoxHandlerMappings(List mappings) {
- List copy = mappings.stream()
- .filter(mapping -> mapping.getPatternParser() == null)
- .collect(Collectors.toList());
- mappings.clear();
- mappings.addAll(copy);
- }
-
- @SuppressWarnings("unchecked")
- private List getHandlerMappings(Object bean) {
- try {
- Field field = ReflectionUtils.findField(bean.getClass(), "handlerMappings");
- field.setAccessible(true);
- return (List) 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
index 4e1c67bd0be7..0a6a81535ba7 100644
--- 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
@@ -16,31 +16,10 @@
*/
package org.apache.dolphinscheduler.api.configuration;
-import static java.util.stream.Collectors.toList;
-import static java.util.stream.Collectors.toSet;
-import springfox.documentation.service.Operation;
-import springfox.documentation.service.RequestParameter;
-import springfox.documentation.spi.DocumentationType;
-import springfox.documentation.spi.service.OperationBuilderPlugin;
-import springfox.documentation.spi.service.contexts.OperationContext;
-
-import java.util.Collection;
-import java.util.Locale;
-import java.util.Set;
-
-import lombok.RequiredArgsConstructor;
-
-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
+ /*@Component
@RequiredArgsConstructor
@Order(Ordered.LOWEST_PRECEDENCE)
public static class TranslationOperationBuilderPlugin implements OperationBuilderPlugin {
@@ -57,32 +36,32 @@ 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);
+ notes = messageSource.getMessage(notes, null, description, locale);
Set tags = operation.getTags().stream()
.map(tag -> messageSource.getMessage(tag, null, tag, locale))
.collect(toSet());
Collection 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());
+ .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);
}
- }
+ }*/
}
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 8201eedfe26c..627a1215e871 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
@@ -24,6 +24,12 @@
import static org.apache.dolphinscheduler.api.enums.Status.QUERY_ACCESSTOKEN_LIST_PAGING_ERROR;
import static org.apache.dolphinscheduler.api.enums.Status.UPDATE_ACCESS_TOKEN_ERROR;
+import io.swagger.v3.oas.annotations.Hidden;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Parameters;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.tags.Tag;
import org.apache.dolphinscheduler.api.aspect.AccessLogAnnotation;
import org.apache.dolphinscheduler.api.exceptions.ApiException;
import org.apache.dolphinscheduler.api.service.AccessTokenService;
@@ -32,7 +38,6 @@
import org.apache.dolphinscheduler.dao.entity.User;
import org.apache.dolphinscheduler.plugin.task.api.utils.ParameterUtils;
-import springfox.documentation.annotations.ApiIgnore;
import java.util.Map;
@@ -49,15 +54,11 @@
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiImplicitParam;
-import io.swagger.annotations.ApiImplicitParams;
-import io.swagger.annotations.ApiOperation;
/**
* access token controller
*/
-@Api(tags = "ACCESS_TOKEN_TAG")
+@Tag(name = "ACCESS_TOKEN_TAG")
@RestController
@RequestMapping("/access-tokens")
public class AccessTokenController extends BaseController {
@@ -74,17 +75,17 @@ public class AccessTokenController extends BaseController {
* @param token token string (if it is absent, it will be automatically generated)
* @return create result state code
*/
- @ApiOperation(value = "createToken", notes = "CREATE_TOKEN_NOTES")
- @ApiImplicitParams({
- @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")
+ @Operation(summary = "createToken", description = "CREATE_TOKEN_NOTES")
+ @Parameters({
+ @Parameter(name = "userId", description = "USER_ID", schema = @Schema(implementation = int.class), required = true),
+ @Parameter(name = "expireTime", description = "EXPIRE_TIME", schema = @Schema(implementation = String.class), required = true, example = "2021-12-31 00:00:00"),
+ @Parameter(name = "token", description = "TOKEN", required = false, schema = @Schema(implementation = String.class), example = "xxxx")
})
@PostMapping()
@ResponseStatus(HttpStatus.CREATED)
@ApiException(CREATE_ACCESS_TOKEN_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result createToken(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ public Result createToken(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@RequestParam(value = "userId") int userId,
@RequestParam(value = "expireTime") String expireTime,
@RequestParam(value = "token", required = false) String token) {
@@ -100,7 +101,7 @@ public Result createToken(@ApiIgnore @RequestAttribute(value = Constants.SESSION
* @param expireTime expire time
* @return token string
*/
- @ApiIgnore
+ @Parameter(hidden = true)
@PostMapping(value = "/generate")
@ResponseStatus(HttpStatus.CREATED)
@ApiException(GENERATE_TOKEN_ERROR)
@@ -121,17 +122,17 @@ public Result generateToken(@RequestAttribute(value = Constants.SESSION_USER) Us
* @param pageSize page size
* @return token list of page number and page size
*/
- @ApiOperation(value = "queryAccessTokenList", notes = "QUERY_ACCESS_TOKEN_LIST_NOTES")
- @ApiImplicitParams({
- @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")
+ @Operation(summary = "queryAccessTokenList", description = "QUERY_ACCESS_TOKEN_LIST_NOTES")
+ @Parameters({
+ @Parameter(name = "searchVal", description = "SEARCH_VAL", schema = @Schema(implementation = String.class)),
+ @Parameter(name = "pageNo", description = "PAGE_NO", required = true, schema = @Schema(implementation = int.class), example = "1"),
+ @Parameter(name = "pageSize", description = "PAGE_SIZE", required = true, schema = @Schema(implementation = int.class), example = "20")
})
@GetMapping()
@ResponseStatus(HttpStatus.OK)
@ApiException(QUERY_ACCESSTOKEN_LIST_PAGING_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result queryAccessTokenList(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ public Result queryAccessTokenList(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@RequestParam("pageNo") Integer pageNo,
@RequestParam(value = "searchVal", required = false) String searchVal,
@RequestParam("pageSize") Integer pageSize) {
@@ -152,15 +153,15 @@ public Result queryAccessTokenList(@ApiIgnore @RequestAttribute(value = Constant
* @param userId user id
* @return token list for specified user
*/
- @ApiOperation(value = "queryAccessTokenByUser", notes = "QUERY_ACCESS_TOKEN_BY_USER_NOTES")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "userId", value = "USER_ID", dataTypeClass = int.class)
+ @Operation(summary = "queryAccessTokenByUser", description = "QUERY_ACCESS_TOKEN_BY_USER_NOTES")
+ @Parameters({
+ @Parameter(name = "userId", description = "USER_ID", schema = @Schema(implementation = 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,
+ public Result queryAccessTokenByUser(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@PathVariable("userId") Integer userId) {
Map result = this.accessTokenService.queryAccessTokenByUser(loginUser, userId);
return this.returnDataList(result);
@@ -173,12 +174,12 @@ public Result queryAccessTokenByUser(@ApiIgnore @RequestAttribute(value = Consta
* @param id token id
* @return delete result code
*/
- @ApiIgnore
+ @Parameter(hidden = true)
@DeleteMapping(value = "/{id}")
@ResponseStatus(HttpStatus.OK)
@ApiException(DELETE_ACCESS_TOKEN_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result delAccessTokenById(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ public Result delAccessTokenById(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@PathVariable(value = "id") int id) {
Map result = accessTokenService.delAccessTokenById(loginUser, id);
return returnDataList(result);
@@ -194,18 +195,18 @@ public Result delAccessTokenById(@ApiIgnore @RequestAttribute(value = Constants.
* @param token token string (if it is absent, it will be automatically generated)
* @return updated access token entity
*/
- @ApiOperation(value = "updateToken", notes = "UPDATE_TOKEN_NOTES")
- @ApiImplicitParams({
- @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")
+ @Operation(summary = "updateToken", description = "UPDATE_TOKEN_NOTES")
+ @Parameters({
+ @Parameter(name = "id", description = "TOKEN_ID", required = true, schema = @Schema(implementation = int.class)),
+ @Parameter(name = "userId", description = "USER_ID", required = true, schema = @Schema(implementation = int.class)),
+ @Parameter(name = "expireTime", description = "EXPIRE_TIME", required = true, schema = @Schema(implementation = String.class), example = "2021-12-31 00:00:00"),
+ @Parameter(name = "token", description = "TOKEN", required = false, schema = @Schema(implementation = String.class), example = "xxxx")
})
@PutMapping(value = "/{id}")
@ResponseStatus(HttpStatus.OK)
@ApiException(UPDATE_ACCESS_TOKEN_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result updateToken(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ public Result updateToken(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@PathVariable(value = "id") int id,
@RequestParam(value = "userId") int userId,
@RequestParam(value = "expireTime") String expireTime,
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 ee3f3c4b1ca4..214983b440a2 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
@@ -19,6 +19,10 @@
import static org.apache.dolphinscheduler.api.enums.Status.CREATE_ACCESS_TOKEN_ERROR;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.tags.Tag;
import org.apache.dolphinscheduler.api.aspect.AccessLogAnnotation;
import org.apache.dolphinscheduler.api.dto.CreateTokenRequest;
import org.apache.dolphinscheduler.api.dto.CreateTokenResponse;
@@ -28,7 +32,6 @@
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;
@@ -39,14 +42,11 @@
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiImplicitParam;
-import io.swagger.annotations.ApiOperation;
/**
* access token controller
*/
-@Api(tags = "ACCESS_TOKEN_TAG")
+@Tag(name = "ACCESS_TOKEN_TAG")
@RestController
@RequestMapping("/v2/access-tokens")
public class AccessTokenV2Controller extends BaseController {
@@ -61,13 +61,13 @@ public class AccessTokenV2Controller extends BaseController {
* @param createTokenRequest createTokenRequest
* @return CreateTokenResponse CreateTokenResponse
*/
- @ApiOperation(value = "createTokenV2", notes = "CREATE_TOKEN_V2")
+ @Operation(summary = "createTokenV2", description = "CREATE_TOKEN_V2")
@PostMapping(consumes = {"application/json"})
@ResponseStatus(HttpStatus.CREATED)
- @ApiImplicitParam(name = "createTokenRequest", value = "createTokenRequest", required = true, dataTypeClass = CreateTokenRequest.class)
+ @Parameter(name = "createTokenRequest", description = "createTokenRequest", required = true, schema =@Schema( implementation = CreateTokenRequest.class))
@ApiException(CREATE_ACCESS_TOKEN_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public CreateTokenResponse createToken(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ public CreateTokenResponse createToken(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@RequestBody CreateTokenRequest createTokenRequest) {
Result result = accessTokenService.createToken(loginUser,
createTokenRequest.getUserId(),
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 853336b3b716..dec344f26285 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
@@ -24,6 +24,11 @@
import static org.apache.dolphinscheduler.api.enums.Status.QUERY_ALL_ALERTGROUP_ERROR;
import static org.apache.dolphinscheduler.api.enums.Status.UPDATE_ALERT_GROUP_ERROR;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Parameters;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.tags.Tag;
import org.apache.dolphinscheduler.api.aspect.AccessLogAnnotation;
import org.apache.dolphinscheduler.api.enums.Status;
import org.apache.dolphinscheduler.api.exceptions.ApiException;
@@ -33,34 +38,20 @@
import org.apache.dolphinscheduler.dao.entity.User;
import org.apache.dolphinscheduler.plugin.task.api.utils.ParameterUtils;
-import springfox.documentation.annotations.ApiIgnore;
-import java.util.Map;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.RequestAttribute;
-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 io.swagger.annotations.Api;
-import io.swagger.annotations.ApiImplicitParam;
-import io.swagger.annotations.ApiImplicitParams;
-import io.swagger.annotations.ApiOperation;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.Map;
/**
* alert group controller
*/
-@Api(tags = "ALERT_GROUP_TAG")
+@Tag(name = "ALERT_GROUP_TAG")
@RestController
@RequestMapping("/alert-groups")
public class AlertGroupController extends BaseController {
@@ -78,17 +69,17 @@ public class AlertGroupController extends BaseController {
* @param description description
* @return create result code
*/
- @ApiOperation(value = "createAlertgroup", notes = "CREATE_ALERT_GROUP_NOTES")
- @ApiImplicitParams({
- @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)
+ @Operation(summary = "createAlertgroup", description = "CREATE_ALERT_GROUP_NOTES")
+ @Parameters({
+ @Parameter(name = "groupName", description = "GROUP_NAME", required = true, schema = @Schema(implementation = String.class)),
+ @Parameter(name = "description", description = "DESC", schema = @Schema( implementation = String.class)),
+ @Parameter(name = "alertInstanceIds", description = "alertInstanceIds", required = true, schema = @Schema(implementation = String.class))
})
@PostMapping()
@ResponseStatus(HttpStatus.CREATED)
@ApiException(CREATE_ALERT_GROUP_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result createAlertgroup(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ public Result createAlertgroup(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@RequestParam(value = "groupName") String groupName,
@RequestParam(value = "description", required = false) String description,
@RequestParam(value = "alertInstanceIds") String alertInstanceIds) {
@@ -103,12 +94,12 @@ public Result createAlertgroup(@ApiIgnore @RequestAttribute(value = Constants.SE
* @param loginUser login user
* @return alert group list
*/
- @ApiOperation(value = "listAlertgroupById", notes = "QUERY_ALERT_GROUP_LIST_NOTES")
+ @Operation(summary = "listAlertgroupById", description = "QUERY_ALERT_GROUP_LIST_NOTES")
@GetMapping(value = "/list")
@ResponseStatus(HttpStatus.OK)
@ApiException(QUERY_ALL_ALERTGROUP_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result list(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser) {
+ public Result list(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser) {
Map result = alertGroupService.queryAlertgroup(loginUser);
return returnDataList(result);
@@ -123,17 +114,17 @@ public Result list(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER)
* @param pageSize page size
* @return alert group list page
*/
- @ApiOperation(value = "queryAlertGroupListPaging", notes = "QUERY_ALERT_GROUP_LIST_PAGING_NOTES")
- @ApiImplicitParams({
- @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")
+ @Operation(summary = "queryAlertGroupListPaging", description = "QUERY_ALERT_GROUP_LIST_PAGING_NOTES")
+ @Parameters({
+ @Parameter(name = "searchVal", description = "SEARCH_VAL", schema =@Schema( implementation = String.class)),
+ @Parameter(name = "pageNo", description = "PAGE_NO", required = true, schema =@Schema( implementation = int.class, example = "1")),
+ @Parameter(name = "pageSize", description = "PAGE_SIZE", required = true, schema =@Schema( implementation = int.class, example = "20"))
})
@GetMapping()
@ResponseStatus(HttpStatus.OK)
@ApiException(LIST_PAGING_ALERT_GROUP_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result listPaging(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ public Result listPaging(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@RequestParam(value = "searchVal", required = false) String searchVal,
@RequestParam("pageNo") Integer pageNo,
@RequestParam("pageSize") Integer pageSize) {
@@ -152,15 +143,15 @@ public Result listPaging(@ApiIgnore @RequestAttribute(value = Constants.SESSION_
* @return one alert group
*/
- @ApiOperation(value = "queryAlertGroupById", notes = "QUERY_ALERT_GROUP_BY_ID_NOTES")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "id", value = "ALERT_GROUP_ID", dataTypeClass = int.class, example = "1")
+ @Operation(summary = "queryAlertGroupById", description = "QUERY_ALERT_GROUP_BY_ID_NOTES")
+ @Parameters({
+ @Parameter(name = "id", description = "ALERT_GROUP_ID", schema =@Schema( implementation = int.class, example = "1"))
})
@PostMapping(value = "/query")
@ResponseStatus(HttpStatus.OK)
@ApiException(QUERY_ALERT_GROUP_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result queryAlertGroupById(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ public Result queryAlertGroupById(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@RequestParam("id") Integer id) {
Map result = alertGroupService.queryAlertGroupById(loginUser, id);
@@ -176,18 +167,18 @@ public Result queryAlertGroupById(@ApiIgnore @RequestAttribute(value = Constants
* @param description description
* @return update result code
*/
- @ApiOperation(value = "updateAlertgroup", notes = "UPDATE_ALERT_GROUP_NOTES")
- @ApiImplicitParams({
- @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)
+ @Operation(summary = "updateAlertgroup", description = "UPDATE_ALERT_GROUP_NOTES")
+ @Parameters({
+ @Parameter(name = "id", description = "ALERT_GROUP_ID", required = true, schema =@Schema( implementation = int.class, example = "100")),
+ @Parameter(name = "groupName", description = "GROUP_NAME", required = true, schema =@Schema( implementation = String.class)),
+ @Parameter(name = "description", description = "DESC", schema =@Schema( implementation = String.class)),
+ @Parameter(name = "alertInstanceIds", description = "alertInstanceIds", required = true, schema =@Schema( implementation = String.class))
})
@PutMapping(value = "/{id}")
@ResponseStatus(HttpStatus.OK)
@ApiException(UPDATE_ALERT_GROUP_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result updateAlertgroup(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ public Result updateAlertgroup(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@PathVariable(value = "id") int id,
@RequestParam(value = "groupName") String groupName,
@RequestParam(value = "description", required = false) String description,
@@ -205,15 +196,15 @@ public Result updateAlertgroup(@ApiIgnore @RequestAttribute(value = Constants.SE
* @param id alert group id
* @return delete result code
*/
- @ApiOperation(value = "delAlertgroupById", notes = "DELETE_ALERT_GROUP_BY_ID_NOTES")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "id", value = "ALERT_GROUP_ID", required = true, dataTypeClass = int.class, example = "100")
+ @Operation(summary = "delAlertgroupById", description = "DELETE_ALERT_GROUP_BY_ID_NOTES")
+ @Parameters({
+ @Parameter(name = "id", description = "ALERT_GROUP_ID", required = true, schema =@Schema( implementation = int.class, example = "100"))
})
@DeleteMapping(value = "/{id}")
@ResponseStatus(HttpStatus.OK)
@ApiException(DELETE_ALERT_GROUP_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result delAlertgroupById(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ public Result delAlertgroupById(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@PathVariable(value = "id") int id) {
Map result = alertGroupService.delAlertgroupById(loginUser, id);
return returnDataList(result);
@@ -226,14 +217,14 @@ public Result delAlertgroupById(@ApiIgnore @RequestAttribute(value = Constants.S
* @param groupName group name
* @return check result code
*/
- @ApiOperation(value = "verifyGroupName", notes = "VERIFY_ALERT_GROUP_NAME_NOTES")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "groupName", value = "GROUP_NAME", required = true, dataTypeClass = String.class),
+ @Operation(summary = "verifyGroupName", description = "VERIFY_ALERT_GROUP_NAME_NOTES")
+ @Parameters({
+ @Parameter(name = "groupName", description = "GROUP_NAME", required = true, schema =@Schema( implementation = String.class)),
})
@GetMapping(value = "/verify-name")
@ResponseStatus(HttpStatus.OK)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result verifyGroupName(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ public Result verifyGroupName(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@RequestParam(value = "groupName") String groupName) {
boolean exist = alertGroupService.existGroupName(groupName);
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 af805aa7e931..7be67984bbd1 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
@@ -24,6 +24,11 @@
import static org.apache.dolphinscheduler.api.enums.Status.QUERY_ALL_ALERT_PLUGIN_INSTANCE_ERROR;
import static org.apache.dolphinscheduler.api.enums.Status.UPDATE_ALERT_PLUGIN_INSTANCE_ERROR;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Parameters;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.tags.Tag;
import org.apache.dolphinscheduler.api.aspect.AccessLogAnnotation;
import org.apache.dolphinscheduler.api.enums.Status;
import org.apache.dolphinscheduler.api.exceptions.ApiException;
@@ -33,8 +38,6 @@
import org.apache.dolphinscheduler.dao.entity.User;
import org.apache.dolphinscheduler.plugin.task.api.utils.ParameterUtils;
-import springfox.documentation.annotations.ApiIgnore;
-
import java.util.Map;
import org.slf4j.Logger;
@@ -52,15 +55,11 @@
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiImplicitParam;
-import io.swagger.annotations.ApiImplicitParams;
-import io.swagger.annotations.ApiOperation;
/**
* alert plugin instance controller
*/
-@Api(tags = "ALERT_PLUGIN_INSTANCE_TAG")
+@Tag(name = "ALERT_PLUGIN_INSTANCE_TAG")
@RestController
@RequestMapping("alert-plugin-instances")
public class AlertPluginInstanceController extends BaseController {
@@ -79,17 +78,17 @@ public class AlertPluginInstanceController extends BaseController {
* @param pluginInstanceParams instance params
* @return result
*/
- @ApiOperation(value = "createAlertPluginInstance", notes = "CREATE_ALERT_PLUGIN_INSTANCE_NOTES")
- @ApiImplicitParams({
- @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")
+ @Operation(summary = "createAlertPluginInstance", description = "CREATE_ALERT_PLUGIN_INSTANCE_NOTES")
+ @Parameters({
+ @Parameter(name = "pluginDefineId", description = "ALERT_PLUGIN_DEFINE_ID", required = true, schema =@Schema( implementation = int.class, example = "100")),
+ @Parameter(name = "instanceName", description = "ALERT_PLUGIN_INSTANCE_NAME", required = true, schema =@Schema( implementation = String.class, example = "DING TALK")),
+ @Parameter(name = "pluginInstanceParams", description = "ALERT_PLUGIN_INSTANCE_PARAMS", required = true, schema =@Schema( implementation = String.class, example = "ALERT_PLUGIN_INSTANCE_PARAMS"))
})
@PostMapping()
@ResponseStatus(HttpStatus.CREATED)
@ApiException(CREATE_ALERT_PLUGIN_INSTANCE_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result createAlertPluginInstance(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ public Result createAlertPluginInstance(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@RequestParam(value = "pluginDefineId") int pluginDefineId,
@RequestParam(value = "instanceName") String instanceName,
@RequestParam(value = "pluginInstanceParams") String pluginInstanceParams) {
@@ -107,17 +106,17 @@ public Result createAlertPluginInstance(@ApiIgnore @RequestAttribute(value = Con
* @param pluginInstanceParams instance params
* @return result
*/
- @ApiOperation(value = "updateAlertPluginInstance", notes = "UPDATE_ALERT_PLUGIN_INSTANCE_NOTES")
- @ApiImplicitParams({
- @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")
+ @Operation(summary = "updateAlertPluginInstance", description = "UPDATE_ALERT_PLUGIN_INSTANCE_NOTES")
+ @Parameters({
+ @Parameter(name = "alertPluginInstanceId", description = "ALERT_PLUGIN_INSTANCE_ID", required = true, schema =@Schema( implementation = int.class, example = "100")),
+ @Parameter(name = "instanceName", description = "ALERT_PLUGIN_INSTANCE_NAME", required = true, schema =@Schema( implementation = String.class, example = "DING TALK")),
+ @Parameter(name = "pluginInstanceParams", description = "ALERT_PLUGIN_INSTANCE_PARAMS", required = true, schema =@Schema( implementation = String.class, example = "ALERT_PLUGIN_INSTANCE_PARAMS"))
})
@PutMapping(value = "/{id}")
@ResponseStatus(HttpStatus.OK)
@ApiException(UPDATE_ALERT_PLUGIN_INSTANCE_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result updateAlertPluginInstance(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ public Result updateAlertPluginInstance(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@PathVariable(value = "id") int id,
@RequestParam(value = "instanceName") String instanceName,
@RequestParam(value = "pluginInstanceParams") String pluginInstanceParams) {
@@ -133,15 +132,15 @@ public Result updateAlertPluginInstance(@ApiIgnore @RequestAttribute(value = Con
* @param id id
* @return result
*/
- @ApiOperation(value = "deleteAlertPluginInstance", notes = "DELETE_ALERT_PLUGIN_INSTANCE_NOTES")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "id", value = "ALERT_PLUGIN_ID", required = true, dataTypeClass = int.class, example = "100")
+ @Operation(summary = "deleteAlertPluginInstance", description = "DELETE_ALERT_PLUGIN_INSTANCE_NOTES")
+ @Parameters({
+ @Parameter(name = "id", description = "ALERT_PLUGIN_ID", required = true, schema =@Schema( implementation = int.class, example = "100"))
})
@DeleteMapping(value = "/{id}")
@ResponseStatus(HttpStatus.OK)
@ApiException(DELETE_ALERT_PLUGIN_INSTANCE_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result deleteAlertPluginInstance(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ public Result deleteAlertPluginInstance(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@PathVariable(value = "id") int id) {
Map result = alertPluginInstanceService.delete(loginUser, id);
@@ -155,12 +154,12 @@ public Result deleteAlertPluginInstance(@ApiIgnore @RequestAttribute(value = Con
* @param id alert plugin instance id
* @return result
*/
- @ApiOperation(value = "getAlertPluginInstance", notes = "GET_ALERT_PLUGIN_INSTANCE_NOTES")
+ @Operation(summary = "getAlertPluginInstance", description = "GET_ALERT_PLUGIN_INSTANCE_NOTES")
@GetMapping(value = "/{id}")
@ResponseStatus(HttpStatus.OK)
@ApiException(GET_ALERT_PLUGIN_INSTANCE_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result getAlertPluginInstance(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ public Result getAlertPluginInstance(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@PathVariable(value = "id") int id) {
Map result = alertPluginInstanceService.get(loginUser, id);
return returnDataList(result);
@@ -172,12 +171,12 @@ public Result getAlertPluginInstance(@ApiIgnore @RequestAttribute(value = Consta
* @param loginUser login user
* @return result
*/
- @ApiOperation(value = "queryAlertPluginInstanceList", notes = "QUERY_ALL_ALERT_PLUGIN_INSTANCE_NOTES")
+ @Operation(summary = "queryAlertPluginInstanceList", description = "QUERY_ALL_ALERT_PLUGIN_INSTANCE_NOTES")
@GetMapping(value = "/list")
@ResponseStatus(HttpStatus.OK)
@ApiException(QUERY_ALL_ALERT_PLUGIN_INSTANCE_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result getAlertPluginInstance(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser) {
+ public Result getAlertPluginInstance(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser) {
Map result = alertPluginInstanceService.queryAll();
return returnDataList(result);
}
@@ -189,14 +188,14 @@ public Result getAlertPluginInstance(@ApiIgnore @RequestAttribute(value = Consta
* @param alertInstanceName alert instance name
* @return check result code
*/
- @ApiOperation(value = "verifyAlertInstanceName", notes = "VERIFY_ALERT_INSTANCE_NAME_NOTES")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "alertInstanceName", value = "ALERT_INSTANCE_NAME", required = true, dataTypeClass = String.class),
+ @Operation(summary = "verifyAlertInstanceName", description = "VERIFY_ALERT_INSTANCE_NAME_NOTES")
+ @Parameters({
+ @Parameter(name = "alertInstanceName", description = "ALERT_INSTANCE_NAME", required = true, schema =@Schema( implementation = String.class)),
})
@GetMapping(value = "/verify-name")
@ResponseStatus(HttpStatus.OK)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result verifyGroupName(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ public Result verifyGroupName(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@RequestParam(value = "alertInstanceName") String alertInstanceName) {
boolean exist = alertPluginInstanceService.checkExistPluginInstanceName(alertInstanceName);
@@ -217,17 +216,17 @@ public Result verifyGroupName(@ApiIgnore @RequestAttribute(value = Constants.SES
* @param pageSize page size
* @return alert plugin instance list page
*/
- @ApiOperation(value = "queryAlertPluginInstanceListPaging", notes = "QUERY_ALERT_PLUGIN_INSTANCE_LIST_PAGING_NOTES")
- @ApiImplicitParams({
- @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")
+ @Operation(summary = "queryAlertPluginInstanceListPaging", description = "QUERY_ALERT_PLUGIN_INSTANCE_LIST_PAGING_NOTES")
+ @Parameters({
+ @Parameter(name = "searchVal", description = "SEARCH_VAL", schema =@Schema( implementation = String.class)),
+ @Parameter(name = "pageNo", description = "PAGE_NO", required = true, schema =@Schema( implementation = int.class, example = "1")),
+ @Parameter(name = "pageSize", description = "PAGE_SIZE", required = true, schema =@Schema( implementation = int.class, example = "20"))
})
@GetMapping()
@ResponseStatus(HttpStatus.OK)
@ApiException(LIST_PAGING_ALERT_PLUGIN_INSTANCE_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result listPaging(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ public Result listPaging(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@RequestParam(value = "searchVal", required = false) String searchVal,
@RequestParam("pageNo") Integer pageNo,
@RequestParam("pageSize") Integer pageSize) {
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 4af94c8e7b1a..ac4b17fd3b92 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
@@ -19,6 +19,11 @@
import static org.apache.dolphinscheduler.api.enums.Status.QUERY_AUDIT_LOG_LIST_PAGING;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Parameters;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.tags.Tag;
import org.apache.dolphinscheduler.api.aspect.AccessLogAnnotation;
import org.apache.dolphinscheduler.api.exceptions.ApiException;
import org.apache.dolphinscheduler.api.service.AuditService;
@@ -28,7 +33,6 @@
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;
@@ -39,12 +43,8 @@
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiImplicitParam;
-import io.swagger.annotations.ApiImplicitParams;
-import io.swagger.annotations.ApiOperation;
-@Api(tags = "AUDIT_LOG_TAG")
+@Tag(name = "AUDIT_LOG_TAG")
@RestController
@RequestMapping("projects/audit")
public class AuditLogController extends BaseController {
@@ -65,21 +65,21 @@ public class AuditLogController extends BaseController {
* @param pageSize page size
* @return audit log content
*/
- @ApiOperation(value = "queryAuditLogListPaging", notes = "QUERY_AUDIT_LOG")
- @ApiImplicitParams({
- @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")
+ @Operation(summary = "queryAuditLogListPaging", description = "QUERY_AUDIT_LOG")
+ @Parameters({
+ @Parameter(name = "startDate", description = "START_DATE", schema =@Schema( implementation = String.class)),
+ @Parameter(name = "endDate", description = "END_DATE", schema =@Schema( implementation = String.class)),
+ @Parameter(name = "resourceType", description = "RESOURCE_TYPE", schema =@Schema( implementation = AuditResourceType.class)),
+ @Parameter(name = "operationType", description = "OPERATION_TYPE", schema =@Schema( implementation = AuditOperationType.class)),
+ @Parameter(name = "userName", description = "USER_NAME", schema =@Schema( implementation = String.class)),
+ @Parameter(name = "pageNo", description = "PAGE_NO", required = true, schema =@Schema( implementation = int.class, example = "1")),
+ @Parameter(name = "pageSize", description = "PAGE_SIZE", required = true, schema =@Schema( implementation = int.class, example = "20"))
})
@GetMapping(value = "/audit-log-list")
@ResponseStatus(HttpStatus.OK)
@ApiException(QUERY_AUDIT_LOG_LIST_PAGING)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result queryAuditLogListPaging(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ public Result queryAuditLogListPaging(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@RequestParam("pageNo") Integer pageNo,
@RequestParam("pageSize") Integer pageSize,
@RequestParam(value = "resourceType", required = false) AuditResourceType resourceType,
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 e247688ec79f..160c4c5906c5 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
@@ -24,6 +24,11 @@
import static org.apache.dolphinscheduler.api.enums.Status.UPDATE_CLUSTER_ERROR;
import static org.apache.dolphinscheduler.api.enums.Status.VERIFY_CLUSTER_ERROR;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Parameters;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.tags.Tag;
import org.apache.dolphinscheduler.api.aspect.AccessLogAnnotation;
import org.apache.dolphinscheduler.api.exceptions.ApiException;
import org.apache.dolphinscheduler.api.service.ClusterService;
@@ -32,7 +37,6 @@
import org.apache.dolphinscheduler.dao.entity.User;
import org.apache.dolphinscheduler.plugin.task.api.utils.ParameterUtils;
-import springfox.documentation.annotations.ApiIgnore;
import java.util.Map;
@@ -46,15 +50,10 @@
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiImplicitParam;
-import io.swagger.annotations.ApiImplicitParams;
-import io.swagger.annotations.ApiOperation;
-
/**
* cluster controller
*/
-@Api(tags = "CLUSTER_TAG")
+@Tag(name = "CLUSTER_TAG")
@RestController
@RequestMapping("cluster")
public class ClusterController extends BaseController {
@@ -71,17 +70,17 @@ public class ClusterController extends BaseController {
* @param description description
* @return returns an error if it exists
*/
- @ApiOperation(value = "createCluster", notes = "CREATE_CLUSTER_NOTES")
- @ApiImplicitParams({
- @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)
+ @Operation(summary = "createCluster", description = "CREATE_CLUSTER_NOTES")
+ @Parameters({
+ @Parameter(name = "name", description = "CLUSTER_NAME", required = true, schema =@Schema( implementation = String.class)),
+ @Parameter(name = "config", description = "CONFIG", required = true, schema =@Schema( implementation = String.class)),
+ @Parameter(name = "description", description = "CLUSTER_DESC", schema =@Schema( implementation = String.class))
})
@PostMapping(value = "/create")
@ResponseStatus(HttpStatus.CREATED)
@ApiException(CREATE_CLUSTER_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result createProject(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ public Result createProject(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@RequestParam("name") String name,
@RequestParam("config") String config,
@RequestParam(value = "description", required = false) String description) {
@@ -100,18 +99,18 @@ public Result createProject(@ApiIgnore @RequestAttribute(value = Constants.SESSI
* @param description description
* @return update result code
*/
- @ApiOperation(value = "updateCluster", notes = "UPDATE_CLUSTER_NOTES")
- @ApiImplicitParams({
- @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),
+ @Operation(summary = "updateCluster", description = "UPDATE_CLUSTER_NOTES")
+ @Parameters({
+ @Parameter(name = "code", description = "CLUSTER_CODE", required = true, schema =@Schema( implementation = long.class, example = "100")),
+ @Parameter(name = "name", description = "CLUSTER_NAME", required = true, schema =@Schema( implementation = String.class)),
+ @Parameter(name = "config", description = "CLUSTER_CONFIG", required = true, schema =@Schema( implementation = String.class)),
+ @Parameter(name = "description", description = "CLUSTER_DESC", schema =@Schema( implementation = String.class)),
})
@PostMapping(value = "/update")
@ResponseStatus(HttpStatus.OK)
@ApiException(UPDATE_CLUSTER_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result updateCluster(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ public Result updateCluster(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@RequestParam("code") Long code,
@RequestParam("name") String name,
@RequestParam("config") String config,
@@ -126,15 +125,15 @@ public Result updateCluster(@ApiIgnore @RequestAttribute(value = Constants.SESSI
* @param clusterCode cluster code
* @return cluster detail information
*/
- @ApiOperation(value = "queryClusterByCode", notes = "QUERY_CLUSTER_BY_CODE_NOTES")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "clusterCode", value = "CLUSTER_CODE", required = true, dataTypeClass = long.class, example = "100")
+ @Operation(summary = "queryClusterByCode", description = "QUERY_CLUSTER_BY_CODE_NOTES")
+ @Parameters({
+ @Parameter(name = "clusterCode", description = "CLUSTER_CODE", required = true, schema =@Schema( implementation = long.class, example = "100"))
})
@GetMapping(value = "/query-by-code")
@ResponseStatus(HttpStatus.OK)
@ApiException(QUERY_CLUSTER_BY_CODE_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result queryClusterByCode(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ public Result queryClusterByCode(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@RequestParam("clusterCode") Long clusterCode) {
Map result = clusterService.queryClusterByCode(clusterCode);
@@ -149,17 +148,17 @@ public Result queryClusterByCode(@ApiIgnore @RequestAttribute(value = Constants.
* @param pageNo page number
* @return cluster list which the login user have permission to see
*/
- @ApiOperation(value = "queryClusterListPaging", notes = "QUERY_CLUSTER_LIST_PAGING_NOTES")
- @ApiImplicitParams({
- @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")
+ @Operation(summary = "queryClusterListPaging", description = "QUERY_CLUSTER_LIST_PAGING_NOTES")
+ @Parameters({
+ @Parameter(name = "searchVal", description = "SEARCH_VAL", schema =@Schema( implementation = String.class)),
+ @Parameter(name = "pageSize", description = "PAGE_SIZE", required = true, schema =@Schema( implementation = int.class, example = "20")),
+ @Parameter(name = "pageNo", description = "PAGE_NO", required = true, schema =@Schema( implementation = int.class, example = "1"))
})
@GetMapping(value = "/list-paging")
@ResponseStatus(HttpStatus.OK)
@ApiException(QUERY_CLUSTER_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result queryClusterListPaging(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ public Result queryClusterListPaging(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@RequestParam(value = "searchVal", required = false) String searchVal,
@RequestParam("pageSize") Integer pageSize,
@RequestParam("pageNo") Integer pageNo) {
@@ -180,15 +179,15 @@ public Result queryClusterListPaging(@ApiIgnore @RequestAttribute(value = Consta
* @param clusterCode cluster code
* @return delete result code
*/
- @ApiOperation(value = "deleteClusterByCode", notes = "DELETE_CLUSTER_BY_CODE_NOTES")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "clusterCode", value = "CLUSTER_CODE", required = true, dataTypeClass = long.class, example = "100")
+ @Operation(summary = "deleteClusterByCode", description = "DELETE_CLUSTER_BY_CODE_NOTES")
+ @Parameters({
+ @Parameter(name = "clusterCode", description = "CLUSTER_CODE", required = true, schema =@Schema( implementation = 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,
+ public Result deleteCluster(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@RequestParam("clusterCode") Long clusterCode) {
Map result = clusterService.deleteClusterByCode(loginUser, clusterCode);
@@ -201,12 +200,12 @@ public Result deleteCluster(@ApiIgnore @RequestAttribute(value = Constants.SESSI
* @param loginUser login user
* @return all cluster list
*/
- @ApiOperation(value = "queryAllClusterList", notes = "QUERY_ALL_CLUSTER_LIST_NOTES")
+ @Operation(summary = "queryAllClusterList", description = "QUERY_ALL_CLUSTER_LIST_NOTES")
@GetMapping(value = "/query-cluster-list")
@ResponseStatus(HttpStatus.OK)
@ApiException(QUERY_CLUSTER_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result queryAllClusterList(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser) {
+ public Result queryAllClusterList(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser) {
Map result = clusterService.queryAllClusterList();
return returnDataList(result);
}
@@ -218,15 +217,15 @@ public Result queryAllClusterList(@ApiIgnore @RequestAttribute(value = Constants
* @param clusterName cluster name
* @return true if the cluster name not exists, otherwise return false
*/
- @ApiOperation(value = "verifyCluster", notes = "VERIFY_CLUSTER_NOTES")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "clusterName", value = "CLUSTER_NAME", required = true, dataTypeClass = String.class)
+ @Operation(summary = "verifyCluster", description = "VERIFY_CLUSTER_NOTES")
+ @Parameters({
+ @Parameter(name = "clusterName", description = "CLUSTER_NAME", required = true, schema =@Schema( implementation = 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,
+ public Result verifyCluster(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@RequestParam(value = "clusterName") String clusterName) {
Map 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 f4cd5f80935e..b10cf2d914bc 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
@@ -23,6 +23,11 @@
import static org.apache.dolphinscheduler.api.enums.Status.QUEUE_COUNT_ERROR;
import static org.apache.dolphinscheduler.api.enums.Status.TASK_INSTANCE_STATE_COUNT_ERROR;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Parameters;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.tags.Tag;
import org.apache.dolphinscheduler.api.aspect.AccessLogAnnotation;
import org.apache.dolphinscheduler.api.exceptions.ApiException;
import org.apache.dolphinscheduler.api.service.DataAnalysisService;
@@ -30,7 +35,6 @@
import org.apache.dolphinscheduler.common.Constants;
import org.apache.dolphinscheduler.dao.entity.User;
-import springfox.documentation.annotations.ApiIgnore;
import java.util.Map;
@@ -43,15 +47,11 @@
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiImplicitParam;
-import io.swagger.annotations.ApiImplicitParams;
-import io.swagger.annotations.ApiOperation;
/**
* data analysis controller
*/
-@Api(tags = "DATA_ANALYSIS_TAG")
+@Tag(name = "DATA_ANALYSIS_TAG")
@RestController
@RequestMapping("projects/analysis")
public class DataAnalysisController extends BaseController {
@@ -68,17 +68,17 @@ public class DataAnalysisController extends BaseController {
* @param projectCode project code
* @return task instance count data
*/
- @ApiOperation(value = "countTaskState", notes = "COUNT_TASK_STATE_NOTES")
- @ApiImplicitParams({
- @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")
+ @Operation(summary = "countTaskState", description = "COUNT_TASK_STATE_NOTES")
+ @Parameters({
+ @Parameter(name = "startDate", description = "START_DATE", schema =@Schema( implementation = String.class)),
+ @Parameter(name = "endDate", description = "END_DATE", schema =@Schema( implementation = String.class)),
+ @Parameter(name = "projectCode", description = "PROJECT_CODE", schema =@Schema( implementation = long.class, example = "100"))
})
@GetMapping(value = "/task-state-count")
@ResponseStatus(HttpStatus.OK)
@ApiException(TASK_INSTANCE_STATE_COUNT_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result countTaskState(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ public Result countTaskState(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@RequestParam(value = "startDate", required = false) String startDate,
@RequestParam(value = "endDate", required = false) String endDate,
@RequestParam(value = "projectCode", required = false, defaultValue = "0") long projectCode) {
@@ -97,17 +97,17 @@ public Result countTaskState(@ApiIgnore @RequestAttribute(value = Constants.SESS
* @param projectCode project code
* @return process instance data
*/
- @ApiOperation(value = "countProcessInstanceState", notes = "COUNT_PROCESS_INSTANCE_NOTES")
- @ApiImplicitParams({
- @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")
+ @Operation(summary = "countProcessInstanceState", description = "COUNT_PROCESS_INSTANCE_NOTES")
+ @Parameters({
+ @Parameter(name = "startDate", description = "START_DATE", schema =@Schema( implementation = String.class)),
+ @Parameter(name = "endDate", description = "END_DATE", schema =@Schema( implementation = String.class)),
+ @Parameter(name = "projectCode", description = "PROJECT_CODE", schema =@Schema( implementation = long.class, example = "100"))
})
@GetMapping(value = "/process-state-count")
@ResponseStatus(HttpStatus.OK)
@ApiException(COUNT_PROCESS_INSTANCE_STATE_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result countProcessInstanceState(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ public Result countProcessInstanceState(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@RequestParam(value = "startDate", required = false) String startDate,
@RequestParam(value = "endDate", required = false) String endDate,
@RequestParam(value = "projectCode", required = false, defaultValue = "0") long projectCode) {
@@ -124,15 +124,15 @@ public Result countProcessInstanceState(@ApiIgnore @RequestAttribute(value = Con
* @param projectCode project code
* @return definition count in project code
*/
- @ApiOperation(value = "countDefinitionByUser", notes = "COUNT_PROCESS_DEFINITION_BY_USER_NOTES")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "projectCode", value = "PROJECT_CODE", dataTypeClass = long.class, example = "100")
+ @Operation(summary = "countDefinitionByUser", description = "COUNT_PROCESS_DEFINITION_BY_USER_NOTES")
+ @Parameters({
+ @Parameter(name = "projectCode", description = "PROJECT_CODE", schema =@Schema( implementation = long.class, example = "100"))
})
@GetMapping(value = "/define-user-count")
@ResponseStatus(HttpStatus.OK)
@ApiException(COUNT_PROCESS_DEFINITION_USER_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result countDefinitionByUser(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ public Result countDefinitionByUser(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@RequestParam(value = "projectCode", required = false, defaultValue = "0") long projectCode) {
Map result = dataAnalysisService.countDefinitionByUser(loginUser, projectCode);
@@ -145,12 +145,12 @@ public Result countDefinitionByUser(@ApiIgnore @RequestAttribute(value = Constan
* @param loginUser login user
* @return command state of user projects
*/
- @ApiOperation(value = "countCommandState", notes = "COUNT_COMMAND_STATE_NOTES")
+ @Operation(summary = "countCommandState", description = "COUNT_COMMAND_STATE_NOTES")
@GetMapping(value = "/command-state-count")
@ResponseStatus(HttpStatus.OK)
@ApiException(COMMAND_STATE_COUNT_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result countCommandState(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser) {
+ public Result countCommandState(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser) {
Map result = dataAnalysisService.countCommandState(loginUser);
return returnDataList(result);
@@ -162,12 +162,12 @@ public Result countCommandState(@ApiIgnore @RequestAttribute(value = Constants.S
* @param loginUser login user
* @return queue state count
*/
- @ApiOperation(value = "countQueueState", notes = "COUNT_QUEUE_STATE_NOTES")
+ @Operation(summary = "countQueueState", description = "COUNT_QUEUE_STATE_NOTES")
@GetMapping(value = "/queue-count")
@ResponseStatus(HttpStatus.OK)
@ApiException(QUEUE_COUNT_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result countQueueState(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser) {
+ public Result countQueueState(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser) {
Map result = dataAnalysisService.countQueueState(loginUser);
return returnDataList(result);
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 9b4e3712408f..ad18d3c5e177 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
@@ -23,6 +23,11 @@
import static org.apache.dolphinscheduler.api.enums.Status.QUERY_RULE_LIST_ERROR;
import static org.apache.dolphinscheduler.api.enums.Status.QUERY_RULE_LIST_PAGING_ERROR;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Parameters;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.tags.Tag;
import org.apache.dolphinscheduler.api.exceptions.ApiException;
import org.apache.dolphinscheduler.api.service.DqExecuteResultService;
import org.apache.dolphinscheduler.api.service.DqRuleService;
@@ -31,7 +36,6 @@
import org.apache.dolphinscheduler.dao.entity.User;
import org.apache.dolphinscheduler.plugin.task.api.utils.ParameterUtils;
-import springfox.documentation.annotations.ApiIgnore;
import java.util.Map;
@@ -44,15 +48,11 @@
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiImplicitParam;
-import io.swagger.annotations.ApiImplicitParams;
-import io.swagger.annotations.ApiOperation;
/**
* data quality controller
*/
-@Api(tags = "DATA_QUALITY_SERVICE")
+@Tag(name = "DATA_QUALITY_SERVICE")
@RestController
@RequestMapping("/data-quality")
public class DataQualityController extends BaseController {
@@ -68,9 +68,9 @@ public class DataQualityController extends BaseController {
* @param ruleId ruleId
* @return from-create json
*/
- @ApiOperation(value = "getRuleFormCreateJson", notes = "GET_RULE_FORM_CREATE_JSON_NOTES")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "ruleId", value = "RULE_ID", dataTypeClass = int.class, example = "1")
+ @Operation(summary = "getRuleFormCreateJson", description = "GET_RULE_FORM_CREATE_JSON_NOTES")
+ @Parameters({
+ @Parameter(name = "ruleId", description = "RULE_ID", schema =@Schema( implementation = int.class, example = "1"))
})
@GetMapping(value = "/getRuleFormCreateJson")
@ResponseStatus(HttpStatus.OK)
@@ -89,19 +89,19 @@ public Result getRuleFormCreateJsonById(@RequestParam(value = "ruleId") int rule
* @param pageSize page size
* @return rule page
*/
- @ApiOperation(value = "queryRuleListPaging", notes = "QUERY_RULE_LIST_PAGING_NOTES")
- @ApiImplicitParams({
- @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")
+ @Operation(summary = "queryRuleListPaging", description = "QUERY_RULE_LIST_PAGING_NOTES")
+ @Parameters({
+ @Parameter(name = "searchVal", description = "SEARCH_VAL", schema =@Schema( implementation = String.class)),
+ @Parameter(name = "ruleType", description = "RULE_TYPE", schema =@Schema( implementation = int.class, example = "1")),
+ @Parameter(name = "startDate", description = "START_DATE", schema =@Schema( implementation = String.class)),
+ @Parameter(name = "endDate", description = "END_DATE", schema =@Schema( implementation = String.class)),
+ @Parameter(name = "pageNo", description = "PAGE_NO", schema =@Schema( implementation = int.class, example = "1")),
+ @Parameter(name = "pageSize", description = "PAGE_SIZE", schema =@Schema( implementation = int.class, example = "10"))
})
@GetMapping(value = "/rule/page")
@ResponseStatus(HttpStatus.OK)
@ApiException(QUERY_RULE_LIST_PAGING_ERROR)
- public Result queryRuleListPaging(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ public Result queryRuleListPaging(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@RequestParam(value = "searchVal", required = false) String searchVal,
@RequestParam(value = "ruleType", required = false) Integer ruleType,
@RequestParam(value = "startDate", required = false) String startTime,
@@ -121,7 +121,7 @@ public Result queryRuleListPaging(@ApiIgnore @RequestAttribute(value = Constants
* query all rule list
* @return rule list
*/
- @ApiOperation(value = "queryRuleList", notes = "QUERY_RULE_LIST_NOTES")
+ @Operation(summary = "queryRuleList", description = "QUERY_RULE_LIST_NOTES")
@GetMapping(value = "/ruleList")
@ResponseStatus(HttpStatus.OK)
@ApiException(QUERY_RULE_LIST_ERROR)
@@ -143,20 +143,20 @@ public Result queryRuleList() {
* @param pageSize pageSize
* @return
*/
- @ApiOperation(value = "queryExecuteResultListPaging", notes = "QUERY_EXECUTE_RESULT_LIST_PAGING_NOTES")
- @ApiImplicitParams({
- @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")
+ @Operation(summary = "queryExecuteResultListPaging", description = "QUERY_EXECUTE_RESULT_LIST_PAGING_NOTES")
+ @Parameters({
+ @Parameter(name = "searchVal", description = "SEARCH_VAL", schema =@Schema( implementation = String.class)),
+ @Parameter(name = "ruleType", description = "RULE_TYPE", schema =@Schema( implementation = int.class, example = "1")),
+ @Parameter(name = "state", description = "STATE", schema =@Schema( implementation = int.class, example = "1")),
+ @Parameter(name = "startDate", description = "START_DATE", schema =@Schema( implementation = String.class)),
+ @Parameter(name = "endDate", description = "END_DATE", schema =@Schema( implementation = String.class)),
+ @Parameter(name = "pageNo", description = "PAGE_NO", schema =@Schema( implementation = int.class, example = "1")),
+ @Parameter(name = "pageSize", description = "PAGE_SIZE", schema =@Schema( implementation = 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,
+ public Result queryExecuteResultListPaging(@Parameter(hidden = true) @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,
@@ -180,9 +180,9 @@ public Result queryExecuteResultListPaging(@ApiIgnore @RequestAttribute(value =
* @param datasourceId datasourceId
* @return result
*/
- @ApiOperation(value = "getDatasourceOptionsById", notes = "GET_DATASOURCE_OPTIONS_NOTES")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "datasourceId", value = "DATA_SOURCE_ID", dataTypeClass = int.class, example = "1")
+ @Operation(summary = "getDatasourceOptionsById", description = "GET_DATASOURCE_OPTIONS_NOTES")
+ @Parameters({
+ @Parameter(name = "datasourceId", description = "DATA_SOURCE_ID", schema =@Schema( implementation = 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 3d9961e99bc5..5fc0de1273e6 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
@@ -30,6 +30,11 @@
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.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Parameters;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.tags.Tag;
import org.apache.dolphinscheduler.api.aspect.AccessLogAnnotation;
import org.apache.dolphinscheduler.api.enums.Status;
import org.apache.dolphinscheduler.api.exceptions.ApiException;
@@ -44,8 +49,6 @@
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;
@@ -62,16 +65,10 @@
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;
-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
*/
-@Api(tags = "DATA_SOURCE_TAG")
+@Tag(name = "DATA_SOURCE_TAG")
@RestController
@RequestMapping("datasources")
public class DataSourceController extends BaseController {
@@ -87,13 +84,13 @@ public class DataSourceController extends BaseController {
* example: {"type":"MYSQL","name":"txx","note":"","host":"localhost","port":3306,"principal":"","javaSecurityKrb5Conf":"","loginUserKeytabUsername":"","loginUserKeytabPath":"","userName":"root","password":"xxx","database":"ds","connectType":"","other":{"serverTimezone":"GMT-8"},"id":2,"testFlag":0,"bindTestId":1}
* @return create result code
*/
- @ApiOperation(value = "createDataSource", notes = "CREATE_DATA_SOURCE_NOTES")
+ @Operation(summary = "createDataSource", description = "CREATE_DATA_SOURCE_NOTES")
@PostMapping()
@ResponseStatus(HttpStatus.CREATED)
@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) {
+ public Result createDataSource(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ @Parameter(name = "dataSourceParam", description = "DATA_SOURCE_PARAM", required = true) @RequestBody String jsonStr) {
BaseDataSourceParamDTO dataSourceParam = DataSourceUtils.buildDatasourceParam(jsonStr);
return dataSourceService.createDataSource(loginUser, dataSourceParam);
}
@@ -107,16 +104,16 @@ public Result createDataSource(@ApiIgnore @RequestAttribute(value = Constants.SE
* example: {"type":"MYSQL","name":"txx","note":"","host":"localhost","port":3306,"principal":"","javaSecurityKrb5Conf":"","loginUserKeytabUsername":"","loginUserKeytabPath":"","userName":"root","password":"xxx","database":"ds","connectType":"","other":{"serverTimezone":"GMT-8"},"id":2,"testFlag":0,"bindTestId":1}
* @return update result code
*/
- @ApiOperation(value = "updateDataSource", notes = "UPDATE_DATA_SOURCE_NOTES")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "id", value = "DATA_SOURCE_ID", required = true, dataTypeClass = int.class),
- @ApiImplicitParam(name = "dataSourceParam", value = "DATA_SOURCE_PARAM", required = true, dataTypeClass = BaseDataSourceParamDTO.class)
+ @Operation(summary = "updateDataSource", description = "UPDATE_DATA_SOURCE_NOTES")
+ @Parameters({
+ @Parameter(name = "id", description = "DATA_SOURCE_ID", required = true, schema =@Schema( implementation = int.class)),
+ @Parameter(name = "dataSourceParam", description = "DATA_SOURCE_PARAM", required = true, schema =@Schema( implementation = BaseDataSourceParamDTO.class))
})
@PutMapping(value = "/{id}")
@ResponseStatus(HttpStatus.OK)
@ApiException(UPDATE_DATASOURCE_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result updateDataSource(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ public Result updateDataSource(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@PathVariable(value = "id") Integer id,
@RequestBody String jsonStr) {
BaseDataSourceParamDTO dataSourceParam = DataSourceUtils.buildDatasourceParam(jsonStr);
@@ -131,16 +128,16 @@ public Result updateDataSource(@ApiIgnore @RequestAttribute(value = Constants.SE
* @param id datasource id
* @return data source detail
*/
- @ApiOperation(value = "queryDataSource", notes = "QUERY_DATA_SOURCE_NOTES")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "id", value = "DATA_SOURCE_ID", required = true, dataTypeClass = int.class, example = "100")
+ @Operation(summary = "queryDataSource", description = "QUERY_DATA_SOURCE_NOTES")
+ @Parameters({
+ @Parameter(name = "id", description = "DATA_SOURCE_ID", required = true, schema =@Schema( implementation = int.class, example = "100"))
})
@GetMapping(value = "/{id}")
@ResponseStatus(HttpStatus.OK)
@ApiException(QUERY_DATASOURCE_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result queryDataSource(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ public Result queryDataSource(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@PathVariable("id") int id) {
Map result = dataSourceService.queryDataSource(id);
@@ -154,16 +151,16 @@ public Result queryDataSource(@ApiIgnore @RequestAttribute(value = Constants.SES
* @param type data source type
* @return data source list page
*/
- @ApiOperation(value = "queryDataSourceList", notes = "QUERY_DATA_SOURCE_LIST_BY_TYPE_NOTES")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "type", value = "DB_TYPE", required = true, dataType = "DbType"),
- @ApiImplicitParam(name = "testFlag", value = "DB_TEST_FLAG", required = true, dataType = "DbTestFlag")
+ @Operation(summary = "queryDataSourceList", description = "QUERY_DATA_SOURCE_LIST_BY_TYPE_NOTES")
+ @Parameters({
+ @Parameter(name = "type", description = "DB_TYPE", required = true, schema = @Schema (implementation = DbType.class)),
+ @Parameter(name = "testFlag", description = "DB_TEST_FLAG", required = true, schema = @Schema (implementation = int.class))
})
@GetMapping(value = "/list")
@ResponseStatus(HttpStatus.OK)
@ApiException(QUERY_DATASOURCE_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result queryDataSourceList(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ public Result queryDataSourceList(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@RequestParam("type") DbType type,
@RequestParam("testFlag") int testFlag) {
Map result = dataSourceService.queryDataSourceList(loginUser, type.ordinal(), testFlag);
@@ -179,17 +176,17 @@ public Result queryDataSourceList(@ApiIgnore @RequestAttribute(value = Constants
* @param pageSize page size
* @return data source list page
*/
- @ApiOperation(value = "queryDataSourceListPaging", notes = "QUERY_DATA_SOURCE_LIST_PAGING_NOTES")
- @ApiImplicitParams({
- @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")
+ @Operation(summary = "queryDataSourceListPaging", description = "QUERY_DATA_SOURCE_LIST_PAGING_NOTES")
+ @Parameters({
+ @Parameter(name = "searchVal", description = "SEARCH_VAL", schema =@Schema( implementation = String.class)),
+ @Parameter(name = "pageNo", description = "PAGE_NO", required = true, schema =@Schema( implementation = int.class, example = "1")),
+ @Parameter(name = "pageSize", description = "PAGE_SIZE", required = true, schema =@Schema( implementation = int.class, example = "20"))
})
@GetMapping()
@ResponseStatus(HttpStatus.OK)
@ApiException(QUERY_DATASOURCE_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result queryDataSourceListPaging(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ public Result queryDataSourceListPaging(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@RequestParam(value = "searchVal", required = false) String searchVal,
@RequestParam("pageNo") Integer pageNo,
@RequestParam("pageSize") Integer pageSize) {
@@ -209,12 +206,12 @@ public Result queryDataSourceListPaging(@ApiIgnore @RequestAttribute(value = Con
* example: {"type":"MYSQL","name":"txx","note":"","host":"localhost","port":3306,"principal":"","javaSecurityKrb5Conf":"","loginUserKeytabUsername":"","loginUserKeytabPath":"","userName":"root","password":"xxx","database":"ds","connectType":"","other":{"serverTimezone":"GMT-8"},"id":2}
* @return connect result code
*/
- @ApiOperation(value = "connectDataSource", notes = "CONNECT_DATA_SOURCE_NOTES")
+ @Operation(summary = "connectDataSource", description = "CONNECT_DATA_SOURCE_NOTES")
@PostMapping(value = "/connect")
@ResponseStatus(HttpStatus.OK)
@ApiException(CONNECT_DATASOURCE_FAILURE)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result connectDataSource(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ public Result connectDataSource(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@io.swagger.v3.oas.annotations.parameters.RequestBody(description = "dataSourceParam") @RequestBody String jsonStr) {
BaseDataSourceParamDTO dataSourceParam = DataSourceUtils.buildDatasourceParam(jsonStr);
DataSourceUtils.checkDatasourceParam(dataSourceParam);
@@ -229,15 +226,15 @@ public Result connectDataSource(@ApiIgnore @RequestAttribute(value = Constants.S
* @param id data source id
* @return connect result code
*/
- @ApiOperation(value = "connectionTest", notes = "CONNECT_DATA_SOURCE_TEST_NOTES")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "id", value = "DATA_SOURCE_ID", required = true, dataTypeClass = int.class, example = "100")
+ @Operation(summary = "connectionTest", description = "CONNECT_DATA_SOURCE_TEST_NOTES")
+ @Parameters({
+ @Parameter(name = "id", description = "DATA_SOURCE_ID", required = true, schema =@Schema( implementation = int.class, example = "100"))
})
@GetMapping(value = "/{id}/connect-test")
@ResponseStatus(HttpStatus.OK)
@ApiException(CONNECTION_TEST_FAILURE)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result connectionTest(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ public Result connectionTest(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@PathVariable("id") int id) {
return dataSourceService.connectionTest(id);
}
@@ -249,15 +246,15 @@ public Result connectionTest(@ApiIgnore @RequestAttribute(value = Constants.SESS
* @param id datasource id
* @return delete result
*/
- @ApiOperation(value = "deleteDataSource", notes = "DELETE_DATA_SOURCE_NOTES")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "id", value = "DATA_SOURCE_ID", required = true, dataTypeClass = int.class, example = "100")
+ @Operation(summary = "deleteDataSource", description = "DELETE_DATA_SOURCE_NOTES")
+ @Parameters({
+ @Parameter(name = "id", description = "DATA_SOURCE_ID", required = true, schema =@Schema( implementation = 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,
+ public Result deleteDataSource(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@PathVariable("id") int id) {
return dataSourceService.delete(loginUser, id);
}
@@ -269,15 +266,15 @@ public Result deleteDataSource(@ApiIgnore @RequestAttribute(value = Constants.SE
* @param name data source name
* @return true if data source name not exists.otherwise return false
*/
- @ApiOperation(value = "verifyDataSourceName", notes = "VERIFY_DATA_SOURCE_NOTES")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "name", value = "DATA_SOURCE_NAME", required = true, dataTypeClass = String.class)
+ @Operation(summary = "verifyDataSourceName", description = "VERIFY_DATA_SOURCE_NOTES")
+ @Parameters({
+ @Parameter(name = "name", description = "DATA_SOURCE_NAME", required = true, schema =@Schema( implementation = 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,
+ public Result verifyDataSourceName(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@RequestParam(value = "name") String name) {
return dataSourceService.verifyDataSourceName(name);
}
@@ -289,15 +286,15 @@ public Result verifyDataSourceName(@ApiIgnore @RequestAttribute(value = Constant
* @param userId user id
* @return unauthed data source result code
*/
- @ApiOperation(value = "unauthDatasource", notes = "UNAUTHORIZED_DATA_SOURCE_NOTES")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "userId", value = "USER_ID", required = true, dataTypeClass = int.class, example = "100")
+ @Operation(summary = "unauthDatasource", description = "UNAUTHORIZED_DATA_SOURCE_NOTES")
+ @Parameters({
+ @Parameter(name = "userId", description = "USER_ID", required = true, schema =@Schema( implementation = int.class, example = "100"))
})
@GetMapping(value = "/unauth-datasource")
@ResponseStatus(HttpStatus.OK)
@ApiException(UNAUTHORIZED_DATASOURCE)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result unauthDatasource(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ public Result unauthDatasource(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@RequestParam("userId") Integer userId) {
Map result = dataSourceService.unauthDatasource(loginUser, userId);
@@ -311,15 +308,15 @@ public Result unauthDatasource(@ApiIgnore @RequestAttribute(value = Constants.SE
* @param userId user id
* @return authorized result code
*/
- @ApiOperation(value = "authedDatasource", notes = "AUTHORIZED_DATA_SOURCE_NOTES")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "userId", value = "USER_ID", required = true, dataTypeClass = int.class, example = "100")
+ @Operation(summary = "authedDatasource", description = "AUTHORIZED_DATA_SOURCE_NOTES")
+ @Parameters({
+ @Parameter(name = "userId", description = "USER_ID", required = true, schema =@Schema( implementation = int.class, example = "100"))
})
@GetMapping(value = "/authed-datasource")
@ResponseStatus(HttpStatus.OK)
@ApiException(AUTHORIZED_DATA_SOURCE)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result authedDatasource(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ public Result authedDatasource(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@RequestParam("userId") Integer userId) {
Map result = dataSourceService.authedDatasource(loginUser, userId);
@@ -332,19 +329,19 @@ public Result authedDatasource(@ApiIgnore @RequestAttribute(value = Constants.SE
* @param loginUser login user
* @return user info data
*/
- @ApiOperation(value = "getKerberosStartupState", notes = "GET_USER_INFO_NOTES")
+ @Operation(summary = "getKerberosStartupState", description = "GET_USER_INFO_NOTES")
@GetMapping(value = "/kerberos-startup-state")
@ResponseStatus(HttpStatus.OK)
@ApiException(KERBEROS_STARTUP_STATE)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result getKerberosStartupState(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser) {
+ public Result getKerberosStartupState(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser) {
// if upload resource is HDFS and kerberos startup is true , else false
return success(Status.SUCCESS.getMsg(), CommonUtils.getKerberosStartupState());
}
- @ApiOperation(value = "tables", notes = "GET_DATASOURCE_TABLES_NOTES")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "datasourceId", value = "DATA_SOURCE_ID", required = true, dataTypeClass = int.class, example = "1")
+ @Operation(summary = "tables", description = "GET_DATASOURCE_TABLES_NOTES")
+ @Parameters({
+ @Parameter(name = "datasourceId", description = "DATA_SOURCE_ID", required = true, schema =@Schema( implementation = int.class, example = "1"))
})
@GetMapping(value = "/tables")
@ResponseStatus(HttpStatus.OK)
@@ -354,10 +351,10 @@ public Result getTables(@RequestParam("datasourceId") Integer datasourceId) {
return returnDataList(result);
}
- @ApiOperation(value = "tableColumns", notes = "GET_DATASOURCE_TABLE_COLUMNS_NOTES")
- @ApiImplicitParams({
- @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")
+ @Operation(summary = "tableColumns", description = "GET_DATASOURCE_TABLE_COLUMNS_NOTES")
+ @Parameters({
+ @Parameter(name = "datasourceId", description = "DATA_SOURCE_ID", required = true, schema =@Schema( implementation = int.class, example = "1")),
+ @Parameter(name = "tableName", description = "TABLE_NAME", required = true, schema =@Schema( implementation = String.class, example = "test"))
})
@GetMapping(value = "/tableColumns")
@ResponseStatus(HttpStatus.OK)
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 fb1bf113801a..05f57a77f7df 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
@@ -24,6 +24,11 @@
import static org.apache.dolphinscheduler.api.enums.Status.UPDATE_ENVIRONMENT_ERROR;
import static org.apache.dolphinscheduler.api.enums.Status.VERIFY_ENVIRONMENT_ERROR;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Parameters;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.tags.Tag;
import org.apache.dolphinscheduler.api.aspect.AccessLogAnnotation;
import org.apache.dolphinscheduler.api.exceptions.ApiException;
import org.apache.dolphinscheduler.api.service.EnvironmentService;
@@ -32,8 +37,6 @@
import org.apache.dolphinscheduler.dao.entity.User;
import org.apache.dolphinscheduler.plugin.task.api.utils.ParameterUtils;
-import springfox.documentation.annotations.ApiIgnore;
-
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
@@ -46,15 +49,10 @@
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiImplicitParam;
-import io.swagger.annotations.ApiImplicitParams;
-import io.swagger.annotations.ApiOperation;
-
/**
* environment controller
*/
-@Api(tags = "ENVIRONMENT_TAG")
+@Tag(name = "ENVIRONMENT_TAG")
@RestController
@RequestMapping("environment")
public class EnvironmentController extends BaseController {
@@ -71,18 +69,18 @@ public class EnvironmentController extends BaseController {
* @param description description
* @return returns an error if it exists
*/
- @ApiOperation(value = "createEnvironment", notes = "CREATE_ENVIRONMENT_NOTES")
- @ApiImplicitParams({
- @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)
+ @Operation(summary = "createEnvironment", description = "CREATE_ENVIRONMENT_NOTES")
+ @Parameters({
+ @Parameter(name = "name", description = "ENVIRONMENT_NAME", required = true, schema =@Schema( implementation = String.class)),
+ @Parameter(name = "config", description = "CONFIG", required = true, schema =@Schema( implementation = String.class)),
+ @Parameter(name = "description", description = "ENVIRONMENT_DESC", schema =@Schema( implementation = String.class)),
+ @Parameter(name = "workerGroups", description = "WORKER_GROUP_LIST", schema =@Schema( implementation = 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,
+ public Result createEnvironment(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@RequestParam("name") String name,
@RequestParam("config") String config,
@RequestParam(value = "description", required = false) String description,
@@ -103,19 +101,19 @@ public Result createEnvironment(@ApiIgnore @RequestAttribute(value = Constants.S
* @param description description
* @return update result code
*/
- @ApiOperation(value = "updateEnvironment", notes = "UPDATE_ENVIRONMENT_NOTES")
- @ApiImplicitParams({
- @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)
+ @Operation(summary = "updateEnvironment", description = "UPDATE_ENVIRONMENT_NOTES")
+ @Parameters({
+ @Parameter(name = "code", description = "ENVIRONMENT_CODE", required = true, schema =@Schema( implementation = long.class, example = "100")),
+ @Parameter(name = "name", description = "ENVIRONMENT_NAME", required = true, schema =@Schema( implementation = String.class)),
+ @Parameter(name = "config", description = "ENVIRONMENT_CONFIG", required = true, schema =@Schema( implementation = String.class)),
+ @Parameter(name = "description", description = "ENVIRONMENT_DESC", schema =@Schema( implementation = String.class)),
+ @Parameter(name = "workerGroups", description = "WORKER_GROUP_LIST", schema =@Schema( implementation = String.class))
})
@PostMapping(value = "/update")
@ResponseStatus(HttpStatus.OK)
@ApiException(UPDATE_ENVIRONMENT_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result updateEnvironment(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ public Result updateEnvironment(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@RequestParam("code") Long code,
@RequestParam("name") String name,
@RequestParam("config") String config,
@@ -132,15 +130,15 @@ public Result updateEnvironment(@ApiIgnore @RequestAttribute(value = Constants.S
* @param environmentCode environment code
* @return environment detail information
*/
- @ApiOperation(value = "queryEnvironmentByCode", notes = "QUERY_ENVIRONMENT_BY_CODE_NOTES")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "environmentCode", value = "ENVIRONMENT_CODE", required = true, dataTypeClass = long.class, example = "100")
+ @Operation(summary = "queryEnvironmentByCode", description = "QUERY_ENVIRONMENT_BY_CODE_NOTES")
+ @Parameters({
+ @Parameter(name = "environmentCode", description = "ENVIRONMENT_CODE", required = true, schema =@Schema( implementation = 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,
+ public Result queryEnvironmentByCode(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@RequestParam("environmentCode") Long environmentCode) {
Map result = environmentService.queryEnvironmentByCode(environmentCode);
@@ -155,17 +153,17 @@ public Result queryEnvironmentByCode(@ApiIgnore @RequestAttribute(value = Consta
* @param pageNo page number
* @return environment list which the login user have permission to see
*/
- @ApiOperation(value = "queryEnvironmentListPaging", notes = "QUERY_ENVIRONMENT_LIST_PAGING_NOTES")
- @ApiImplicitParams({
- @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")
+ @Operation(summary = "queryEnvironmentListPaging", description = "QUERY_ENVIRONMENT_LIST_PAGING_NOTES")
+ @Parameters({
+ @Parameter(name = "searchVal", description = "SEARCH_VAL", schema =@Schema( implementation = String.class)),
+ @Parameter(name = "pageSize", description = "PAGE_SIZE", required = true, schema =@Schema( implementation = int.class, example = "20")),
+ @Parameter(name = "pageNo", description = "PAGE_NO", required = true, schema =@Schema( implementation = 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,
+ public Result queryEnvironmentListPaging(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@RequestParam(value = "searchVal", required = false) String searchVal,
@RequestParam("pageSize") Integer pageSize,
@RequestParam("pageNo") Integer pageNo) {
@@ -186,15 +184,15 @@ public Result queryEnvironmentListPaging(@ApiIgnore @RequestAttribute(value = Co
* @param environmentCode environment code
* @return delete result code
*/
- @ApiOperation(value = "deleteEnvironmentByCode", notes = "DELETE_ENVIRONMENT_BY_CODE_NOTES")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "environmentCode", value = "ENVIRONMENT_CODE", required = true, dataTypeClass = long.class, example = "100")
+ @Operation(summary = "deleteEnvironmentByCode", description = "DELETE_ENVIRONMENT_BY_CODE_NOTES")
+ @Parameters({
+ @Parameter(name = "environmentCode", description = "ENVIRONMENT_CODE", required = true, schema =@Schema( implementation = 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,
+ public Result deleteEnvironment(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@RequestParam("environmentCode") Long environmentCode) {
Map result = environmentService.deleteEnvironmentByCode(loginUser, environmentCode);
@@ -207,12 +205,12 @@ public Result deleteEnvironment(@ApiIgnore @RequestAttribute(value = Constants.S
* @param loginUser login user
* @return all environment list
*/
- @ApiOperation(value = "queryAllEnvironmentList", notes = "QUERY_ALL_ENVIRONMENT_LIST_NOTES")
+ @Operation(summary = "queryAllEnvironmentList", description = "QUERY_ALL_ENVIRONMENT_LIST_NOTES")
@GetMapping(value = "/query-environment-list")
@ResponseStatus(HttpStatus.OK)
@ApiException(QUERY_ENVIRONMENT_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result queryAllEnvironmentList(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser) {
+ public Result queryAllEnvironmentList(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser) {
Map result = environmentService.queryAllEnvironmentList(loginUser);
return returnDataList(result);
}
@@ -224,15 +222,15 @@ public Result queryAllEnvironmentList(@ApiIgnore @RequestAttribute(value = Const
* @param environmentName environment name
* @return true if the environment name not exists, otherwise return false
*/
- @ApiOperation(value = "verifyEnvironment", notes = "VERIFY_ENVIRONMENT_NOTES")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "environmentName", value = "ENVIRONMENT_NAME", required = true, dataTypeClass = String.class)
+ @Operation(summary = "verifyEnvironment", description = "VERIFY_ENVIRONMENT_NOTES")
+ @Parameters({
+ @Parameter(name = "environmentName", description = "ENVIRONMENT_NAME", required = true, schema =@Schema( implementation = 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,
+ public Result verifyEnvironment(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@RequestParam(value = "environmentName") String environmentName) {
Map 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 f672702b8546..12f37015943d 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
@@ -23,6 +23,11 @@
import static org.apache.dolphinscheduler.api.enums.Status.QUERY_EXECUTING_WORKFLOW_ERROR;
import static org.apache.dolphinscheduler.api.enums.Status.START_PROCESS_INSTANCE_ERROR;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Parameters;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.tags.Tag;
import org.apache.dolphinscheduler.api.aspect.AccessLogAnnotation;
import org.apache.dolphinscheduler.api.enums.ExecuteType;
import org.apache.dolphinscheduler.api.enums.Status;
@@ -41,8 +46,6 @@
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;
@@ -66,16 +69,10 @@
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;
-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;
-
/**
* executor controller
*/
-@Api(tags = "EXECUTOR_TAG")
+@Tag(name = "EXECUTOR_TAG")
@RestController
@RequestMapping("projects/{projectCode}/executors")
public class ExecutorController extends BaseController {
@@ -106,32 +103,32 @@ public class ExecutorController extends BaseController {
* @param testFlag testFlag
* @return start process result code
*/
- @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 = "testFlag", value = "TEST_FLAG", dataType = "Int", example = "0"),
- @ApiImplicitParam(name = "complementDependentMode", value = "COMPLEMENT_DEPENDENT_MODE", dataType = "complementDependentMode")
+ @Operation(summary = "startProcessInstance", description = "RUN_PROCESS_INSTANCE_NOTES")
+ @Parameters({
+ @Parameter(name = "processDefinitionCode", description = "PROCESS_DEFINITION_CODE", required = true, schema =@Schema( implementation = Long.class), example = "100"),
+ @Parameter(name = "scheduleTime", description = "SCHEDULE_TIME", required = true, schema =@Schema( implementation = String.class), example = "2022-04-06 00:00:00,2022-04-06 00:00:00"),
+ @Parameter(name = "failureStrategy", description = "FAILURE_STRATEGY", required = true, schema =@Schema( implementation = FailureStrategy.class)),
+ @Parameter(name = "startNodeList", description = "START_NODE_LIST", schema =@Schema( implementation = String.class)),
+ @Parameter(name = "taskDependType", description = "TASK_DEPEND_TYPE", schema =@Schema( implementation = TaskDependType.class)),
+ @Parameter(name = "execType", description = "COMMAND_TYPE", schema =@Schema( implementation = CommandType.class)),
+ @Parameter(name = "warningType", description = "WARNING_TYPE", required = true, schema =@Schema( implementation = WarningType.class)),
+ @Parameter(name = "warningGroupId", description = "WARNING_GROUP_ID", schema =@Schema( implementation = int.class, example = "100")),
+ @Parameter(name = "runMode", description = "RUN_MODE", schema =@Schema( implementation = RunMode.class)),
+ @Parameter(name = "processInstancePriority", description = "PROCESS_INSTANCE_PRIORITY", required = true, schema =@Schema( implementation = Priority.class)),
+ @Parameter(name = "workerGroup", description = "WORKER_GROUP", schema =@Schema( implementation = String.class, example = "default")),
+ @Parameter(name = "environmentCode", description = "ENVIRONMENT_CODE", schema =@Schema( implementation = Long.class, example = "-1")),
+ @Parameter(name = "timeout", description = "TIMEOUT", schema =@Schema( implementation = int.class, example = "100")),
+ @Parameter(name = "expectedParallelismNumber", description = "EXPECTED_PARALLELISM_NUMBER", schema =@Schema( implementation = int.class , example = "8")),
+ @Parameter(name = "dryRun", description = "DRY_RUN", schema =@Schema( implementation = int.class, example = "0")),
+ @Parameter(name = "testFlag", description = "TEST_FLAG", schema =@Schema( implementation = int.class, example = "0")),
+ @Parameter(name = "complementDependentMode", description = "COMPLEMENT_DEPENDENT_MODE", schema =@Schema( implementation = ComplementDependentMode.class))
})
@PostMapping(value = "start-process-instance")
@ResponseStatus(HttpStatus.OK)
@ApiException(START_PROCESS_INSTANCE_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result startProcessInstance(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
- @ApiParam(name = "projectCode", value = "PROJECT_CODE", required = true) @PathVariable long projectCode,
+ public Result startProcessInstance(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true) @PathVariable long projectCode,
@RequestParam(value = "processDefinitionCode") long processDefinitionCode,
@RequestParam(value = "scheduleTime") String scheduleTime,
@RequestParam(value = "failureStrategy") FailureStrategy failureStrategy,
@@ -194,32 +191,32 @@ public Result startProcessInstance(@ApiIgnore @RequestAttribute(value = Constant
* @param testFlag testFlag
* @return start process result code
*/
- @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 = "testFlag", value = "TEST_FLAG", dataType = "Int", example = "0"),
- @ApiImplicitParam(name = "complementDependentMode", value = "COMPLEMENT_DEPENDENT_MODE", dataType = "complementDependentMode")
+ @Operation(summary = "batchStartProcessInstance", description = "BATCH_RUN_PROCESS_INSTANCE_NOTES")
+ @Parameters({
+ @Parameter(name = "processDefinitionCodes", description = "PROCESS_DEFINITION_CODES", required = true, schema =@Schema( implementation = String.class, example = "1,2,3")),
+ @Parameter(name = "scheduleTime", description = "SCHEDULE_TIME", required = true, schema =@Schema( implementation = String.class, example = "2022-04-06 00:00:00,2022-04-06 00:00:00")),
+ @Parameter(name = "failureStrategy", description = "FAILURE_STRATEGY", required = true, schema =@Schema( implementation = FailureStrategy.class)),
+ @Parameter(name = "startNodeList", description = "START_NODE_LIST", schema =@Schema( implementation = String.class)),
+ @Parameter(name = "taskDependType", description = "TASK_DEPEND_TYPE", schema =@Schema( implementation = TaskDependType.class)),
+ @Parameter(name = "execType", description = "COMMAND_TYPE", schema =@Schema( implementation = CommandType.class)),
+ @Parameter(name = "warningType", description = "WARNING_TYPE", required = true, schema =@Schema( implementation = WarningType.class)),
+ @Parameter(name = "warningGroupId", description = "WARNING_GROUP_ID", required = true, schema =@Schema( implementation = int.class, example = "100")),
+ @Parameter(name = "runMode", description = "RUN_MODE", schema =@Schema( implementation = RunMode.class)),
+ @Parameter(name = "processInstancePriority", description = "PROCESS_INSTANCE_PRIORITY", required = true, schema =@Schema( implementation = Priority.class)),
+ @Parameter(name = "workerGroup", description = "WORKER_GROUP", schema =@Schema( implementation = String.class, example = "default")),
+ @Parameter(name = "environmentCode", description = "ENVIRONMENT_CODE", schema =@Schema( implementation = Long.class, example = "-1")),
+ @Parameter(name = "timeout", description = "TIMEOUT", schema =@Schema( implementation = int.class, example = "100")),
+ @Parameter(name = "expectedParallelismNumber", description = "EXPECTED_PARALLELISM_NUMBER", schema =@Schema( implementation = int.class, example = "8")),
+ @Parameter(name = "dryRun", description = "DRY_RUN", schema =@Schema( implementation = int.class, example = "0")),
+ @Parameter(name = "testFlag", description = "TEST_FLAG", schema =@Schema( implementation = int.class, example = "0")),
+ @Parameter(name = "complementDependentMode", description = "COMPLEMENT_DEPENDENT_MODE", schema =@Schema( implementation = ComplementDependentMode.class))
})
@PostMapping(value = "batch-start-process-instance")
@ResponseStatus(HttpStatus.OK)
@ApiException(START_PROCESS_INSTANCE_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result batchStartProcessInstance(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
- @ApiParam(name = "projectCode", value = "PROJECT_CODE", required = true) @PathVariable long projectCode,
+ public Result batchStartProcessInstance(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true) @PathVariable long projectCode,
@RequestParam(value = "processDefinitionCodes") String processDefinitionCodes,
@RequestParam(value = "scheduleTime") String scheduleTime,
@RequestParam(value = "failureStrategy") FailureStrategy failureStrategy,
@@ -272,9 +269,10 @@ public Result batchStartProcessInstance(@ApiIgnore @RequestAttribute(value = Con
logger.error("Process definition start failed, projectCode:{}, processDefinitionCode:{}.", projectCode,
processDefinitionCode);
startFailedProcessDefinitionCodeList.add(String.valueOf(processDefinitionCode));
- } else
+ } else {
logger.info("Start process definition complete, projectCode:{}, processDefinitionCode:{}.", projectCode,
processDefinitionCode);
+ }
}
if (!startFailedProcessDefinitionCodeList.isEmpty()) {
@@ -294,21 +292,21 @@ public Result batchStartProcessInstance(@ApiIgnore @RequestAttribute(value = Con
* @param executeType execute type
* @return execute result code
*/
- @ApiOperation(value = "execute", notes = "EXECUTE_ACTION_TO_PROCESS_INSTANCE_NOTES")
- @ApiImplicitParams({
- @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)
+ @Operation(summary = "execute", description = "EXECUTE_ACTION_TO_PROCESS_INSTANCE_NOTES")
+ @Parameters({
+ @Parameter(name = "processInstanceId", description = "PROCESS_INSTANCE_ID", required = true, schema =@Schema( implementation = int.class, example = "100")),
+ @Parameter(name = "executeType", description = "EXECUTE_TYPE", required = true, schema =@Schema( implementation = ExecuteType.class))
})
@PostMapping(value = "/execute")
@ResponseStatus(HttpStatus.OK)
@ApiException(EXECUTE_PROCESS_INSTANCE_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result execute(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
- @ApiParam(name = "projectCode", value = "PROJECT_CODE", required = true) @PathVariable long projectCode,
+ public Result execute(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true) @PathVariable long projectCode,
@RequestParam("processInstanceId") Integer processInstanceId,
- @RequestParam("executeType") ExecuteType executeType) {
- logger.info("Start to execute process instance, projectCode:{}, processInstanceId:{}.", projectCode,
- processInstanceId);
+ @RequestParam("executeType") ExecuteType executeType
+ ) {
+ logger.info("Start to execute process instance, projectCode:{}, processInstanceId:{}.", projectCode, processInstanceId);
Map result = execService.execute(loginUser, projectCode, processInstanceId, executeType);
return returnDataList(result);
}
@@ -322,11 +320,11 @@ public Result execute(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USE
* @param executeType execute type
* @return execute result code
*/
- @ApiOperation(value = "batchExecute", notes = "BATCH_EXECUTE_ACTION_TO_PROCESS_INSTANCE_NOTES")
- @ApiImplicitParams({
- @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)
+ @Operation(summary = "batchExecute", description = "BATCH_EXECUTE_ACTION_TO_PROCESS_INSTANCE_NOTES")
+ @Parameters({
+ @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true, schema =@Schema( implementation = int.class)),
+ @Parameter(name = "processInstanceIds", description = "PROCESS_INSTANCE_IDS", required = true, schema =@Schema( implementation = String.class)),
+ @Parameter(name = "executeType", description = "EXECUTE_TYPE", required = true, schema =@Schema( implementation = ExecuteType.class))
})
@PostMapping(value = "/batch-execute")
@ResponseStatus(HttpStatus.OK)
@@ -373,9 +371,9 @@ public Result batchExecute(@RequestAttribute(value = Constants.SESSION_USER) Use
* @param processDefinitionCode process definition code
* @return check result code
*/
- @ApiOperation(value = "startCheckProcessDefinition", notes = "START_CHECK_PROCESS_DEFINITION_NOTES")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "processDefinitionCode", value = "PROCESS_DEFINITION_CODE", required = true, dataTypeClass = long.class, example = "100")
+ @Operation(summary = "startCheckProcessDefinition", description = "START_CHECK_PROCESS_DEFINITION_NOTES")
+ @Parameters({
+ @Parameter(name = "processDefinitionCode", description = "PROCESS_DEFINITION_CODE", required = true, schema =@Schema( implementation = long.class, example = "100"))
})
@PostMapping(value = "/start-check")
@ResponseStatus(HttpStatus.OK)
@@ -389,9 +387,9 @@ public Result startCheckProcessDefinition(@RequestParam(value = "processDefiniti
/**
* query execute data of processInstance from master
*/
- @ApiOperation(value = "queryExecutingWorkflow", notes = "QUERY_WORKFLOW_EXECUTE_DATA")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "processInstanceId", value = "PROCESS_INSTANCE_ID", required = true, dataTypeClass = int.class, example = "100")
+ @Operation(summary = "queryExecutingWorkflow", description = "QUERY_WORKFLOW_EXECUTE_DATA")
+ @Parameters({
+ @Parameter(name = "processInstanceId", description = "PROCESS_INSTANCE_ID", required = true, schema =@Schema( implementation = int.class, example = "100"))
})
@GetMapping(value = "/query-executing-workflow")
@ResponseStatus(HttpStatus.OK)
@@ -414,25 +412,25 @@ public Result queryExecutingWorkflow(@RequestParam("id") Integer processInstance
* @param workerGroup worker group
* @return start task result code
*/
- @ApiOperation(value = "startTaskInstance", notes = "RUN_TASK_INSTANCE_NOTES")
- @ApiImplicitParams({
- @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"),
+ @Operation(summary = "startTaskInstance", description = "RUN_TASK_INSTANCE_NOTES")
+ @Parameters({
+ @Parameter(name = "version", description = "VERSION", schema =@Schema( implementation = int.class, example = "1")),
+ @Parameter(name = "failureStrategy", description = "FAILURE_STRATEGY", required = true, schema =@Schema( implementation = FailureStrategy.class)),
+ @Parameter(name = "execType", description = "COMMAND_TYPE", schema =@Schema( implementation = CommandType.class)),
+ @Parameter(name = "warningType", description = "WARNING_TYPE", required = true, schema =@Schema( implementation = WarningType.class)),
+ @Parameter(name = "warningGroupId", description = "WARNING_GROUP_ID", schema =@Schema( implementation = int.class, example = "100")),
+ @Parameter(name = "workerGroup", description = "WORKER_GROUP", schema =@Schema( implementation = String.class, example = "default")),
+ @Parameter(name = "environmentCode", description = "ENVIRONMENT_CODE", schema =@Schema( implementation = long.class, example = "-1")),
+ @Parameter(name = "timeout", description = "TIMEOUT", schema =@Schema( implementation = int.class, example = "100")),
+ @Parameter(name = "dryRun", description = "DRY_RUN", schema =@Schema( implementation = 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,
+ public Result startStreamTaskInstance(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true) @PathVariable long projectCode,
+ @Parameter(name = "code", description = "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,
diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/FavTaskController.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/FavTaskController.java
index fb54b67283e9..69d5b6f0c302 100644
--- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/FavTaskController.java
+++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/FavTaskController.java
@@ -17,10 +17,9 @@
package org.apache.dolphinscheduler.api.controller;
-import static org.apache.dolphinscheduler.api.enums.Status.ADD_TASK_TYPE_ERROR;
-import static org.apache.dolphinscheduler.api.enums.Status.DELETE_TASK_TYPE_ERROR;
-import static org.apache.dolphinscheduler.api.enums.Status.LIST_TASK_TYPE_ERROR;
-
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.tags.Tag;
import org.apache.dolphinscheduler.api.aspect.AccessLogAnnotation;
import org.apache.dolphinscheduler.api.dto.FavTaskDto;
import org.apache.dolphinscheduler.api.enums.Status;
@@ -29,13 +28,6 @@
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.List;
-
-import javax.annotation.Resource;
-
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
@@ -46,13 +38,17 @@
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
+import javax.annotation.Resource;
+import java.util.List;
+
+import static org.apache.dolphinscheduler.api.enums.Status.ADD_TASK_TYPE_ERROR;
+import static org.apache.dolphinscheduler.api.enums.Status.DELETE_TASK_TYPE_ERROR;
+import static org.apache.dolphinscheduler.api.enums.Status.LIST_TASK_TYPE_ERROR;
/**
* fav controller
*/
-@Api(tags = "FAVOURITE")
+@Tag(name = "FAVOURITE")
@RestController
@RequestMapping("/favourite")
public class FavTaskController extends BaseController {
@@ -66,12 +62,12 @@ public class FavTaskController extends BaseController {
* @param loginUser login user
* @return task type list
*/
- @ApiOperation(value = "listTaskType", notes = "LIST_TASK_TYPE")
+ @Operation(summary = "listTaskType", description = "LIST_TASK_TYPE")
@GetMapping(value = "/taskTypes")
@ResponseStatus(HttpStatus.OK)
@ApiException(LIST_TASK_TYPE_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result listTaskType(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser) {
+ public Result listTaskType(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser) {
List favTaskList = favTaskService.getFavTaskList(loginUser);
return success(Status.SUCCESS.getMsg(), favTaskList);
}
@@ -82,12 +78,12 @@ public Result listTaskType(@ApiIgnore @RequestAttribute(value = Constants.SESSIO
* @param loginUser login user
* @return
*/
- @ApiOperation(value = "deleteTaskType", notes = "DELETE_TASK_TYPE")
+ @Operation(summary = "deleteTaskType", description = "DELETE_TASK_TYPE")
@DeleteMapping(value = "/{taskName}")
@ResponseStatus(HttpStatus.OK)
@ApiException(DELETE_TASK_TYPE_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result deleteFavTask(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ public Result deleteFavTask(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@PathVariable("taskName") String taskName) {
boolean b = favTaskService.deleteFavTask(loginUser, taskName);
return success(b);
@@ -99,12 +95,12 @@ public Result deleteFavTask(@ApiIgnore @RequestAttribute(value = Constants.SESSI
* @param loginUser login user
* @return
*/
- @ApiOperation(value = "addTaskType", notes = "ADD_TASK_TYPE")
+ @Operation(summary = "addTaskType", description = "ADD_TASK_TYPE")
@PostMapping(value = "/{taskName}")
@ResponseStatus(HttpStatus.OK)
@ApiException(ADD_TASK_TYPE_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result addFavTask(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ public Result addFavTask(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@PathVariable("taskName") String taskName) {
int i = favTaskService.addFavTask(loginUser, taskName);
return success(i > 0);
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 9e95fd0e0937..d8822f055e53 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
@@ -26,6 +26,11 @@
import static org.apache.dolphinscheduler.api.enums.Status.UPDATE_K8S_NAMESPACE_ERROR;
import static org.apache.dolphinscheduler.api.enums.Status.VERIFY_K8S_NAMESPACE_ERROR;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Parameters;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.tags.Tag;
import org.apache.dolphinscheduler.api.aspect.AccessLogAnnotation;
import org.apache.dolphinscheduler.api.exceptions.ApiException;
import org.apache.dolphinscheduler.api.service.K8sNamespaceService;
@@ -35,8 +40,6 @@
import org.apache.dolphinscheduler.dao.entity.User;
import org.apache.dolphinscheduler.plugin.task.api.utils.ParameterUtils;
-import springfox.documentation.annotations.ApiIgnore;
-
import java.util.List;
import java.util.Map;
@@ -52,15 +55,10 @@
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiImplicitParam;
-import io.swagger.annotations.ApiImplicitParams;
-import io.swagger.annotations.ApiOperation;
-
/**
* k8s namespace controller
*/
-@Api(tags = "K8S_NAMESPACE_TAG")
+@Tag(name = "K8S_NAMESPACE_TAG")
@RestController
@RequestMapping("/k8s-namespace")
public class K8sNamespaceController extends BaseController {
@@ -77,17 +75,17 @@ public class K8sNamespaceController extends BaseController {
* @param pageNo page number
* @return namespace list which the login user have permission to see
*/
- @ApiOperation(value = "queryNamespaceListPaging", notes = "QUERY_NAMESPACE_LIST_PAGING_NOTES")
- @ApiImplicitParams({
- @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")
+ @Operation(summary = "queryNamespaceListPaging", description = "QUERY_NAMESPACE_LIST_PAGING_NOTES")
+ @Parameters({
+ @Parameter(name = "searchVal", description = "SEARCH_VAL", schema =@Schema( implementation = String.class)),
+ @Parameter(name = "pageSize", description = "PAGE_SIZE", required = true, schema =@Schema( implementation = int.class, example = "10")),
+ @Parameter(name = "pageNo", description = "PAGE_NO", required = true, schema =@Schema( implementation = int.class, example = "1"))
})
@GetMapping()
@ResponseStatus(HttpStatus.OK)
@ApiException(QUERY_K8S_NAMESPACE_LIST_PAGING_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result queryNamespaceListPaging(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ public Result queryNamespaceListPaging(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@RequestParam(value = "searchVal", required = false) String searchVal,
@RequestParam("pageSize") Integer pageSize,
@RequestParam("pageNo") Integer pageNo) {
@@ -111,18 +109,18 @@ public Result queryNamespaceListPaging(@ApiIgnore @RequestAttribute(value = Cons
* @param limitsMemory max memory
* @return
*/
- @ApiOperation(value = "createK8sNamespace", notes = "CREATE_NAMESPACE_NOTES")
- @ApiImplicitParams({
- @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)
+ @Operation(summary = "createK8sNamespace", description = "CREATE_NAMESPACE_NOTES")
+ @Parameters({
+ @Parameter(name = "namespace", description = "NAMESPACE", required = true, schema =@Schema( implementation = String.class)),
+ @Parameter(name = "clusterCode", description = "CLUSTER_CODE", required = true, schema =@Schema( implementation = long.class)),
+ @Parameter(name = "limits_cpu", description = "LIMITS_CPU", required = false, schema =@Schema( implementation = double.class)),
+ @Parameter(name = "limits_memory", description = "LIMITS_MEMORY", required = false, schema =@Schema( implementation = int.class))
})
@PostMapping()
@ResponseStatus(HttpStatus.CREATED)
@ApiException(CREATE_K8S_NAMESPACE_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result createNamespace(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ public Result createNamespace(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@RequestParam(value = "namespace") String namespace,
@RequestParam(value = "clusterCode") Long clusterCode,
@RequestParam(value = "limitsCpu", required = false) Double limitsCpu,
@@ -141,17 +139,17 @@ public Result createNamespace(@ApiIgnore @RequestAttribute(value = Constants.SES
* @param limitsMemory max memory
* @return
*/
- @ApiOperation(value = "updateK8sNamespace", notes = "UPDATE_NAMESPACE_NOTES")
- @ApiImplicitParams({
- @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)})
+ @Operation(summary = "updateK8sNamespace", description = "UPDATE_NAMESPACE_NOTES")
+ @Parameters({
+ @Parameter(name = "id", description = "K8S_NAMESPACE_ID", required = true, schema =@Schema( implementation = int.class, example = "100")),
+ @Parameter(name = "userName", description = "OWNER", required = false, schema =@Schema( implementation = String.class)),
+ @Parameter(name = "limitsCpu", description = "LIMITS_CPU", required = false, schema =@Schema( implementation = double.class)),
+ @Parameter(name = "limitsMemory", description = "LIMITS_MEMORY", required = false, schema =@Schema( implementation = int.class))})
@PutMapping(value = "/{id}")
@ResponseStatus(HttpStatus.CREATED)
@ApiException(UPDATE_K8S_NAMESPACE_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result updateNamespace(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ public Result updateNamespace(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@PathVariable(value = "id") int id,
@RequestParam(value = "userName", required = false) String userName,
@RequestParam(value = "tag", required = false) String tag,
@@ -170,16 +168,16 @@ public Result updateNamespace(@ApiIgnore @RequestAttribute(value = Constants.SES
* @param clusterCode cluster code
* @return true if the k8s and namespace not exists, otherwise return false
*/
- @ApiOperation(value = "verifyNamespaceK8s", notes = "VERIFY_NAMESPACE_K8S_NOTES")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "namespace", value = "NAMESPACE", required = true, dataTypeClass = String.class),
- @ApiImplicitParam(name = "clusterCode", value = "CLUSTER_CODE", required = true, dataTypeClass = long.class),
+ @Operation(summary = "verifyNamespaceK8s", description = "VERIFY_NAMESPACE_K8S_NOTES")
+ @Parameters({
+ @Parameter(name = "namespace", description = "NAMESPACE", required = true, schema =@Schema( implementation = String.class)),
+ @Parameter(name = "clusterCode", description = "CLUSTER_CODE", required = true, schema =@Schema( implementation = long.class)),
})
@PostMapping(value = "/verify")
@ResponseStatus(HttpStatus.OK)
@ApiException(VERIFY_K8S_NAMESPACE_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result verifyNamespace(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ public Result verifyNamespace(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@RequestParam(value = "namespace") String namespace,
@RequestParam(value = "clusterCode") Long clusterCode) {
@@ -193,15 +191,15 @@ public Result verifyNamespace(@ApiIgnore @RequestAttribute(value = Constants.SES
* @param id namespace id
* @return delete result code
*/
- @ApiOperation(value = "delNamespaceById", notes = "DELETE_NAMESPACE_BY_ID_NOTES")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "id", value = "NAMESPACE_ID", required = true, dataTypeClass = int.class, example = "100")
+ @Operation(summary = "delNamespaceById", description = "DELETE_NAMESPACE_BY_ID_NOTES")
+ @Parameters({
+ @Parameter(name = "id", description = "NAMESPACE_ID", required = true, schema =@Schema( implementation = int.class, example = "100"))
})
@PostMapping(value = "/delete")
@ResponseStatus(HttpStatus.OK)
@ApiException(DELETE_K8S_NAMESPACE_BY_ID_ERROR)
@AccessLogAnnotation
- public Result delNamespaceById(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ public Result delNamespaceById(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@RequestParam(value = "id") int id) {
Map result = k8sNamespaceService.deleteNamespaceById(loginUser, id);
return returnDataList(result);
@@ -214,15 +212,15 @@ public Result delNamespaceById(@ApiIgnore @RequestAttribute(value = Constants.SE
* @param userId user id
* @return the namespaces which user have not permission to see
*/
- @ApiOperation(value = "queryUnauthorizedNamespace", notes = "QUERY_UNAUTHORIZED_NAMESPACE_NOTES")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "userId", value = "USER_ID", dataTypeClass = int.class, example = "100")
+ @Operation(summary = "queryUnauthorizedNamespace", description = "QUERY_UNAUTHORIZED_NAMESPACE_NOTES")
+ @Parameters({
+ @Parameter(name = "userId", description = "USER_ID", schema =@Schema( implementation = int.class, example = "100"))
})
@GetMapping(value = "/unauth-namespace")
@ResponseStatus(HttpStatus.OK)
@ApiException(QUERY_UNAUTHORIZED_NAMESPACE_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result queryUnauthorizedNamespace(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ public Result queryUnauthorizedNamespace(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@RequestParam("userId") Integer userId) {
Map result = k8sNamespaceService.queryUnauthorizedNamespace(loginUser, userId);
return returnDataList(result);
@@ -235,15 +233,15 @@ public Result queryUnauthorizedNamespace(@ApiIgnore @RequestAttribute(value = Co
* @param userId user id
* @return namespaces which the user have permission to see
*/
- @ApiOperation(value = "queryAuthorizedNamespace", notes = "QUERY_AUTHORIZED_NAMESPACE_NOTES")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "userId", value = "USER_ID", dataTypeClass = int.class, example = "100")
+ @Operation(summary = "queryAuthorizedNamespace", description = "QUERY_AUTHORIZED_NAMESPACE_NOTES")
+ @Parameters({
+ @Parameter(name = "userId", description = "USER_ID", schema =@Schema( implementation = int.class, example = "100"))
})
@GetMapping(value = "/authed-namespace")
@ResponseStatus(HttpStatus.OK)
@ApiException(QUERY_AUTHORIZED_NAMESPACE_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result queryAuthorizedNamespace(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ public Result queryAuthorizedNamespace(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@RequestParam("userId") Integer userId) {
Map result = k8sNamespaceService.queryAuthorizedNamespace(loginUser, userId);
return returnDataList(result);
@@ -255,12 +253,12 @@ public Result queryAuthorizedNamespace(@ApiIgnore @RequestAttribute(value = Cons
* @param loginUser login user
* @return namespace list
*/
- @ApiOperation(value = "queryAvailableNamespaceList", notes = "QUERY_AVAILABLE_NAMESPACE_LIST_NOTES")
+ @Operation(summary = "queryAvailableNamespaceList", description = "QUERY_AVAILABLE_NAMESPACE_LIST_NOTES")
@GetMapping(value = "/available-list")
@ResponseStatus(HttpStatus.OK)
@ApiException(QUERY_CAN_USE_K8S_NAMESPACE_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result queryAvailableNamespaceList(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser) {
+ public Result queryAvailableNamespaceList(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser) {
List result = k8sNamespaceService.queryNamespaceAvailable(loginUser);
return success(result);
}
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 6c9d49c75c25..23c1d953adc2 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
@@ -20,6 +20,11 @@
import static org.apache.dolphinscheduler.api.enums.Status.DOWNLOAD_TASK_INSTANCE_LOG_FILE_ERROR;
import static org.apache.dolphinscheduler.api.enums.Status.QUERY_TASK_INSTANCE_LOG_ERROR;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Parameters;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.tags.Tag;
import org.apache.dolphinscheduler.api.aspect.AccessLogAnnotation;
import org.apache.dolphinscheduler.api.exceptions.ApiException;
import org.apache.dolphinscheduler.api.service.LoggerService;
@@ -28,8 +33,6 @@
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;
@@ -43,16 +46,10 @@
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;
-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;
-
/**
* logger controller
*/
-@Api(tags = "LOGGER_TAG")
+@Tag(name = "LOGGER_TAG")
@RestController
@RequestMapping("/log")
public class LoggerController extends BaseController {
@@ -69,17 +66,17 @@ public class LoggerController extends BaseController {
* @param limit limit
* @return task log content
*/
- @ApiOperation(value = "queryLog", notes = "QUERY_TASK_INSTANCE_LOG_NOTES")
- @ApiImplicitParams({
- @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")
+ @Operation(summary = "queryLog", description = "QUERY_TASK_INSTANCE_LOG_NOTES")
+ @Parameters({
+ @Parameter(name = "taskInstanceId", description = "TASK_ID", required = true, schema =@Schema( implementation = int.class, example = "100")),
+ @Parameter(name = "skipLineNum", description = "SKIP_LINE_NUM", required = true, schema =@Schema( implementation = int.class, example = "100")),
+ @Parameter(name = "limit", description = "LIMIT", required = true, schema =@Schema( implementation = int.class, example = "100"))
})
@GetMapping(value = "/detail")
@ResponseStatus(HttpStatus.OK)
@ApiException(QUERY_TASK_INSTANCE_LOG_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result queryLog(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ public Result queryLog(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@RequestParam(value = "taskInstanceId") int taskInstanceId,
@RequestParam(value = "skipLineNum") int skipNum,
@RequestParam(value = "limit") int limit) {
@@ -93,15 +90,15 @@ public Result queryLog(@ApiIgnore @RequestAttribute(value = Con
* @param taskInstanceId task instance id
* @return log file content
*/
- @ApiOperation(value = "downloadTaskLog", notes = "DOWNLOAD_TASK_INSTANCE_LOG_NOTES")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "taskInstanceId", value = "TASK_ID", required = true, dataTypeClass = int.class, example = "100")
+ @Operation(summary = "downloadTaskLog", description = "DOWNLOAD_TASK_INSTANCE_LOG_NOTES")
+ @Parameters({
+ @Parameter(name = "taskInstanceId", description = "TASK_ID", required = true, schema =@Schema( implementation = int.class, example = "100"))
})
@GetMapping(value = "/download-log")
@ResponseBody
@ApiException(DOWNLOAD_TASK_INSTANCE_LOG_FILE_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public ResponseEntity downloadTaskLog(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ public ResponseEntity downloadTaskLog(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@RequestParam(value = "taskInstanceId") int taskInstanceId) {
byte[] logBytes = loggerService.getLogBytes(taskInstanceId);
return ResponseEntity
@@ -121,19 +118,19 @@ public ResponseEntity downloadTaskLog(@ApiIgnore @RequestAttribute(value = Const
* @param limit limit
* @return task log content
*/
- @ApiOperation(value = "queryLogInSpecifiedProject", notes = "QUERY_TASK_INSTANCE_LOG_IN_SPECIFIED_PROJECT_NOTES")
- @ApiImplicitParams({
- @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")
+ @Operation(summary = "queryLogInSpecifiedProject", description = "QUERY_TASK_INSTANCE_LOG_IN_SPECIFIED_PROJECT_NOTES")
+ @Parameters({
+ @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true, schema =@Schema( implementation = long.class)),
+ @Parameter(name = "taskInstanceId", description = "TASK_ID", required = true, schema =@Schema( implementation = int.class, example = "100")),
+ @Parameter(name = "skipLineNum", description = "SKIP_LINE_NUM", required = true, schema =@Schema( implementation = int.class, example = "100")),
+ @Parameter(name = "limit", description = "LIMIT", required = true, schema =@Schema( implementation = int.class, example = "100"))
})
@GetMapping(value = "/{projectCode}/detail")
@ResponseStatus(HttpStatus.OK)
@ApiException(QUERY_TASK_INSTANCE_LOG_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result queryLog(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
- @ApiParam(name = "projectCode", value = "PROJECT_CODE", required = true) @PathVariable long projectCode,
+ public Result queryLog(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true) @PathVariable long projectCode,
@RequestParam(value = "taskInstanceId") int taskInstanceId,
@RequestParam(value = "skipLineNum") int skipNum,
@RequestParam(value = "limit") int limit) {
@@ -148,17 +145,17 @@ public Result queryLog(@ApiIgnore @RequestAttribute(value = Constants.SE
* @param taskInstanceId task instance id
* @return log file content
*/
- @ApiOperation(value = "downloadTaskLogInSpecifiedProject", notes = "DOWNLOAD_TASK_INSTANCE_LOG_IN_SPECIFIED_PROJECT_NOTES")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "projectCode", value = "PROJECT_CODE", required = true, dataTypeClass = long.class),
- @ApiImplicitParam(name = "taskInstanceId", value = "TASK_ID", required = true, dataTypeClass = int.class, example = "100")
+ @Operation(summary = "downloadTaskLogInSpecifiedProject", description = "DOWNLOAD_TASK_INSTANCE_LOG_IN_SPECIFIED_PROJECT_NOTES")
+ @Parameters({
+ @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true, schema =@Schema( implementation = long.class)),
+ @Parameter(name = "taskInstanceId", description = "TASK_ID", required = true, schema =@Schema( implementation = int.class, example = "100"))
})
@GetMapping(value = "/{projectCode}/download-log")
@ResponseBody
@ApiException(DOWNLOAD_TASK_INSTANCE_LOG_FILE_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public ResponseEntity downloadTaskLog(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
- @ApiParam(name = "projectCode", value = "PROJECT_CODE", required = true) @PathVariable long projectCode,
+ public ResponseEntity downloadTaskLog(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true) @PathVariable long projectCode,
@RequestParam(value = "taskInstanceId") int taskInstanceId) {
byte[] logBytes = loggerService.getLogBytes(loginUser, projectCode, taskInstanceId);
return ResponseEntity
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 097493a4f5b0..ca503e69f058 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
@@ -21,6 +21,11 @@
import static org.apache.dolphinscheduler.api.enums.Status.SIGN_OUT_ERROR;
import static org.apache.dolphinscheduler.api.enums.Status.USER_LOGIN_FAILURE;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Parameters;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.tags.Tag;
import org.apache.dolphinscheduler.api.aspect.AccessLogAnnotation;
import org.apache.dolphinscheduler.api.enums.Status;
import org.apache.dolphinscheduler.api.exceptions.ApiException;
@@ -30,8 +35,6 @@
import org.apache.dolphinscheduler.common.Constants;
import org.apache.dolphinscheduler.dao.entity.User;
-import springfox.documentation.annotations.ApiIgnore;
-
import org.apache.commons.lang3.StringUtils;
import org.apache.http.HttpStatus;
@@ -48,15 +51,10 @@
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiImplicitParam;
-import io.swagger.annotations.ApiImplicitParams;
-import io.swagger.annotations.ApiOperation;
-
/**
* login controller
*/
-@Api(tags = "LOGIN_TAG")
+@Tag(name = "LOGIN_TAG")
@RestController
@RequestMapping("")
public class LoginController extends BaseController {
@@ -76,10 +74,10 @@ public class LoginController extends BaseController {
* @param response response
* @return login result
*/
- @ApiOperation(value = "login", notes = "LOGIN_NOTES")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "userName", value = "USER_NAME", required = true, dataTypeClass = String.class),
- @ApiImplicitParam(name = "userPassword", value = "USER_PASSWORD", required = true, dataTypeClass = String.class)
+ @Operation(summary = "login", description = "LOGIN_NOTES")
+ @Parameters({
+ @Parameter(name = "userName", description = "USER_NAME", required = true, schema =@Schema( implementation = String.class)),
+ @Parameter(name = "userPassword", description = "USER_PASSWORD", required = true, schema =@Schema( implementation = String.class))
})
@PostMapping(value = "/login")
@ApiException(USER_LOGIN_FAILURE)
@@ -124,11 +122,11 @@ public Result login(@RequestParam(value = "userName") String userName,
* @param request request
* @return sign out result
*/
- @ApiOperation(value = "signOut", notes = "SIGNOUT_NOTES")
+ @Operation(summary = "signOut", description = "SIGNOUT_NOTES")
@PostMapping(value = "/signOut")
@ApiException(SIGN_OUT_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = {"loginUser", "request"})
- public Result signOut(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ public Result signOut(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
HttpServletRequest request) {
String ip = getClientIpAddress(request);
sessionService.signOut(ip, loginUser);
diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/MonitorController.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/MonitorController.java
index 1acbc99a40f3..6a09639a8e87 100644
--- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/MonitorController.java
+++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/MonitorController.java
@@ -21,6 +21,9 @@
import static org.apache.dolphinscheduler.api.enums.Status.LIST_WORKERS_ERROR;
import static org.apache.dolphinscheduler.api.enums.Status.QUERY_DATABASE_STATE_ERROR;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.tags.Tag;
import org.apache.dolphinscheduler.api.aspect.AccessLogAnnotation;
import org.apache.dolphinscheduler.api.exceptions.ApiException;
import org.apache.dolphinscheduler.api.service.MonitorService;
@@ -28,8 +31,6 @@
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;
@@ -40,13 +41,10 @@
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-
/**
* monitor controller
*/
-@Api(tags = "MONITOR_TAG")
+@Tag(name = "MONITOR_TAG")
@RestController
@RequestMapping("/monitor")
public class MonitorController extends BaseController {
@@ -60,12 +58,12 @@ public class MonitorController extends BaseController {
* @param loginUser login user
* @return master list
*/
- @ApiOperation(value = "listMaster", notes = "MASTER_LIST_NOTES")
+ @Operation(summary = "listMaster", description = "MASTER_LIST_NOTES")
@GetMapping(value = "/masters")
@ResponseStatus(HttpStatus.OK)
@ApiException(LIST_MASTERS_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result listMaster(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser) {
+ public Result listMaster(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser) {
Map result = monitorService.queryMaster(loginUser);
return returnDataList(result);
}
@@ -76,12 +74,12 @@ public Result listMaster(@ApiIgnore @RequestAttribute(value = Constants.SESSION_
* @param loginUser login user
* @return worker information list
*/
- @ApiOperation(value = "listWorker", notes = "WORKER_LIST_NOTES")
+ @Operation(summary = "listWorker", description = "WORKER_LIST_NOTES")
@GetMapping(value = "/workers")
@ResponseStatus(HttpStatus.OK)
@ApiException(LIST_WORKERS_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result listWorker(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser) {
+ public Result listWorker(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser) {
Map result = monitorService.queryWorker(loginUser);
return returnDataList(result);
}
@@ -92,12 +90,12 @@ public Result listWorker(@ApiIgnore @RequestAttribute(value = Constants.SESSION_
* @param loginUser login user
* @return data base state
*/
- @ApiOperation(value = "queryDatabaseState", notes = "QUERY_DATABASE_STATE_NOTES")
+ @Operation(summary = "queryDatabaseState", description = "QUERY_DATABASE_STATE_NOTES")
@GetMapping(value = "/databases")
@ResponseStatus(HttpStatus.OK)
@ApiException(QUERY_DATABASE_STATE_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result queryDatabaseState(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser) {
+ public Result queryDatabaseState(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser) {
Map result = monitorService.queryDatabaseState(loginUser);
return returnDataList(result);
}
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 dc29875ec460..4411f45b5555 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
@@ -35,6 +35,11 @@
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.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Parameters;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.tags.Tag;
import org.apache.dolphinscheduler.api.aspect.AccessLogAnnotation;
import org.apache.dolphinscheduler.api.enums.Status;
import org.apache.dolphinscheduler.api.exceptions.ApiException;
@@ -48,8 +53,6 @@
import org.apache.dolphinscheduler.dao.entity.User;
import org.apache.dolphinscheduler.plugin.task.api.utils.ParameterUtils;
-import springfox.documentation.annotations.ApiIgnore;
-
import java.util.Map;
import javax.servlet.http.HttpServletResponse;
@@ -71,16 +74,10 @@
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
-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
*/
-@Api(tags = "PROCESS_DEFINITION_TAG")
+@Tag(name = "PROCESS_DEFINITION_TAG")
@RestController
@RequestMapping("projects/{projectCode}/process-definition")
public class ProcessDefinitionController extends BaseController {
@@ -106,19 +103,19 @@ public class ProcessDefinitionController extends BaseController {
* @param otherParamsJson otherParamsJson handle other params
* @return create result code
*/
- @ApiOperation(value = "createProcessDefinition", notes = "CREATE_PROCESS_DEFINITION_NOTES")
- @ApiImplicitParams({
- @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)
+ @Operation(summary = "createProcessDefinition", description = "CREATE_PROCESS_DEFINITION_NOTES")
+ @Parameters({
+ @Parameter(name = "name", description = "PROCESS_DEFINITION_NAME", required = true, schema =@Schema( implementation = String.class)),
+ @Parameter(name = "locations", description = "PROCESS_DEFINITION_LOCATIONS", required = true, schema =@Schema( implementation = String.class)),
+ @Parameter(name = "description", description = "PROCESS_DEFINITION_DESC", required = false, schema =@Schema( implementation = String.class)),
+ @Parameter(name = "otherParamsJson", description = "OTHER_PARAMS_JSON", required = false, schema =@Schema( implementation = String.class))
})
@PostMapping()
@ResponseStatus(HttpStatus.CREATED)
@ApiException(CREATE_PROCESS_DEFINITION_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result createProcessDefinition(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
- @ApiParam(name = "projectCode", value = "PROJECT_CODE", required = true) @PathVariable long projectCode,
+ public Result createProcessDefinition(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true) @PathVariable long projectCode,
@RequestParam(value = "name", required = true) String name,
@RequestParam(value = "description", required = false) String description,
@RequestParam(value = "globalParams", required = false, defaultValue = "[]") String globalParams,
@@ -144,17 +141,17 @@ public Result createProcessDefinition(@ApiIgnore @RequestAttribute(value = Const
* @param targetProjectCode target project code
* @return copy result code
*/
- @ApiOperation(value = "batchCopyByCodes", notes = "COPY_PROCESS_DEFINITION_NOTES")
- @ApiImplicitParams({
- @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")
+ @Operation(summary = "batchCopyByCodes", description = "COPY_PROCESS_DEFINITION_NOTES")
+ @Parameters({
+ @Parameter(name = "codes", description = "PROCESS_DEFINITION_CODES", required = true, schema =@Schema( implementation = String.class, example = "3,4")),
+ @Parameter(name = "targetProjectCode", description = "TARGET_PROJECT_CODE", required = true, schema =@Schema( implementation = long.class, example = "123"))
})
@PostMapping(value = "/batch-copy")
@ResponseStatus(HttpStatus.OK)
@ApiException(BATCH_COPY_PROCESS_DEFINITION_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result copyProcessDefinition(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
- @ApiParam(name = "projectCode", value = "PROJECT_CODE", required = true) @PathVariable long projectCode,
+ public Result copyProcessDefinition(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true) @PathVariable long projectCode,
@RequestParam(value = "codes", required = true) String codes,
@RequestParam(value = "targetProjectCode", required = true) long targetProjectCode) {
return returnDataList(
@@ -170,17 +167,17 @@ public Result copyProcessDefinition(@ApiIgnore @RequestAttribute(value = Constan
* @param targetProjectCode target project code
* @return move result code
*/
- @ApiOperation(value = "batchMoveByCodes", notes = "MOVE_PROCESS_DEFINITION_NOTES")
- @ApiImplicitParams({
- @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")
+ @Operation(summary = "batchMoveByCodes", description = "MOVE_PROCESS_DEFINITION_NOTES")
+ @Parameters({
+ @Parameter(name = "codes", description = "PROCESS_DEFINITION_CODES", required = true, schema =@Schema( implementation = String.class, example = "3,4")),
+ @Parameter(name = "targetProjectCode", description = "TARGET_PROJECT_CODE", required = true, schema =@Schema( implementation = long.class, example = "123"))
})
@PostMapping(value = "/batch-move")
@ResponseStatus(HttpStatus.OK)
@ApiException(BATCH_MOVE_PROCESS_DEFINITION_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result moveProcessDefinition(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
- @ApiParam(name = "projectCode", value = "PROJECT_CODE", required = true) @PathVariable long projectCode,
+ public Result moveProcessDefinition(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true) @PathVariable long projectCode,
@RequestParam(value = "codes", required = true) String codes,
@RequestParam(value = "targetProjectCode", required = true) long targetProjectCode) {
return returnDataList(
@@ -195,17 +192,17 @@ public Result moveProcessDefinition(@ApiIgnore @RequestAttribute(value = Constan
* @param name name
* @return true if process definition name not exists, otherwise false
*/
- @ApiOperation(value = "verify-name", notes = "VERIFY_PROCESS_DEFINITION_NAME_NOTES")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "name", value = "PROCESS_DEFINITION_NAME", required = true, dataTypeClass = String.class),
- @ApiImplicitParam(name = "code", value = "PROCESS_DEFINITION_CODE", required = false, dataTypeClass = Long.class),
+ @Operation(summary = "verify-name", description = "VERIFY_PROCESS_DEFINITION_NAME_NOTES")
+ @Parameters({
+ @Parameter(name = "name", description = "PROCESS_DEFINITION_NAME", required = true, schema =@Schema( implementation = String.class)),
+ @Parameter(name = "code", description = "PROCESS_DEFINITION_CODE", required = false, schema =@Schema( implementation = Long.class)),
})
@GetMapping(value = "/verify-name")
@ResponseStatus(HttpStatus.OK)
@ApiException(VERIFY_PROCESS_DEFINITION_NAME_UNIQUE_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result verifyProcessDefinitionName(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
- @ApiParam(name = "projectCode", value = "PROJECT_CODE", required = true) @PathVariable long projectCode,
+ public Result verifyProcessDefinitionName(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true) @PathVariable long projectCode,
@RequestParam(value = "name", required = true) String name,
@RequestParam(value = "code", required = false, defaultValue = "0") long processDefinitionCode) {
Map result = processDefinitionService.verifyProcessDefinitionName(loginUser, projectCode, name,
@@ -230,21 +227,21 @@ public Result verifyProcessDefinitionName(@ApiIgnore @RequestAttribute(value = C
* @param otherParamsJson otherParamsJson handle other params
* @return update result code
*/
- @ApiOperation(value = "update", notes = "UPDATE_PROCESS_DEFINITION_NOTES")
- @ApiImplicitParams({
- @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)
+ @Operation(summary = "update", description = "UPDATE_PROCESS_DEFINITION_NOTES")
+ @Parameters({
+ @Parameter(name = "name", description = "PROCESS_DEFINITION_NAME", required = true, schema =@Schema( implementation = String.class)),
+ @Parameter(name = "code", description = "PROCESS_DEFINITION_CODE", required = true, schema =@Schema( implementation = long.class, example = "123456789")),
+ @Parameter(name = "locations", description = "PROCESS_DEFINITION_LOCATIONS", required = true, schema =@Schema( implementation = String.class)),
+ @Parameter(name = "description", description = "PROCESS_DEFINITION_DESC", required = false, schema =@Schema( implementation = String.class)),
+ @Parameter(name = "releaseState", description = "RELEASE_PROCESS_DEFINITION_NOTES", required = false, schema =@Schema( implementation = ReleaseState.class)),
+ @Parameter(name = "otherParamsJson", description = "OTHER_PARAMS_JSON", required = false, schema =@Schema( implementation = String.class))
})
@PutMapping(value = "/{code}")
@ResponseStatus(HttpStatus.OK)
@ApiException(UPDATE_PROCESS_DEFINITION_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result updateProcessDefinition(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
- @ApiParam(name = "projectCode", value = "PROJECT_CODE", required = true) @PathVariable long projectCode,
+ public Result updateProcessDefinition(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true) @PathVariable long projectCode,
@RequestParam(value = "name", required = true) String name,
@PathVariable(value = "code", required = true) long code,
@RequestParam(value = "description", required = false) String description,
@@ -283,18 +280,18 @@ public Result updateProcessDefinition(@ApiIgnore @RequestAttribute(value = Const
* @param code the process definition code
* @return the process definition version list
*/
- @ApiOperation(value = "queryVersions", notes = "QUERY_PROCESS_DEFINITION_VERSIONS_NOTES")
- @ApiImplicitParams({
- @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")
+ @Operation(summary = "queryVersions", description = "QUERY_PROCESS_DEFINITION_VERSIONS_NOTES")
+ @Parameters({
+ @Parameter(name = "pageNo", description = "PAGE_NO", required = true, schema =@Schema( implementation = int.class, example = "1")),
+ @Parameter(name = "pageSize", description = "PAGE_SIZE", required = true, schema =@Schema( implementation = int.class, example = "10")),
+ @Parameter(name = "code", description = "PROCESS_DEFINITION_CODE", required = true, schema =@Schema( implementation = long.class, example = "1"))
})
@GetMapping(value = "/{code}/versions")
@ResponseStatus(HttpStatus.OK)
@ApiException(QUERY_PROCESS_DEFINITION_VERSIONS_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result queryProcessDefinitionVersions(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
- @ApiParam(name = "projectCode", value = "PROJECT_CODE", required = true) @PathVariable long projectCode,
+ public Result queryProcessDefinitionVersions(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true) @PathVariable long projectCode,
@RequestParam(value = "pageNo") int pageNo,
@RequestParam(value = "pageSize") int pageSize,
@PathVariable(value = "code") long code) {
@@ -318,17 +315,17 @@ public Result queryProcessDefinitionVersions(@ApiIgnore @RequestAttribute(value
* @param version the version user want to switch
* @return switch version result code
*/
- @ApiOperation(value = "switchVersion", notes = "SWITCH_PROCESS_DEFINITION_VERSION_NOTES")
- @ApiImplicitParams({
- @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")
+ @Operation(summary = "switchVersion", description = "SWITCH_PROCESS_DEFINITION_VERSION_NOTES")
+ @Parameters({
+ @Parameter(name = "code", description = "PROCESS_DEFINITION_CODE", required = true, schema =@Schema( implementation = long.class, example = "1")),
+ @Parameter(name = "version", description = "VERSION", required = true, schema =@Schema( implementation = int.class, example = "100"))
})
@GetMapping(value = "/{code}/versions/{version}")
@ResponseStatus(HttpStatus.OK)
@ApiException(SWITCH_PROCESS_DEFINITION_VERSION_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result switchProcessDefinitionVersion(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
- @ApiParam(name = "projectCode", value = "PROJECT_CODE", required = true) @PathVariable long projectCode,
+ public Result switchProcessDefinitionVersion(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true) @PathVariable long projectCode,
@PathVariable(value = "code") long code,
@PathVariable(value = "version") int version) {
Map result =
@@ -345,17 +342,17 @@ public Result switchProcessDefinitionVersion(@ApiIgnore @RequestAttribute(value
* @param version the process definition version user want to delete
* @return delete version result code
*/
- @ApiOperation(value = "deleteVersion", notes = "DELETE_PROCESS_DEFINITION_VERSION_NOTES")
- @ApiImplicitParams({
- @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")
+ @Operation(summary = "deleteVersion", description = "DELETE_PROCESS_DEFINITION_VERSION_NOTES")
+ @Parameters({
+ @Parameter(name = "code", description = "PROCESS_DEFINITION_CODE", required = true, schema =@Schema( implementation = long.class, example = "1")),
+ @Parameter(name = "version", description = "VERSION", required = true, schema =@Schema( implementation = int.class, example = "100"))
})
@DeleteMapping(value = "/{code}/versions/{version}")
@ResponseStatus(HttpStatus.OK)
@ApiException(DELETE_PROCESS_DEFINITION_VERSION_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result deleteProcessDefinitionVersion(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
- @ApiParam(name = "projectCode", value = "PROJECT_CODE", required = true) @PathVariable long projectCode,
+ public Result deleteProcessDefinitionVersion(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true) @PathVariable long projectCode,
@PathVariable(value = "code") long code,
@PathVariable(value = "version") int version) {
Map result =
@@ -372,18 +369,18 @@ public Result deleteProcessDefinitionVersion(@ApiIgnore @RequestAttribute(value
* @param releaseState release state
* @return release result code
*/
- @ApiOperation(value = "release", notes = "RELEASE_PROCESS_DEFINITION_NOTES")
- @ApiImplicitParams({
- @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),
+ @Operation(summary = "release", description = "RELEASE_PROCESS_DEFINITION_NOTES")
+ @Parameters({
+ @Parameter(name = "name", description = "PROCESS_DEFINITION_NAME", required = true, schema =@Schema( implementation = String.class)),
+ @Parameter(name = "code", description = "PROCESS_DEFINITION_CODE", required = true, schema =@Schema( implementation = long.class, example = "123456789")),
+ @Parameter(name = "releaseState", description = "PROCESS_DEFINITION_RELEASE", required = true, schema =@Schema( implementation = ReleaseState.class)),
})
@PostMapping(value = "/{code}/release")
@ResponseStatus(HttpStatus.OK)
@ApiException(RELEASE_PROCESS_DEFINITION_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result releaseProcessDefinition(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
- @ApiParam(name = "projectCode", value = "PROJECT_CODE", required = true) @PathVariable long projectCode,
+ public Result releaseProcessDefinition(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true) @PathVariable long projectCode,
@PathVariable(value = "code", required = true) long code,
@RequestParam(value = "releaseState", required = true) ReleaseState releaseState) {
Map result =
@@ -399,16 +396,16 @@ public Result releaseProcessDefinition(@ApiIgnore @RequestAttribute(value = Cons
* @param code process definition code
* @return process definition detail
*/
- @ApiOperation(value = "queryProcessDefinitionByCode", notes = "QUERY_PROCESS_DEFINITION_BY_CODE_NOTES")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "code", value = "PROCESS_DEFINITION_CODE", required = true, dataTypeClass = long.class, example = "123456789")
+ @Operation(summary = "queryProcessDefinitionByCode", description = "QUERY_PROCESS_DEFINITION_BY_CODE_NOTES")
+ @Parameters({
+ @Parameter(name = "code", description = "PROCESS_DEFINITION_CODE", required = true, schema =@Schema( implementation = long.class, example = "123456789"))
})
@GetMapping(value = "/{code}")
@ResponseStatus(HttpStatus.OK)
@ApiException(QUERY_DETAIL_OF_PROCESS_DEFINITION_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result queryProcessDefinitionByCode(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
- @ApiParam(name = "projectCode", value = "PROJECT_CODE", required = true) @PathVariable long projectCode,
+ public Result queryProcessDefinitionByCode(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true) @PathVariable long projectCode,
@PathVariable(value = "code", required = true) long code) {
Map result =
processDefinitionService.queryProcessDefinitionByCode(loginUser, projectCode, code);
@@ -423,16 +420,16 @@ public Result queryProcessDefinitionByCode(@ApiIgnore @RequestAttribute(value =
* @param name process definition name
* @return process definition detail
*/
- @ApiOperation(value = "queryProcessDefinitionByName", notes = "QUERY_PROCESS_DEFINITION_BY_NAME_NOTES")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "name", value = "PROCESS_DEFINITION_NAME", required = true, dataTypeClass = String.class)
+ @Operation(summary = "queryProcessDefinitionByName", description = "QUERY_PROCESS_DEFINITION_BY_NAME_NOTES")
+ @Parameters({
+ @Parameter(name = "name", description = "PROCESS_DEFINITION_NAME", required = true, schema =@Schema( implementation = String.class))
})
@GetMapping(value = "/query-by-name")
@ResponseStatus(HttpStatus.OK)
@ApiException(QUERY_DETAIL_OF_PROCESS_DEFINITION_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result queryProcessDefinitionByName(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
- @ApiParam(name = "projectCode", value = "PROJECT_CODE", required = true) @PathVariable long projectCode,
+ public Result queryProcessDefinitionByName(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true) @PathVariable long projectCode,
@RequestParam("name") String name) {
Map result =
processDefinitionService.queryProcessDefinitionByName(loginUser, projectCode, name);
@@ -446,13 +443,13 @@ public Result queryProcessDefinitionByName(@ApiIgnore @Reques
* @param projectCode project code
* @return process definition list
*/
- @ApiOperation(value = "queryList", notes = "QUERY_PROCESS_DEFINITION_LIST_NOTES")
+ @Operation(summary = "queryList", description = "QUERY_PROCESS_DEFINITION_LIST_NOTES")
@GetMapping(value = "/list")
@ResponseStatus(HttpStatus.OK)
@ApiException(QUERY_PROCESS_DEFINITION_LIST)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result queryProcessDefinitionList(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
- @ApiParam(name = "projectCode", value = "PROJECT_CODE", required = true) @PathVariable long projectCode) {
+ public Result queryProcessDefinitionList(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true) @PathVariable long projectCode) {
Map result = processDefinitionService.queryProcessDefinitionList(loginUser, projectCode);
return returnDataList(result);
}
@@ -464,13 +461,13 @@ public Result queryProcessDefinitionList(@ApiIgnore @RequestAttribute(value = Co
* @param projectCode project code
* @return process definition list
*/
- @ApiOperation(value = "querySimpleList", notes = "QUERY_PROCESS_DEFINITION_SIMPLE_LIST_NOTES")
+ @Operation(summary = "querySimpleList", description = "QUERY_PROCESS_DEFINITION_SIMPLE_LIST_NOTES")
@GetMapping(value = "/simple-list")
@ResponseStatus(HttpStatus.OK)
@ApiException(QUERY_PROCESS_DEFINITION_LIST)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result queryProcessDefinitionSimpleList(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
- @ApiParam(name = "projectCode", value = "PROJECT_CODE", required = true) @PathVariable long projectCode) {
+ public Result queryProcessDefinitionSimpleList(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true) @PathVariable long projectCode) {
Map result = processDefinitionService.queryProcessDefinitionSimpleList(loginUser, projectCode);
return returnDataList(result);
}
@@ -487,21 +484,21 @@ public Result queryProcessDefinitionSimpleList(@ApiIgnore @RequestAttribute(valu
* @param userId user id
* @return process definition page
*/
- @ApiOperation(value = "queryListPaging", notes = "QUERY_PROCESS_DEFINITION_LIST_PAGING_NOTES")
- @ApiImplicitParams({
- @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)
+ @Operation(summary = "queryListPaging", description = "QUERY_PROCESS_DEFINITION_LIST_PAGING_NOTES")
+ @Parameters({
+ @Parameter(name = "searchVal", description = "SEARCH_VAL", required = false, schema =@Schema( implementation = String.class)),
+ @Parameter(name = "userId", description = "USER_ID", required = false, schema =@Schema( implementation = int.class, example = "100")),
+ @Parameter(name = "pageNo", description = "PAGE_NO", required = true, schema =@Schema( implementation = int.class, example = "1")),
+ @Parameter(name = "pageSize", description = "PAGE_SIZE", required = true, schema =@Schema( implementation = int.class, example = "10")),
+ @Parameter(name = "otherParamsJson", description = "OTHER_PARAMS_JSON", required = false, schema =@Schema( implementation = String.class))
})
@GetMapping()
@ResponseStatus(HttpStatus.OK)
@ApiException(QUERY_PROCESS_DEFINITION_LIST_PAGING_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
public Result> queryProcessDefinitionListPaging(
- @ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
- @ApiParam(name = "projectCode", value = "PROJECT_CODE", required = true) @PathVariable long projectCode,
+ @Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true) @PathVariable long projectCode,
@RequestParam(value = "searchVal", required = false) String searchVal,
@RequestParam(value = "otherParamsJson", required = false) String otherParamsJson,
@RequestParam(value = "userId", required = false, defaultValue = "0") Integer userId,
@@ -529,17 +526,17 @@ public Result> queryProcessDefinitionListPaging(
* @param limit limit
* @return tree view json data
*/
- @ApiOperation(value = "viewTree", notes = "VIEW_TREE_NOTES")
- @ApiImplicitParams({
- @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")
+ @Operation(summary = "viewTree", description = "VIEW_TREE_NOTES")
+ @Parameters({
+ @Parameter(name = "code", description = "PROCESS_DEFINITION_CODE", required = true, schema =@Schema( implementation = long.class, example = "100")),
+ @Parameter(name = "limit", description = "LIMIT", required = true, schema =@Schema( implementation = int.class, example = "100"))
})
@GetMapping(value = "/{code}/view-tree")
@ResponseStatus(HttpStatus.OK)
@ApiException(ENCAPSULATION_TREEVIEW_STRUCTURE_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result viewTree(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
- @ApiParam(name = "projectCode", value = "PROJECT_CODE", required = true) @PathVariable long projectCode,
+ public Result viewTree(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true) @PathVariable long projectCode,
@PathVariable("code") long code,
@RequestParam("limit") Integer limit) {
Map result = processDefinitionService.viewTree(loginUser, projectCode, code, limit);
@@ -554,15 +551,15 @@ public Result viewTree(@ApiIgnore @RequestAttribute(value = Constants.SESSION_US
* @param code process definition code
* @return task list
*/
- @ApiOperation(value = "getTasksByDefinitionCode", notes = "GET_TASK_LIST_BY_DEFINITION_CODE_NOTES")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "code", value = "PROCESS_DEFINITION_CODE", required = true, dataTypeClass = long.class, example = "100")
+ @Operation(summary = "getTasksByDefinitionCode", description = "GET_TASK_LIST_BY_DEFINITION_CODE_NOTES")
+ @Parameters({
+ @Parameter(name = "code", description = "PROCESS_DEFINITION_CODE", required = true, schema =@Schema( implementation = long.class, example = "100"))
})
@GetMapping(value = "/{code}/tasks")
@ResponseStatus(HttpStatus.OK)
@ApiException(GET_TASKS_LIST_BY_PROCESS_DEFINITION_ID_ERROR)
- public Result getNodeListByDefinitionCode(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
- @ApiParam(name = "projectCode", value = "PROJECT_CODE", required = true) @PathVariable long projectCode,
+ public Result getNodeListByDefinitionCode(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true) @PathVariable long projectCode,
@PathVariable("code") long code) {
Map result =
processDefinitionService.getTaskNodeListByDefinitionCode(loginUser, projectCode, code);
@@ -577,15 +574,15 @@ public Result getNodeListByDefinitionCode(@ApiIgnore @RequestAttribute(value = C
* @param codes process definition codes
* @return node list data
*/
- @ApiOperation(value = "getTaskListByDefinitionCodes", notes = "GET_TASK_LIST_BY_DEFINITION_CODE_NOTES")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "codes", value = "PROCESS_DEFINITION_CODES", required = true, dataTypeClass = String.class, example = "100,200,300")
+ @Operation(summary = "getTaskListByDefinitionCodes", description = "GET_TASK_LIST_BY_DEFINITION_CODE_NOTES")
+ @Parameters({
+ @Parameter(name = "codes", description = "PROCESS_DEFINITION_CODES", required = true, schema =@Schema( implementation = String.class, example = "100,200,300"))
})
@GetMapping(value = "/batch-query-tasks")
@ResponseStatus(HttpStatus.OK)
@ApiException(GET_TASKS_LIST_BY_PROCESS_DEFINITION_ID_ERROR)
- public Result getNodeListMapByDefinitionCodes(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
- @ApiParam(name = "projectCode", value = "PROJECT_CODE", required = true) @PathVariable long projectCode,
+ public Result getNodeListMapByDefinitionCodes(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true) @PathVariable long projectCode,
@RequestParam("codes") String codes) {
Map result =
processDefinitionService.getNodeListMapByDefinitionCodes(loginUser, projectCode, codes);
@@ -599,15 +596,15 @@ public Result getNodeListMapByDefinitionCodes(@ApiIgnore @RequestAttribute(value
* @param projectCode project code
* @return process definition list data
*/
- @ApiOperation(value = "getProcessListByProjectCode", notes = "GET_PROCESS_LIST_BY_PROCESS_CODE_NOTES")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "projectCode", value = "PROJECT_CODE", required = true, dataTypeClass = long.class, example = "100")
+ @Operation(summary = "getProcessListByProjectCode", description = "GET_PROCESS_LIST_BY_PROCESS_CODE_NOTES")
+ @Parameters({
+ @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true, schema =@Schema( implementation = 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) {
+ public Result getProcessListByProjectCodes(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true) @PathVariable long projectCode) {
Map result = processDefinitionService.queryProcessDefinitionListByProjectCode(projectCode);
return returnDataList(result);
}
@@ -619,16 +616,16 @@ public Result getProcessListByProjectCodes(@ApiIgnore @RequestAttribute(value =
* @param projectCode project code
* @return process definition list data
*/
- @ApiOperation(value = "getTaskListByProcessDefinitionCode", notes = "GET_TASK_LIST_BY_PROCESS_CODE_NOTES")
- @ApiImplicitParams({
- @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"),
+ @Operation(summary = "getTaskListByProcessDefinitionCode", description = "GET_TASK_LIST_BY_PROCESS_CODE_NOTES")
+ @Parameters({
+ @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true, schema =@Schema( implementation = long.class, example = "100")),
+ @Parameter(name = "processDefinitionCode", description = "PROCESS_DEFINITION_CODE", required = true, schema =@Schema( implementation = long.class, example = "100")),
})
@GetMapping(value = "/query-task-definition-list")
@ResponseStatus(HttpStatus.OK)
@ApiException(GET_TASKS_LIST_BY_PROCESS_DEFINITION_ID_ERROR)
- public Result getTaskListByProcessDefinitionCode(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
- @ApiParam(name = "projectCode", value = "PROJECT_CODE", required = true) @PathVariable long projectCode,
+ public Result getTaskListByProcessDefinitionCode(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true) @PathVariable long projectCode,
@RequestParam(value = "processDefinitionCode") Long processDefinitionCode) {
Map result = processDefinitionService
.queryTaskDefinitionListByProcessDefinitionCode(projectCode, processDefinitionCode);
@@ -643,16 +640,16 @@ public Result getTaskListByProcessDefinitionCode(@ApiIgnore @RequestAttribute(va
* @param code process definition code
* @return delete result code
*/
- @ApiOperation(value = "deleteByCode", notes = "DELETE_PROCESS_DEFINITION_BY_ID_NOTES")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "code", value = "PROCESS_DEFINITION_CODE", dataTypeClass = int.class, example = "100")
+ @Operation(summary = "deleteByCode", description = "DELETE_PROCESS_DEFINITION_BY_ID_NOTES")
+ @Parameters({
+ @Parameter(name = "code", description = "PROCESS_DEFINITION_CODE", schema =@Schema( implementation = int.class, example = "100"))
})
@DeleteMapping(value = "/{code}")
@ResponseStatus(HttpStatus.OK)
@ApiException(DELETE_PROCESS_DEFINE_BY_CODE_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result deleteProcessDefinitionByCode(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
- @ApiParam(name = "projectCode", value = "PROJECT_CODE", required = true) @PathVariable long projectCode,
+ public Result deleteProcessDefinitionByCode(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true) @PathVariable long projectCode,
@PathVariable("code") long code) {
processDefinitionService.deleteProcessDefinitionByCode(loginUser, code);
return new Result(Status.SUCCESS);
@@ -666,16 +663,16 @@ public Result deleteProcessDefinitionByCode(@ApiIgnore @RequestAttribute(value =
* @param codes process definition code list
* @return delete result code
*/
- @ApiOperation(value = "batchDeleteByCodes", notes = "BATCH_DELETE_PROCESS_DEFINITION_BY_IDS_NOTES")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "codes", value = "PROCESS_DEFINITION_CODE", required = true, dataTypeClass = String.class)
+ @Operation(summary = "batchDeleteByCodes", description = "BATCH_DELETE_PROCESS_DEFINITION_BY_IDS_NOTES")
+ @Parameters({
+ @Parameter(name = "codes", description = "PROCESS_DEFINITION_CODE", required = true, schema =@Schema( implementation = String.class))
})
@PostMapping(value = "/batch-delete")
@ResponseStatus(HttpStatus.OK)
@ApiException(BATCH_DELETE_PROCESS_DEFINE_BY_CODES_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result batchDeleteProcessDefinitionByCodes(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
- @ApiParam(name = "projectCode", value = "PROJECT_CODE", required = true) @PathVariable long projectCode,
+ public Result batchDeleteProcessDefinitionByCodes(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true) @PathVariable long projectCode,
@RequestParam("codes") String codes) {
Map result =
@@ -691,15 +688,15 @@ public Result batchDeleteProcessDefinitionByCodes(@ApiIgnore @RequestAttribute(v
* @param codes process definition codes
* @param response response
*/
- @ApiOperation(value = "batchExportByCodes", notes = "BATCH_EXPORT_PROCESS_DEFINITION_BY_CODES_NOTES")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "codes", value = "PROCESS_DEFINITION_CODE", required = true, dataTypeClass = String.class)
+ @Operation(summary = "batchExportByCodes", description = "BATCH_EXPORT_PROCESS_DEFINITION_BY_CODES_NOTES")
+ @Parameters({
+ @Parameter(name = "codes", description = "PROCESS_DEFINITION_CODE", required = true, schema =@Schema( implementation = String.class))
})
@PostMapping(value = "/batch-export")
@ResponseBody
@AccessLogAnnotation(ignoreRequestArgs = {"loginUser", "response"})
- public void batchExportProcessDefinitionByCodes(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
- @ApiParam(name = "projectCode", value = "PROJECT_CODE", required = true) @PathVariable long projectCode,
+ public void batchExportProcessDefinitionByCodes(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true) @PathVariable long projectCode,
@RequestParam("codes") String codes,
HttpServletResponse response) {
try {
@@ -716,13 +713,13 @@ public void batchExportProcessDefinitionByCodes(@ApiIgnore @RequestAttribute(val
* @param projectCode project code
* @return process definition list
*/
- @ApiOperation(value = "queryAllByProjectCode", notes = "QUERY_PROCESS_DEFINITION_All_BY_PROJECT_CODE_NOTES")
+ @Operation(summary = "queryAllByProjectCode", description = "QUERY_PROCESS_DEFINITION_All_BY_PROJECT_CODE_NOTES")
@GetMapping(value = "/all")
@ResponseStatus(HttpStatus.OK)
@ApiException(QUERY_PROCESS_DEFINITION_LIST)
@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) {
+ public Result queryAllProcessDefinitionByProjectCode(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true) @PathVariable long projectCode) {
Map result =
processDefinitionService.queryAllProcessDefinitionByProjectCode(loginUser, projectCode);
return returnDataList(result);
@@ -736,15 +733,15 @@ public Result queryAllProcessDefinitionByProjectCode(@ApiIgnore @RequestAttribut
* @param file resource file
* @return import result code
*/
- @ApiOperation(value = "importProcessDefinition", notes = "IMPORT_PROCESS_DEFINITION_NOTES")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "file", value = "RESOURCE_FILE", required = true, dataTypeClass = MultipartFile.class)
+ @Operation(summary = "importProcessDefinition", description = "IMPORT_PROCESS_DEFINITION_NOTES")
+ @Parameters({
+ @Parameter(name = "file", description = "RESOURCE_FILE", required = true, schema =@Schema( implementation = MultipartFile.class))
})
@PostMapping(value = "/import")
@ApiException(IMPORT_PROCESS_DEFINE_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = {"loginUser", "file"})
- public Result importProcessDefinition(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
- @ApiParam(name = "projectCode", value = "PROJECT_CODE", required = true) @PathVariable long projectCode,
+ public Result importProcessDefinition(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true) @PathVariable long projectCode,
@RequestParam("file") MultipartFile file) {
Map result;
if ("application/zip".equals(file.getContentType())) {
@@ -768,18 +765,18 @@ public Result importProcessDefinition(@ApiIgnore @RequestAttribute(value = Const
* @param scheduleJson scheduleJson
* @return process definition code
*/
- @ApiOperation(value = "createEmptyProcessDefinition", notes = "CREATE_EMPTY_PROCESS_NOTES")
- @ApiImplicitParams({
- @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)
+ @Operation(summary = "createEmptyProcessDefinition", description = "CREATE_EMPTY_PROCESS_NOTES")
+ @Parameters({
+ @Parameter(name = "name", description = "PROCESS_DEFINITION_NAME", required = true, schema =@Schema( implementation = String.class)),
+ @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true, schema =@Schema( implementation = long.class, example = "123456789")),
+ @Parameter(name = "description", description = "PROCESS_DEFINITION_DESC", required = false, schema =@Schema( implementation = String.class))
})
@PostMapping(value = "/empty")
@ResponseStatus(HttpStatus.OK)
@ApiException(CREATE_PROCESS_DEFINITION_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result createEmptyProcessDefinition(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
- @ApiParam(name = "projectCode", value = "PROJECT_CODE", required = true) @PathVariable long projectCode,
+ public Result createEmptyProcessDefinition(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true) @PathVariable long projectCode,
@RequestParam(value = "name", required = true) String name,
@RequestParam(value = "description", required = false) String description,
@RequestParam(value = "globalParams", required = false, defaultValue = "[]") String globalParams,
@@ -809,20 +806,20 @@ public Result createEmptyProcessDefinition(@ApiIgnore @RequestAttribute(value =
* @param otherParamsJson otherParamsJson handle other params
* @return update result code
*/
- @ApiOperation(value = "updateBasicInfo", notes = "UPDATE_PROCESS_DEFINITION_BASIC_INFO_NOTES")
- @ApiImplicitParams({
- @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)
+ @Operation(summary = "updateBasicInfo", description = "UPDATE_PROCESS_DEFINITION_BASIC_INFO_NOTES")
+ @Parameters({
+ @Parameter(name = "name", description = "PROCESS_DEFINITION_NAME", required = true, schema =@Schema( implementation = String.class)),
+ @Parameter(name = "code", description = "PROCESS_DEFINITION_CODE", required = true, schema =@Schema( implementation = long.class, example = "123456789")),
+ @Parameter(name = "description", description = "PROCESS_DEFINITION_DESC", required = false, schema =@Schema( implementation = String.class)),
+ @Parameter(name = "releaseState", description = "RELEASE_PROCESS_DEFINITION_NOTES", required = false, schema =@Schema( implementation = ReleaseState.class)),
+ @Parameter(name = "otherParamsJson", description = "OTHER_PARAMS_JSON", required = false, schema =@Schema( implementation = String.class))
})
@PutMapping(value = "/{code}/basic-info")
@ResponseStatus(HttpStatus.OK)
@ApiException(UPDATE_PROCESS_DEFINITION_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result updateProcessDefinitionBasicInfo(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
- @ApiParam(name = "projectCode", value = "PROJECT_CODE", required = true) @PathVariable long projectCode,
+ public Result updateProcessDefinitionBasicInfo(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true) @PathVariable long projectCode,
@RequestParam(value = "name", required = true) String name,
@PathVariable(value = "code", required = true) long code,
@RequestParam(value = "description", required = false) String description,
@@ -857,18 +854,18 @@ public Result updateProcessDefinitionBasicInfo(@ApiIgnore @RequestAttribute(valu
* @param releaseState releaseState
* @return update result code
*/
- @ApiOperation(value = "releaseWorkflowAndSchedule", notes = "RELEASE_WORKFLOW_SCHEDULE_NOTES")
- @ApiImplicitParams({
- @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)
+ @Operation(summary = "releaseWorkflowAndSchedule", description = "RELEASE_WORKFLOW_SCHEDULE_NOTES")
+ @Parameters({
+ @Parameter(name = "projectCode", description = "PROCESS_DEFINITION_NAME", required = true, schema =@Schema( implementation = long.class)),
+ @Parameter(name = "code", description = "PROCESS_DEFINITION_CODE", required = true, schema =@Schema( implementation = long.class, example = "123456789")),
+ @Parameter(name = "releaseState", description = "RELEASE_PROCESS_DEFINITION_NOTES", required = true, schema =@Schema( implementation = ReleaseState.class))
})
@PostMapping(value = "/{code}/release-workflow")
@ResponseStatus(HttpStatus.OK)
@ApiException(RELEASE_PROCESS_DEFINITION_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result releaseWorkflowAndSchedule(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
- @ApiParam(name = "projectCode", value = "PROJECT_CODE", required = true) @PathVariable long projectCode,
+ public Result releaseWorkflowAndSchedule(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ @Parameter(name = "projectCode", description = "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(
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 ebc5edde85ac..af9b0a82fe17 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
@@ -17,17 +17,12 @@
package org.apache.dolphinscheduler.api.controller;
-import static org.apache.dolphinscheduler.api.enums.Status.BATCH_DELETE_PROCESS_INSTANCE_BY_IDS_ERROR;
-import static org.apache.dolphinscheduler.api.enums.Status.DELETE_PROCESS_INSTANCE_BY_ID_ERROR;
-import static org.apache.dolphinscheduler.api.enums.Status.ENCAPSULATION_PROCESS_INSTANCE_GANTT_STRUCTURE_ERROR;
-import static org.apache.dolphinscheduler.api.enums.Status.QUERY_PARENT_PROCESS_INSTANCE_DETAIL_INFO_BY_SUB_PROCESS_INSTANCE_ID_ERROR;
-import static org.apache.dolphinscheduler.api.enums.Status.QUERY_PROCESS_INSTANCE_ALL_VARIABLES_ERROR;
-import static org.apache.dolphinscheduler.api.enums.Status.QUERY_PROCESS_INSTANCE_BY_ID_ERROR;
-import static org.apache.dolphinscheduler.api.enums.Status.QUERY_PROCESS_INSTANCE_LIST_PAGING_ERROR;
-import static org.apache.dolphinscheduler.api.enums.Status.QUERY_SUB_PROCESS_INSTANCE_DETAIL_INFO_BY_TASK_ID_ERROR;
-import static org.apache.dolphinscheduler.api.enums.Status.QUERY_TASK_LIST_BY_PROCESS_INSTANCE_ID_ERROR;
-import static org.apache.dolphinscheduler.api.enums.Status.UPDATE_PROCESS_INSTANCE_ERROR;
-
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Parameters;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.tags.Tag;
+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;
@@ -35,13 +30,14 @@
import org.apache.dolphinscheduler.api.utils.Result;
import org.apache.dolphinscheduler.common.Constants;
import org.apache.dolphinscheduler.common.enums.WorkflowExecutionStatus;
+import org.apache.dolphinscheduler.plugin.task.api.utils.ParameterUtils;
import org.apache.dolphinscheduler.dao.entity.ProcessInstance;
import org.apache.dolphinscheduler.dao.entity.User;
-import org.apache.dolphinscheduler.plugin.task.api.utils.ParameterUtils;
-
-import springfox.documentation.annotations.ApiIgnore;
-
-import org.apache.commons.lang3.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpStatus;
+import org.springframework.web.bind.annotation.*;
import java.io.IOException;
import java.text.MessageFormat;
@@ -50,31 +46,12 @@
import java.util.List;
import java.util.Map;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.http.HttpStatus;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.RequestAttribute;
-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 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.*;
/**
* process instance controller
*/
-@Api(tags = "PROCESS_INSTANCE_TAG")
+@Tag(name = "PROCESS_INSTANCE_TAG")
@RestController
@RequestMapping("/projects/{projectCode}/process-instances")
public class ProcessInstanceController extends BaseController {
@@ -100,24 +77,24 @@ public class ProcessInstanceController extends BaseController {
* @param otherParamsJson otherParamsJson handle other params
* @return process instance list
*/
- @ApiOperation(value = "queryProcessInstanceListPaging", notes = "QUERY_PROCESS_INSTANCE_LIST_NOTES")
- @ApiImplicitParams({
- @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")
+ @Operation(summary = "queryProcessInstanceListPaging", description = "QUERY_PROCESS_INSTANCE_LIST_NOTES")
+ @Parameters({
+ @Parameter(name = "processDefineCode", description = "PROCESS_DEFINITION_CODE", schema =@Schema( implementation = long.class, example = "100")),
+ @Parameter(name = "searchVal", description = "SEARCH_VAL", schema =@Schema( implementation = String.class)),
+ @Parameter(name = "executorName", description = "EXECUTOR_NAME", schema =@Schema( implementation = String.class)),
+ @Parameter(name = "stateType", description = "EXECUTION_STATUS", schema =@Schema( implementation = WorkflowExecutionStatus.class)),
+ @Parameter(name = "host", description = "HOST", schema =@Schema( implementation = String.class)),
+ @Parameter(name = "startDate", description = "START_DATE", schema =@Schema( implementation = String.class)),
+ @Parameter(name = "endDate", description = "END_DATE", schema =@Schema( implementation = String.class)),
+ @Parameter(name = "pageNo", description = "PAGE_NO", required = true, schema =@Schema( implementation = int.class, example = "1")),
+ @Parameter(name = "pageSize", description = "PAGE_SIZE", required = true, schema =@Schema( implementation = int.class, example = "10"))
})
@GetMapping()
@ResponseStatus(HttpStatus.OK)
@ApiException(QUERY_PROCESS_INSTANCE_LIST_PAGING_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result queryProcessInstanceList(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
- @ApiParam(name = "projectCode", value = "PROJECT_CODE", required = true) @PathVariable long projectCode,
+ public Result queryProcessInstanceList(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true) @PathVariable long projectCode,
@RequestParam(value = "processDefineCode", required = false, defaultValue = "0") long processDefineCode,
@RequestParam(value = "searchVal", required = false) String searchVal,
@RequestParam(value = "executorName", required = false) String executorName,
@@ -148,16 +125,16 @@ public Result queryProcessInstanceList(@ApiIgnore @RequestAttribute(value = Cons
* @param id process instance id
* @return task list for the process instance
*/
- @ApiOperation(value = "queryTaskListByProcessId", notes = "QUERY_TASK_LIST_BY_PROCESS_INSTANCE_ID_NOTES")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "id", value = "PROCESS_INSTANCE_ID", required = true, dataTypeClass = int.class, example = "100")
+ @Operation(summary = "queryTaskListByProcessId", description = "QUERY_TASK_LIST_BY_PROCESS_INSTANCE_ID_NOTES")
+ @Parameters({
+ @Parameter(name = "id", description = "PROCESS_INSTANCE_ID", required = true, schema =@Schema( implementation = int.class, example = "100"))
})
@GetMapping(value = "/{id}/tasks")
@ResponseStatus(HttpStatus.OK)
@ApiException(QUERY_TASK_LIST_BY_PROCESS_INSTANCE_ID_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result queryTaskListByProcessId(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
- @ApiParam(name = "projectCode", value = "PROJECT_CODE", required = true) @PathVariable long projectCode,
+ public Result queryTaskListByProcessId(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true) @PathVariable long projectCode,
@PathVariable("id") Integer id) throws IOException {
Map result = processInstanceService.queryTaskListByProcessId(loginUser, projectCode, id);
return returnDataList(result);
@@ -177,24 +154,24 @@ public Result queryTaskListByProcessId(@ApiIgnore @RequestAttribute(value = Cons
* @param tenantCode tenantCode
* @return update result code
*/
- @ApiOperation(value = "updateProcessInstance", notes = "UPDATE_PROCESS_INSTANCE_NOTES")
- @ApiImplicitParams({
- @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")
+ @Operation(summary = "updateProcessInstance", description = "UPDATE_PROCESS_INSTANCE_NOTES")
+ @Parameters({
+ @Parameter(name = "taskRelationJson", description = "TASK_RELATION_JSON", schema =@Schema( implementation = String.class)),
+ @Parameter(name = "taskDefinitionJson", description = "TASK_DEFINITION_JSON", schema =@Schema( implementation = String.class)),
+ @Parameter(name = "id", description = "PROCESS_INSTANCE_ID", required = true, schema =@Schema( implementation = int.class, example = "1")),
+ @Parameter(name = "scheduleTime", description = "SCHEDULE_TIME", schema =@Schema( implementation = String.class)),
+ @Parameter(name = "syncDefine", description = "SYNC_DEFINE", required = true, schema =@Schema( implementation = boolean.class, example = "false")),
+ @Parameter(name = "globalParams", description = "PROCESS_GLOBAL_PARAMS", schema =@Schema( implementation = String.class, example = "[]")),
+ @Parameter(name = "locations", description = "PROCESS_INSTANCE_LOCATIONS", schema =@Schema( implementation = String.class)),
+ @Parameter(name = "timeout", description = "PROCESS_TIMEOUT", schema =@Schema( implementation = int.class, example = "0")),
+ @Parameter(name = "tenantCode", description = "TENANT_CODE", schema =@Schema( implementation = String.class, example = "default"))
})
@PutMapping(value = "/{id}")
@ResponseStatus(HttpStatus.OK)
@ApiException(UPDATE_PROCESS_INSTANCE_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result updateProcessInstance(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
- @ApiParam(name = "projectCode", value = "PROJECT_CODE", required = true) @PathVariable long projectCode,
+ public Result updateProcessInstance(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true) @PathVariable long projectCode,
@RequestParam(value = "taskRelationJson", required = true) String taskRelationJson,
@RequestParam(value = "taskDefinitionJson", required = true) String taskDefinitionJson,
@PathVariable(value = "id") Integer id,
@@ -218,16 +195,16 @@ public Result updateProcessInstance(@ApiIgnore @RequestAttribute(value = Constan
* @param id process instance id
* @return process instance detail
*/
- @ApiOperation(value = "queryProcessInstanceById", notes = "QUERY_PROCESS_INSTANCE_BY_ID_NOTES")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "id", value = "PROCESS_INSTANCE_ID", required = true, dataTypeClass = int.class, example = "100")
+ @Operation(summary = "queryProcessInstanceById", description = "QUERY_PROCESS_INSTANCE_BY_ID_NOTES")
+ @Parameters({
+ @Parameter(name = "id", description = "PROCESS_INSTANCE_ID", required = true, schema =@Schema( implementation = int.class, example = "100"))
})
@GetMapping(value = "/{id}")
@ResponseStatus(HttpStatus.OK)
@ApiException(QUERY_PROCESS_INSTANCE_BY_ID_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result queryProcessInstanceById(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
- @ApiParam(name = "projectCode", value = "PROJECT_CODE", required = true) @PathVariable long projectCode,
+ public Result queryProcessInstanceById(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true) @PathVariable long projectCode,
@PathVariable("id") Integer id) {
Map result = processInstanceService.queryProcessInstanceById(loginUser, projectCode, id);
return returnDataList(result);
@@ -243,18 +220,18 @@ public Result queryProcessInstanceById(@ApiIgnore @RequestAttribute(value = Cons
* @param endTime end time
* @return list of process instance
*/
- @ApiOperation(value = "queryTopNLongestRunningProcessInstance", notes = "QUERY_TOPN_LONGEST_RUNNING_PROCESS_INSTANCE_NOTES")
- @ApiImplicitParams({
- @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),
+ @Operation(summary = "queryTopNLongestRunningProcessInstance", description = "QUERY_TOPN_LONGEST_RUNNING_PROCESS_INSTANCE_NOTES")
+ @Parameters({
+ @Parameter(name = "size", description = "PROCESS_INSTANCE_SIZE", required = true, schema =@Schema( implementation = int.class, example = "10")),
+ @Parameter(name = "startTime", description = "PROCESS_INSTANCE_START_TIME", required = true, schema =@Schema( implementation = String.class)),
+ @Parameter(name = "endTime", description = "PROCESS_INSTANCE_END_TIME", required = true, schema =@Schema( implementation = String.class)),
})
@GetMapping(value = "/top-n")
@ResponseStatus(HttpStatus.OK)
@ApiException(QUERY_PROCESS_INSTANCE_BY_ID_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result queryTopNLongestRunningProcessInstance(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
- @ApiParam(name = "projectCode", value = "PROJECT_CODE", required = true) @PathVariable long projectCode,
+ public Result queryTopNLongestRunningProcessInstance(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true) @PathVariable long projectCode,
@RequestParam("size") Integer size,
@RequestParam(value = "startTime", required = true) String startTime,
@RequestParam(value = "endTime", required = true) String endTime) {
@@ -272,16 +249,16 @@ public Result queryTopNLongestRunningProcessInstance(@ApiIgnore
* @param id process instance id
* @return delete result code
*/
- @ApiOperation(value = "deleteProcessInstanceById", notes = "DELETE_PROCESS_INSTANCE_BY_ID_NOTES")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "id", value = "PROCESS_INSTANCE_ID", required = true, dataTypeClass = int.class, example = "100")
+ @Operation(summary = "deleteProcessInstanceById", description = "DELETE_PROCESS_INSTANCE_BY_ID_NOTES")
+ @Parameters({
+ @Parameter(name = "id", description = "PROCESS_INSTANCE_ID", required = true, schema =@Schema( implementation = int.class, example = "100"))
})
@DeleteMapping(value = "/{id}")
@ResponseStatus(HttpStatus.OK)
@ApiException(DELETE_PROCESS_INSTANCE_BY_ID_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result deleteProcessInstanceById(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
- @ApiParam(name = "projectCode", value = "PROJECT_CODE", required = true) @PathVariable long projectCode,
+ public Result deleteProcessInstanceById(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true) @PathVariable long projectCode,
@PathVariable("id") Integer id) {
Map result = processInstanceService.deleteProcessInstanceById(loginUser, projectCode, id);
return returnDataList(result);
@@ -295,16 +272,16 @@ public Result deleteProcessInstanceById(@ApiIgnore @RequestAttr
* @param taskId task id
* @return sub process instance detail
*/
- @ApiOperation(value = "querySubProcessInstanceByTaskCode", notes = "QUERY_SUBPROCESS_INSTANCE_BY_TASK_CODE_NOTES")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "taskCode", value = "TASK_CODE", required = true, dataTypeClass = long.class, example = "100")
+ @Operation(summary = "querySubProcessInstanceByTaskCode", description = "QUERY_SUBPROCESS_INSTANCE_BY_TASK_CODE_NOTES")
+ @Parameters({
+ @Parameter(name = "taskCode", description = "TASK_CODE", required = true, schema =@Schema( implementation = long.class, example = "100"))
})
@GetMapping(value = "/query-sub-by-parent")
@ResponseStatus(HttpStatus.OK)
@ApiException(QUERY_SUB_PROCESS_INSTANCE_DETAIL_INFO_BY_TASK_ID_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result querySubProcessInstanceByTaskId(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
- @ApiParam(name = "projectCode", value = "PROJECT_CODE", required = true) @PathVariable long projectCode,
+ public Result querySubProcessInstanceByTaskId(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true) @PathVariable long projectCode,
@RequestParam("taskId") Integer taskId) {
Map result =
processInstanceService.querySubProcessInstanceByTaskId(loginUser, projectCode, taskId);
@@ -319,16 +296,16 @@ public Result querySubProcessInstanceByTaskId(@ApiIgnore @RequestAttribute(value
* @param subId sub process id
* @return parent instance detail
*/
- @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, dataTypeClass = int.class, example = "100")
+ @Operation(summary = "queryParentInstanceBySubId", description = "QUERY_PARENT_PROCESS_INSTANCE_BY_SUB_PROCESS_INSTANCE_ID_NOTES")
+ @Parameters({
+ @Parameter(name = "subId", description = "SUB_PROCESS_INSTANCE_ID", required = true, schema =@Schema( implementation = int.class, example = "100"))
})
@GetMapping(value = "/query-parent-by-sub")
@ResponseStatus(HttpStatus.OK)
@ApiException(QUERY_PARENT_PROCESS_INSTANCE_DETAIL_INFO_BY_SUB_PROCESS_INSTANCE_ID_ERROR)
@AccessLogAnnotation
- public Result queryParentInstanceBySubId(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
- @ApiParam(name = "projectCode", value = "PROJECT_CODE", required = true) @PathVariable long projectCode,
+ public Result queryParentInstanceBySubId(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true) @PathVariable long projectCode,
@RequestParam("subId") Integer subId) {
Map result = processInstanceService.queryParentInstanceBySubId(loginUser, projectCode, subId);
return returnDataList(result);
@@ -341,16 +318,16 @@ public Result queryParentInstanceBySubId(@ApiIgnore @RequestAttribute(value = Co
* @param id process instance id
* @return variables data
*/
- @ApiOperation(value = "viewVariables", notes = "QUERY_PROCESS_INSTANCE_GLOBAL_VARIABLES_AND_LOCAL_VARIABLES_NOTES")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "id", value = "PROCESS_INSTANCE_ID", required = true, dataTypeClass = int.class, example = "100")
+ @Operation(summary = "viewVariables", description = "QUERY_PROCESS_INSTANCE_GLOBAL_VARIABLES_AND_LOCAL_VARIABLES_NOTES")
+ @Parameters({
+ @Parameter(name = "id", description = "PROCESS_INSTANCE_ID", required = true, schema =@Schema( implementation = int.class, example = "100"))
})
@GetMapping(value = "/{id}/view-variables")
@ResponseStatus(HttpStatus.OK)
@ApiException(QUERY_PROCESS_INSTANCE_ALL_VARIABLES_ERROR)
@AccessLogAnnotation
- public Result viewVariables(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
- @ApiParam(name = "projectCode", value = "PROJECT_CODE", required = true) @PathVariable long projectCode,
+ public Result viewVariables(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true) @PathVariable long projectCode,
@PathVariable("id") Integer id) {
Map result = processInstanceService.viewVariables(projectCode, id);
return returnDataList(result);
@@ -364,16 +341,16 @@ public Result viewVariables(@ApiIgnore @RequestAttribute(value = Constants.SESSI
* @param id process instance id
* @return gantt tree data
*/
- @ApiOperation(value = "vieGanttTree", notes = "VIEW_GANTT_NOTES")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "id", value = "PROCESS_INSTANCE_ID", required = true, dataTypeClass = int.class, example = "100")
+ @Operation(summary = "vieGanttTree", description = "VIEW_GANTT_NOTES")
+ @Parameters({
+ @Parameter(name = "id", description = "PROCESS_INSTANCE_ID", required = true, schema =@Schema( implementation = int.class, example = "100"))
})
@GetMapping(value = "/{id}/view-gantt")
@ResponseStatus(HttpStatus.OK)
@ApiException(ENCAPSULATION_PROCESS_INSTANCE_GANTT_STRUCTURE_ERROR)
@AccessLogAnnotation
- public Result viewTree(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
- @ApiParam(name = "projectCode", value = "PROJECT_CODE", required = true) @PathVariable long projectCode,
+ public Result viewTree(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true) @PathVariable long projectCode,
@PathVariable("id") Integer id) throws Exception {
Map result = processInstanceService.viewGantt(projectCode, id);
return returnDataList(result);
@@ -388,10 +365,10 @@ public Result viewTree(@ApiIgnore @RequestAttribute(value = Constants.SESSION_US
* @param processInstanceIds process instance id
* @return delete result code
*/
- @ApiOperation(value = "batchDeleteProcessInstanceByIds", notes = "BATCH_DELETE_PROCESS_INSTANCE_BY_IDS_NOTES")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "projectCode", value = "PROJECT_CODE", required = true, dataTypeClass = int.class),
- @ApiImplicitParam(name = "processInstanceIds", value = "PROCESS_INSTANCE_IDS", required = true, dataTypeClass = String.class),
+ @Operation(summary = "batchDeleteProcessInstanceByIds", description = "BATCH_DELETE_PROCESS_INSTANCE_BY_IDS_NOTES")
+ @Parameters({
+ @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true, schema =@Schema( implementation = int.class)),
+ @Parameter(name = "processInstanceIds", description = "PROCESS_INSTANCE_IDS", required = true, schema =@Schema( implementation = 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 89d2766b7d34..31e8cc393f89 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
@@ -23,6 +23,11 @@
import static org.apache.dolphinscheduler.api.enums.Status.DELETE_TASK_PROCESS_RELATION_ERROR;
import static org.apache.dolphinscheduler.api.enums.Status.QUERY_TASK_PROCESS_RELATION_ERROR;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Parameters;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.tags.Tag;
import org.apache.dolphinscheduler.api.aspect.AccessLogAnnotation;
import org.apache.dolphinscheduler.api.exceptions.ApiException;
import org.apache.dolphinscheduler.api.service.ProcessTaskRelationService;
@@ -30,8 +35,6 @@
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;
@@ -47,16 +50,10 @@
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;
-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 task relation controller
*/
-@Api(tags = "PROCESS_TASK_RELATION_TAG")
+@Tag(name = "PROCESS_TASK_RELATION_TAG")
@RestController
@RequestMapping("projects/{projectCode}/process-task-relation")
public class ProcessTaskRelationController extends BaseController {
@@ -74,19 +71,19 @@ public class ProcessTaskRelationController extends BaseController {
* @param postTaskCode postTaskCode
* @return create result code
*/
- @ApiOperation(value = "save", notes = "CREATE_PROCESS_TASK_RELATION_NOTES")
- @ApiImplicitParams({
- @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)
+ @Operation(summary = "save", description = "CREATE_PROCESS_TASK_RELATION_NOTES")
+ @Parameters({
+ @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true, schema =@Schema( implementation = long.class)),
+ @Parameter(name = "processDefinitionCode", description = "PROCESS_DEFINITION_CODE", required = true, schema =@Schema( implementation = long.class)),
+ @Parameter(name = "preTaskCode", description = "PRE_TASK_CODE", required = true, schema =@Schema( implementation = long.class)),
+ @Parameter(name = "postTaskCode", description = "POST_TASK_CODE", required = true, schema =@Schema( implementation = long.class))
})
@PostMapping()
@ResponseStatus(HttpStatus.CREATED)
@ApiException(CREATE_PROCESS_TASK_RELATION_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result createProcessTaskRelation(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
- @ApiParam(name = "projectCode", value = "PROJECT_CODE", required = true) @PathVariable long projectCode,
+ public Result createProcessTaskRelation(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true) @PathVariable long projectCode,
@RequestParam(name = "processDefinitionCode", required = true) long processDefinitionCode,
@RequestParam(name = "preTaskCode", required = true) long preTaskCode,
@RequestParam(name = "postTaskCode", required = true) long postTaskCode) {
@@ -111,18 +108,18 @@ public Result createProcessTaskRelation(@ApiIgnore @RequestAttribute(value = Con
* @param taskCode the post task code
* @return delete result code
*/
- @ApiOperation(value = "deleteRelation", notes = "DELETE_PROCESS_TASK_RELATION_NOTES")
- @ApiImplicitParams({
- @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)
+ @Operation(summary = "deleteRelation", description = "DELETE_PROCESS_TASK_RELATION_NOTES")
+ @Parameters({
+ @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true, schema =@Schema( implementation = long.class)),
+ @Parameter(name = "processDefinitionCode", description = "PROCESS_DEFINITION_CODE", required = true, schema =@Schema( implementation = long.class)),
+ @Parameter(name = "taskCode", description = "TASK_CODE", required = true, schema =@Schema( implementation = long.class))
})
@DeleteMapping(value = "/{taskCode}")
@ResponseStatus(HttpStatus.OK)
@ApiException(DELETE_TASK_PROCESS_RELATION_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result deleteTaskProcessRelation(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
- @ApiParam(name = "projectCode", value = "PROJECT_CODE", required = true) @PathVariable long projectCode,
+ public Result deleteTaskProcessRelation(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true) @PathVariable long projectCode,
@RequestParam(name = "processDefinitionCode", required = true) long processDefinitionCode,
@PathVariable("taskCode") long taskCode) {
return returnDataList(processTaskRelationService.deleteTaskProcessRelation(loginUser, projectCode,
@@ -138,18 +135,18 @@ public Result deleteTaskProcessRelation(@ApiIgnore @RequestAttribute(value = Con
* @param taskCode the post task code
* @return delete result code
*/
- @ApiOperation(value = "deleteUpstreamRelation", notes = "DELETE_UPSTREAM_RELATION_NOTES")
- @ApiImplicitParams({
- @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)
+ @Operation(summary = "deleteUpstreamRelation", description = "DELETE_UPSTREAM_RELATION_NOTES")
+ @Parameters({
+ @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true, schema =@Schema( implementation = long.class)),
+ @Parameter(name = "preTaskCodes", description = "PRE_TASK_CODES", required = true, schema =@Schema( implementation = String.class, example = "1,2")),
+ @Parameter(name = "taskCode", description = "TASK_CODE", required = true, schema =@Schema( implementation = long.class))
})
@DeleteMapping(value = "/{taskCode}/upstream")
@ResponseStatus(HttpStatus.OK)
@ApiException(DELETE_TASK_PROCESS_RELATION_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result deleteUpstreamRelation(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
- @ApiParam(name = "projectCode", value = "PROJECT_CODE", required = true) @PathVariable long projectCode,
+ public Result deleteUpstreamRelation(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true) @PathVariable long projectCode,
@RequestParam(name = "preTaskCodes", required = true) String preTaskCodes,
@PathVariable("taskCode") long taskCode) {
return returnDataList(
@@ -165,18 +162,18 @@ public Result deleteUpstreamRelation(@ApiIgnore @RequestAttribute(value = Consta
* @param taskCode the pre task code
* @return delete result code
*/
- @ApiOperation(value = "deleteDownstreamRelation", notes = "DELETE_DOWNSTREAM_RELATION_NOTES")
- @ApiImplicitParams({
- @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)
+ @Operation(summary = "deleteDownstreamRelation", description = "DELETE_DOWNSTREAM_RELATION_NOTES")
+ @Parameters({
+ @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true, schema =@Schema( implementation = long.class)),
+ @Parameter(name = "postTaskCodes", description = "POST_TASK_CODES", required = true, schema =@Schema( implementation = String.class, example = "1,2")),
+ @Parameter(name = "taskCode", description = "TASK_CODE", required = true, schema =@Schema( implementation = long.class))
})
@DeleteMapping(value = "/{taskCode}/downstream")
@ResponseStatus(HttpStatus.OK)
@ApiException(DELETE_TASK_PROCESS_RELATION_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result deleteDownstreamRelation(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
- @ApiParam(name = "projectCode", value = "PROJECT_CODE", required = true) @PathVariable long projectCode,
+ public Result deleteDownstreamRelation(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true) @PathVariable long projectCode,
@RequestParam(name = "postTaskCodes", required = true) String postTaskCodes,
@PathVariable("taskCode") long taskCode) {
return returnDataList(
@@ -191,17 +188,17 @@ public Result deleteDownstreamRelation(@ApiIgnore @RequestAttribute(value = Cons
* @param taskCode current task code (post task code)
* @return process task relation list
*/
- @ApiOperation(value = "queryUpstreamRelation", notes = "QUERY_UPSTREAM_RELATION_NOTES")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "projectCode", value = "PROJECT_CODE", required = true, dataTypeClass = long.class),
- @ApiImplicitParam(name = "taskCode", value = "TASK_CODE", required = true, dataTypeClass = long.class)
+ @Operation(summary = "queryUpstreamRelation", description = "QUERY_UPSTREAM_RELATION_NOTES")
+ @Parameters({
+ @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true, schema =@Schema( implementation = long.class)),
+ @Parameter(name = "taskCode", description = "TASK_CODE", required = true, schema =@Schema( implementation = long.class))
})
@GetMapping(value = "/{taskCode}/upstream")
@ResponseStatus(HttpStatus.OK)
@ApiException(QUERY_TASK_PROCESS_RELATION_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result queryUpstreamRelation(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
- @ApiParam(name = "projectCode", value = "PROJECT_CODE", required = true) @PathVariable long projectCode,
+ public Result queryUpstreamRelation(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true) @PathVariable long projectCode,
@PathVariable("taskCode") long taskCode) {
return returnDataList(processTaskRelationService.queryUpstreamRelation(loginUser, projectCode, taskCode));
}
@@ -214,17 +211,17 @@ public Result queryUpstreamRelation(@ApiIgnore @RequestAttribute(value = Constan
* @param taskCode pre task code
* @return process task relation list
*/
- @ApiOperation(value = "queryDownstreamRelation", notes = "QUERY_DOWNSTREAM_RELATION_NOTES")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "projectCode", value = "PROJECT_CODE", required = true, dataTypeClass = long.class),
- @ApiImplicitParam(name = "taskCode", value = "TASK_CODE", required = true, dataTypeClass = long.class)
+ @Operation(summary = "queryDownstreamRelation", description = "QUERY_DOWNSTREAM_RELATION_NOTES")
+ @Parameters({
+ @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true, schema =@Schema( implementation = long.class)),
+ @Parameter(name = "taskCode", description = "TASK_CODE", required = true, schema =@Schema( implementation = long.class))
})
@GetMapping(value = "/{taskCode}/downstream")
@ResponseStatus(HttpStatus.OK)
@ApiException(QUERY_TASK_PROCESS_RELATION_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result queryDownstreamRelation(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
- @ApiParam(name = "projectCode", value = "PROJECT_CODE", required = true) @PathVariable long projectCode,
+ public Result queryDownstreamRelation(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true) @PathVariable long projectCode,
@PathVariable("taskCode") long taskCode) {
return returnDataList(processTaskRelationService.queryDownstreamRelation(loginUser, projectCode, taskCode));
}
@@ -239,19 +236,19 @@ public Result queryDownstreamRelation(@ApiIgnore @RequestAttribute(value = Const
* @param postTaskCode post task code
* @return delete result code
*/
- @ApiOperation(value = "deleteEdge", notes = "DELETE_EDGE_NOTES")
- @ApiImplicitParams({
- @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)
+ @Operation(summary = "deleteEdge", description = "DELETE_EDGE_NOTES")
+ @Parameters({
+ @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true, schema =@Schema( implementation = long.class)),
+ @Parameter(name = "processDefinitionCode", description = "PROCESS_DEFINITION_CODE", required = true, schema =@Schema( implementation = long.class)),
+ @Parameter(name = "preTaskCode", description = "PRE_TASK_CODE", required = true, schema =@Schema( implementation = long.class)),
+ @Parameter(name = "postTaskCode", description = "POST_TASK_CODE", required = true, schema =@Schema( implementation = 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,
+ public Result deleteEdge(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true) @PathVariable long projectCode,
@PathVariable long processDefinitionCode,
@PathVariable long preTaskCode,
@PathVariable long postTaskCode) {
diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ProcessTaskRelationV2Controller.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ProcessTaskRelationV2Controller.java
index 832646758180..512cdab05f7f 100644
--- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ProcessTaskRelationV2Controller.java
+++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ProcessTaskRelationV2Controller.java
@@ -21,6 +21,11 @@
import static org.apache.dolphinscheduler.api.enums.Status.DELETE_TASK_PROCESS_RELATION_ERROR;
import static org.apache.dolphinscheduler.api.enums.Status.UPDATE_UPSTREAM_TASK_PROCESS_RELATION_ERROR;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Parameters;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.tags.Tag;
import org.apache.dolphinscheduler.api.aspect.AccessLogAnnotation;
import org.apache.dolphinscheduler.api.dto.taskRelation.TaskRelationCreateRequest;
import org.apache.dolphinscheduler.api.dto.taskRelation.TaskRelationDeleteRequest;
@@ -32,8 +37,6 @@
import org.apache.dolphinscheduler.dao.entity.ProcessTaskRelation;
import org.apache.dolphinscheduler.dao.entity.User;
-import springfox.documentation.annotations.ApiIgnore;
-
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
@@ -48,15 +51,10 @@
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiImplicitParam;
-import io.swagger.annotations.ApiImplicitParams;
-import io.swagger.annotations.ApiOperation;
-
/**
* process task relation controller
*/
-@Api(tags = "PROCESS_TASK_RELATION_TAG")
+@Tag(name = "PROCESS_TASK_RELATION_TAG")
@RestController
@RequestMapping("v2/relations")
public class ProcessTaskRelationV2Controller extends BaseController {
@@ -71,12 +69,12 @@ public class ProcessTaskRelationV2Controller extends BaseController {
* @param TaskRelationCreateRequest process task definition json contains the object you want to create
* @return Result object created
*/
- @ApiOperation(value = "create", notes = "CREATE_PROCESS_TASK_RELATION_NOTES")
+ @Operation(summary = "create", description = "CREATE_PROCESS_TASK_RELATION_NOTES")
@PostMapping(consumes = {"application/json"})
@ResponseStatus(HttpStatus.CREATED)
@ApiException(CREATE_PROCESS_TASK_RELATION_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result createTaskRelation(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ public Result createTaskRelation(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@RequestBody TaskRelationCreateRequest TaskRelationCreateRequest) {
ProcessTaskRelation processTaskRelation =
processTaskRelationService.createProcessTaskRelationV2(loginUser, TaskRelationCreateRequest);
@@ -90,15 +88,15 @@ public Result createTaskRelation(@ApiIgnore @RequestAttribu
* @param codePair code pair you want to delete the task relation, use `upstream,downstream` as example, will delete exists relation upstream -> downstream, throw error if not exists
* @return delete result code
*/
- @ApiOperation(value = "delete", notes = "DELETE_PROCESS_TASK_RELATION_NOTES")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "code-pair", value = "TASK_DEFINITION_CODE", dataTypeClass = long.class, example = "123456,78901", required = true)
+ @Operation(summary = "delete", description = "DELETE_PROCESS_TASK_RELATION_NOTES")
+ @Parameters({
+ @Parameter(name = "code-pair", description = "TASK_DEFINITION_CODE", schema =@Schema( implementation = long.class, example = "123456,78901", required = true))
})
@DeleteMapping(value = "/{code-pair}")
@ResponseStatus(HttpStatus.OK)
@ApiException(DELETE_TASK_PROCESS_RELATION_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result deleteTaskRelation(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ public Result deleteTaskRelation(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@PathVariable("code-pair") String codePair) {
TaskRelationDeleteRequest taskRelationDeleteRequest = new TaskRelationDeleteRequest(codePair);
processTaskRelationService.deleteTaskProcessRelationV2(loginUser, taskRelationDeleteRequest.getUpstreamCode(),
@@ -114,15 +112,15 @@ public Result deleteTaskRelation(@ApiIgnore @RequestAttribute(value = Constants.
* @param taskRelationUpdateUpstreamRequest workflowUpdateRequest
* @return ResourceResponse object updated
*/
- @ApiOperation(value = "update", notes = "UPDATE_PROCESS_TASK_RELATION_NOTES")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "code", value = "DOWMSTREAM_TASK_DEFINITION_CODE", dataTypeClass = long.class, example = "123456", required = true)
+ @Operation(summary = "update", description = "UPDATE_PROCESS_TASK_RELATION_NOTES")
+ @Parameters({
+ @Parameter(name = "code", description = "DOWMSTREAM_TASK_DEFINITION_CODE", schema =@Schema( implementation = long.class, example = "123456", required = true))
})
@PutMapping(value = "/{code}")
@ResponseStatus(HttpStatus.OK)
@ApiException(UPDATE_UPSTREAM_TASK_PROCESS_RELATION_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result> updateUpstreamTaskDefinition(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ public Result> updateUpstreamTaskDefinition(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@PathVariable("code") Long code,
@RequestBody TaskRelationUpdateUpstreamRequest taskRelationUpdateUpstreamRequest) {
List processTaskRelations = processTaskRelationService
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 14c2cde3ee61..9acdee155857 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
@@ -27,6 +27,11 @@
import static org.apache.dolphinscheduler.api.enums.Status.QUERY_UNAUTHORIZED_PROJECT_ERROR;
import static org.apache.dolphinscheduler.api.enums.Status.UPDATE_PROJECT_ERROR;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Parameters;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.tags.Tag;
import org.apache.dolphinscheduler.api.aspect.AccessLogAnnotation;
import org.apache.dolphinscheduler.api.exceptions.ApiException;
import org.apache.dolphinscheduler.api.service.ProjectService;
@@ -35,8 +40,6 @@
import org.apache.dolphinscheduler.dao.entity.User;
import org.apache.dolphinscheduler.plugin.task.api.utils.ParameterUtils;
-import springfox.documentation.annotations.ApiIgnore;
-
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@@ -52,15 +55,10 @@
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiImplicitParam;
-import io.swagger.annotations.ApiImplicitParams;
-import io.swagger.annotations.ApiOperation;
-
/**
* project controller
*/
-@Api(tags = "PROJECT_TAG")
+@Tag(name = "PROJECT_TAG")
@RestController
@RequestMapping("projects")
public class ProjectController extends BaseController {
@@ -78,16 +76,16 @@ public class ProjectController extends BaseController {
* @param description description
* @return returns an error if it exists
*/
- @ApiOperation(value = "create", notes = "CREATE_PROJECT_NOTES")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "projectName", value = "PROJECT_NAME", dataTypeClass = String.class),
- @ApiImplicitParam(name = "description", value = "PROJECT_DESC", dataTypeClass = String.class)
+ @Operation(summary = "create", description = "CREATE_PROJECT_NOTES")
+ @Parameters({
+ @Parameter(name = "projectName", description = "PROJECT_NAME", schema =@Schema( implementation = String.class)),
+ @Parameter(name = "description", description = "PROJECT_DESC", schema =@Schema( implementation = String.class))
})
@PostMapping()
@ResponseStatus(HttpStatus.CREATED)
@ApiException(CREATE_PROJECT_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result createProject(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ public Result createProject(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@RequestParam("projectName") String projectName,
@RequestParam(value = "description", required = false) String description) {
return projectService.createProject(loginUser, projectName, description);
@@ -102,18 +100,18 @@ public Result createProject(@ApiIgnore @RequestAttribute(value = Constants.SESSI
* @param description description
* @return update result code
*/
- @ApiOperation(value = "update", notes = "UPDATE_PROJECT_NOTES")
- @ApiImplicitParams({
- @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),
+ @Operation(summary = "update", description = "UPDATE_PROJECT_NOTES")
+ @Parameters({
+ @Parameter(name = "code", description = "PROJECT_CODE", schema =@Schema( implementation = long.class, example = "123456")),
+ @Parameter(name = "projectName", description = "PROJECT_NAME", schema =@Schema( implementation = String.class)),
+ @Parameter(name = "description", description = "PROJECT_DESC", schema =@Schema( implementation = String.class)),
+ @Parameter(name = "userName", description = "USER_NAME", schema =@Schema( implementation = String.class)),
})
@PutMapping(value = "/{code}")
@ResponseStatus(HttpStatus.OK)
@ApiException(UPDATE_PROJECT_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result updateProject(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ public Result updateProject(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@PathVariable("code") Long code,
@RequestParam("projectName") String projectName,
@RequestParam(value = "description", required = false) String description,
@@ -128,15 +126,15 @@ public Result updateProject(@ApiIgnore @RequestAttribute(value = Constants.SESSI
* @param code project code
* @return project detail information
*/
- @ApiOperation(value = "queryProjectByCode", notes = "QUERY_PROJECT_BY_ID_NOTES")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "code", value = "PROJECT_CODE", dataTypeClass = long.class, example = "123456")
+ @Operation(summary = "queryProjectByCode", description = "QUERY_PROJECT_BY_ID_NOTES")
+ @Parameters({
+ @Parameter(name = "code", description = "PROJECT_CODE", schema =@Schema( implementation = long.class, example = "123456"))
})
@GetMapping(value = "/{code}")
@ResponseStatus(HttpStatus.OK)
@ApiException(QUERY_PROJECT_DETAILS_BY_CODE_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result queryProjectByCode(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ public Result queryProjectByCode(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@PathVariable("code") long code) {
return projectService.queryByCode(loginUser, code);
}
@@ -150,17 +148,17 @@ public Result queryProjectByCode(@ApiIgnore @RequestAttribute(value = Constants.
* @param pageNo page number
* @return project list which the login user have permission to see
*/
- @ApiOperation(value = "queryProjectListPaging", notes = "QUERY_PROJECT_LIST_PAGING_NOTES")
- @ApiImplicitParams({
- @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")
+ @Operation(summary = "queryProjectListPaging", description = "QUERY_PROJECT_LIST_PAGING_NOTES")
+ @Parameters({
+ @Parameter(name = "searchVal", description = "SEARCH_VAL", schema =@Schema( implementation = String.class)),
+ @Parameter(name = "pageSize", description = "PAGE_SIZE", required = true, schema =@Schema( implementation = int.class, example = "10")),
+ @Parameter(name = "pageNo", description = "PAGE_NO", required = true, schema =@Schema( implementation = int.class, example = "1"))
})
@GetMapping()
@ResponseStatus(HttpStatus.OK)
@ApiException(LOGIN_USER_QUERY_PROJECT_LIST_PAGING_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result queryProjectListPaging(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ public Result queryProjectListPaging(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@RequestParam(value = "searchVal", required = false) String searchVal,
@RequestParam("pageSize") Integer pageSize,
@RequestParam("pageNo") Integer pageNo) {
@@ -182,15 +180,15 @@ public Result queryProjectListPaging(@ApiIgnore @RequestAttribute(value = Consta
* @param code project code
* @return delete result code
*/
- @ApiOperation(value = "delete", notes = "DELETE_PROJECT_BY_ID_NOTES")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "code", value = "PROJECT_CODE", dataTypeClass = long.class, example = "123456")
+ @Operation(summary = "delete", description = "DELETE_PROJECT_BY_ID_NOTES")
+ @Parameters({
+ @Parameter(name = "code", description = "PROJECT_CODE", schema =@Schema( implementation = long.class, example = "123456"))
})
@DeleteMapping(value = "/{code}")
@ResponseStatus(HttpStatus.OK)
@ApiException(DELETE_PROJECT_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result deleteProject(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ public Result deleteProject(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@PathVariable("code") Long code) {
return projectService.deleteProject(loginUser, code);
}
@@ -202,15 +200,15 @@ public Result deleteProject(@ApiIgnore @RequestAttribute(value = Constants.SESSI
* @param userId user id
* @return the projects which user have not permission to see
*/
- @ApiOperation(value = "queryUnauthorizedProject", notes = "QUERY_UNAUTHORIZED_PROJECT_NOTES")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "userId", value = "USER_ID", dataTypeClass = int.class, example = "100")
+ @Operation(summary = "queryUnauthorizedProject", description = "QUERY_UNAUTHORIZED_PROJECT_NOTES")
+ @Parameters({
+ @Parameter(name = "userId", description = "USER_ID", schema =@Schema( implementation = int.class, example = "100"))
})
@GetMapping(value = "/unauth-project")
@ResponseStatus(HttpStatus.OK)
@ApiException(QUERY_UNAUTHORIZED_PROJECT_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result queryUnauthorizedProject(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ public Result queryUnauthorizedProject(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@RequestParam("userId") Integer userId) {
return projectService.queryUnauthorizedProject(loginUser, userId);
}
@@ -222,15 +220,15 @@ public Result queryUnauthorizedProject(@ApiIgnore @RequestAttribute(value = Cons
* @param userId user id
* @return projects which the user have permission to see, Except for items created by this user
*/
- @ApiOperation(value = "queryAuthorizedProject", notes = "QUERY_AUTHORIZED_PROJECT_NOTES")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "userId", value = "USER_ID", dataTypeClass = int.class, example = "100")
+ @Operation(summary = "queryAuthorizedProject", description = "QUERY_AUTHORIZED_PROJECT_NOTES")
+ @Parameters({
+ @Parameter(name = "userId", description = "USER_ID", schema =@Schema( implementation = int.class, example = "100"))
})
@GetMapping(value = "/authed-project")
@ResponseStatus(HttpStatus.OK)
@ApiException(QUERY_AUTHORIZED_PROJECT)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result queryAuthorizedProject(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ public Result queryAuthorizedProject(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@RequestParam("userId") Integer userId) {
return projectService.queryAuthorizedProject(loginUser, userId);
}
@@ -242,15 +240,15 @@ public Result queryAuthorizedProject(@ApiIgnore @RequestAttribute(value = Consta
* @param projectCode project code
* @return users who have permission for the specified project
*/
- @ApiOperation(value = "queryAuthorizedUser", notes = "QUERY_AUTHORIZED_USER_NOTES")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "projectCode", value = "PROJECT_CODE", dataTypeClass = long.class, example = "100")
+ @Operation(summary = "queryAuthorizedUser", description = "QUERY_AUTHORIZED_USER_NOTES")
+ @Parameters({
+ @Parameter(name = "projectCode", description = "PROJECT_CODE", schema =@Schema( implementation = long.class, example = "100"))
})
@GetMapping(value = "/authed-user")
@ResponseStatus(HttpStatus.OK)
@ApiException(QUERY_AUTHORIZED_USER)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result queryAuthorizedUser(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ public Result queryAuthorizedUser(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@RequestParam("projectCode") Long projectCode) {
return projectService.queryAuthorizedUser(loginUser, projectCode);
}
@@ -261,12 +259,12 @@ public Result queryAuthorizedUser(@ApiIgnore @RequestAttribute(value = Constants
* @param loginUser login user
* @return projects which the user create and authorized
*/
- @ApiOperation(value = "queryProjectCreatedAndAuthorizedByUser", notes = "QUERY_AUTHORIZED_AND_USER_CREATED_PROJECT_NOTES")
+ @Operation(summary = "queryProjectCreatedAndAuthorizedByUser", description = "QUERY_AUTHORIZED_AND_USER_CREATED_PROJECT_NOTES")
@GetMapping(value = "/created-and-authed")
@ResponseStatus(HttpStatus.OK)
@ApiException(QUERY_AUTHORIZED_AND_USER_CREATED_PROJECT_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result queryProjectCreatedAndAuthorizedByUser(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser) {
+ public Result queryProjectCreatedAndAuthorizedByUser(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser) {
return projectService.queryProjectCreatedAndAuthorizedByUser(loginUser);
}
@@ -276,12 +274,12 @@ public Result queryProjectCreatedAndAuthorizedByUser(@ApiIgnore @RequestAttribut
* @param loginUser login user
* @return all project list
*/
- @ApiOperation(value = "queryAllProjectList", notes = "QUERY_ALL_PROJECT_LIST_NOTES")
+ @Operation(summary = "queryAllProjectList", description = "QUERY_ALL_PROJECT_LIST_NOTES")
@GetMapping(value = "/list")
@ResponseStatus(HttpStatus.OK)
@ApiException(LOGIN_USER_QUERY_PROJECT_LIST_PAGING_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result queryAllProjectList(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser) {
+ public Result queryAllProjectList(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser) {
return projectService.queryAllProjectList(loginUser);
}
@@ -291,12 +289,12 @@ public Result queryAllProjectList(@ApiIgnore @RequestAttribute(value = Constants
* @param loginUser login user
* @return all project list
*/
- @ApiOperation(value = "queryAllProjectListForDependent", notes = "QUERY_ALL_PROJECT_LIST_FOR_DEPENDENT_NOTES")
+ @Operation(summary = "queryAllProjectListForDependent", description = "QUERY_ALL_PROJECT_LIST_FOR_DEPENDENT_NOTES")
@GetMapping(value = "/list-dependent")
@ResponseStatus(HttpStatus.OK)
@ApiException(LOGIN_USER_QUERY_PROJECT_LIST_PAGING_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result queryAllProjectListForDependent(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser) {
+ public Result queryAllProjectListForDependent(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser) {
return projectService.queryAllProjectListForDependent();
}
}
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 b167f9b47e96..610be8208c77 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
@@ -27,6 +27,11 @@
import static org.apache.dolphinscheduler.api.enums.Status.QUERY_UNAUTHORIZED_PROJECT_ERROR;
import static org.apache.dolphinscheduler.api.enums.Status.UPDATE_PROJECT_ERROR;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Parameters;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.tags.Tag;
import org.apache.dolphinscheduler.api.aspect.AccessLogAnnotation;
import org.apache.dolphinscheduler.api.dto.project.ProjectCreateRequest;
import org.apache.dolphinscheduler.api.dto.project.ProjectCreateResponse;
@@ -45,8 +50,6 @@
import org.apache.dolphinscheduler.dao.entity.User;
import org.apache.dolphinscheduler.plugin.task.api.utils.ParameterUtils;
-import springfox.documentation.annotations.ApiIgnore;
-
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.DeleteMapping;
@@ -61,15 +64,10 @@
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiImplicitParam;
-import io.swagger.annotations.ApiImplicitParams;
-import io.swagger.annotations.ApiOperation;
-
/**
* project controller
*/
-@Api(tags = "PROJECT_TAG")
+@Tag(name = "PROJECT_TAG")
@RestController
@RequestMapping("/v2/projects")
public class ProjectV2Controller extends BaseController {
@@ -84,12 +82,12 @@ public class ProjectV2Controller extends BaseController {
* @param projectCreateRequest projectCreateRequest
* @return ProjectResponse ProjectResponse
*/
- @ApiOperation(value = "create", notes = "CREATE_PROJECT_NOTES")
+ @Operation(summary = "create", description = "CREATE_PROJECT_NOTES")
@PostMapping(consumes = {"application/json"})
@ResponseStatus(HttpStatus.CREATED)
@ApiException(CREATE_PROJECT_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public ProjectCreateResponse createProject(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ public ProjectCreateResponse createProject(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@RequestBody ProjectCreateRequest projectCreateRequest) {
Result result = projectService.createProject(loginUser, projectCreateRequest.getProjectName(),
projectCreateRequest.getDescription());
@@ -104,12 +102,12 @@ public ProjectCreateResponse createProject(@ApiIgnore @RequestAttribute(value =
* @param projectUpdateReq projectUpdateRequest
* @return result Result
*/
- @ApiOperation(value = "update", notes = "UPDATE_PROJECT_NOTES")
+ @Operation(summary = "update", description = "UPDATE_PROJECT_NOTES")
@PutMapping(value = "/{code}", consumes = {"application/json"})
@ResponseStatus(HttpStatus.OK)
@ApiException(UPDATE_PROJECT_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public ProjectUpdateResponse updateProject(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ public ProjectUpdateResponse updateProject(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@PathVariable("code") Long code,
@RequestBody ProjectUpdateRequest projectUpdateReq) {
Result result = projectService.update(loginUser, code, projectUpdateReq.getProjectName(),
@@ -124,15 +122,15 @@ public ProjectUpdateResponse updateProject(@ApiIgnore @RequestAttribute(value =
* @param code project code
* @return project detail information
*/
- @ApiOperation(value = "queryProjectByCode", notes = "QUERY_PROJECT_BY_ID_NOTES")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "code", value = "PROJECT_CODE", dataTypeClass = long.class, example = "123456", required = true)
+ @Operation(summary = "queryProjectByCode", description = "QUERY_PROJECT_BY_ID_NOTES")
+ @Parameters({
+ @Parameter(name = "code", description = "PROJECT_CODE", schema =@Schema( implementation = long.class, example = "123456", required = true))
})
@GetMapping(value = "/{code}")
@ResponseStatus(HttpStatus.OK)
@ApiException(QUERY_PROJECT_DETAILS_BY_CODE_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public ProjectQueryResponse queryProjectByCode(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ public ProjectQueryResponse queryProjectByCode(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@PathVariable("code") long code) {
Result result = projectService.queryByCode(loginUser, code);
return new ProjectQueryResponse(result);
@@ -145,17 +143,17 @@ public ProjectQueryResponse queryProjectByCode(@ApiIgnore @RequestAttribute(valu
* @param projectQueryReq projectQueryReq
* @return project list which the login user have permission to see
*/
- @ApiOperation(value = "queryProjectListPaging", notes = "QUERY_PROJECT_LIST_PAGING_NOTES")
- @ApiImplicitParams({
- @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")
+ @Operation(summary = "queryProjectListPaging", description = "QUERY_PROJECT_LIST_PAGING_NOTES")
+ @Parameters({
+ @Parameter(name = "searchVal", description = "SEARCH_VAL", schema =@Schema( implementation = String.class, example = "test")),
+ @Parameter(name = "pageSize", description = "PAGE_SIZE", required = true, schema =@Schema( implementation = int.class, example = "10")),
+ @Parameter(name = "pageNo", description = "PAGE_NO", required = true, schema =@Schema( implementation = int.class, example = "1"))
})
@GetMapping(consumes = {"application/json"})
@ResponseStatus(HttpStatus.OK)
@ApiException(LOGIN_USER_QUERY_PROJECT_LIST_PAGING_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public ProjectListPagingResponse queryProjectListPaging(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ public ProjectListPagingResponse queryProjectListPaging(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
ProjectQueryRequest projectQueryReq) {
Result result = checkPageParams(projectQueryReq.getPageNo(), projectQueryReq.getPageSize());
if (!result.checkResult()) {
@@ -174,15 +172,15 @@ public ProjectListPagingResponse queryProjectListPaging(@ApiIgnore @RequestAttri
* @param code project code
* @return delete result code
*/
- @ApiOperation(value = "delete", notes = "DELETE_PROJECT_BY_ID_NOTES")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "code", value = "PROJECT_CODE", dataTypeClass = long.class, example = "123456", required = true)
+ @Operation(summary = "delete", description = "DELETE_PROJECT_BY_ID_NOTES")
+ @Parameters({
+ @Parameter(name = "code", description = "PROJECT_CODE", schema =@Schema( implementation = long.class, example = "123456", required = true))
})
@DeleteMapping(value = "/{code}")
@ResponseStatus(HttpStatus.OK)
@ApiException(DELETE_PROJECT_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public ProjectDeleteResponse deleteProject(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ public ProjectDeleteResponse deleteProject(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@PathVariable("code") Long code) {
Result result = projectService.deleteProject(loginUser, code);
return new ProjectDeleteResponse(result);
@@ -195,15 +193,15 @@ public ProjectDeleteResponse deleteProject(@ApiIgnore @RequestAttribute(value =
* @param userId user id
* @return the projects which user have not permission to see
*/
- @ApiOperation(value = "queryUnauthorizedProject", notes = "QUERY_UNAUTHORIZED_PROJECT_NOTES")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "userId", value = "USER_ID", dataTypeClass = int.class, example = "100", required = true)
+ @Operation(summary = "queryUnauthorizedProject", description = "QUERY_UNAUTHORIZED_PROJECT_NOTES")
+ @Parameters({
+ @Parameter(name = "userId", description = "USER_ID", schema =@Schema( implementation = int.class, example = "100", required = true))
})
@GetMapping(value = "/unauth-project")
@ResponseStatus(HttpStatus.OK)
@ApiException(QUERY_UNAUTHORIZED_PROJECT_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public ProjectListResponse queryUnauthorizedProject(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ public ProjectListResponse queryUnauthorizedProject(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@RequestParam("userId") Integer userId) {
Result result = projectService.queryUnauthorizedProject(loginUser, userId);
return new ProjectListResponse(result);
@@ -216,15 +214,15 @@ public ProjectListResponse queryUnauthorizedProject(@ApiIgnore @RequestAttribute
* @param userId user id
* @return projects which the user have permission to see, Except for items created by this user
*/
- @ApiOperation(value = "queryAuthorizedProject", notes = "QUERY_AUTHORIZED_PROJECT_NOTES")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "userId", value = "USER_ID", dataTypeClass = int.class, example = "100", required = true)
+ @Operation(summary = "queryAuthorizedProject", description = "QUERY_AUTHORIZED_PROJECT_NOTES")
+ @Parameters({
+ @Parameter(name = "userId", description = "USER_ID", schema =@Schema( implementation = int.class, example = "100", required = true))
})
@GetMapping(value = "/authed-project")
@ResponseStatus(HttpStatus.OK)
@ApiException(QUERY_AUTHORIZED_PROJECT)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public ProjectListResponse queryAuthorizedProject(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ public ProjectListResponse queryAuthorizedProject(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@RequestParam("userId") Integer userId) {
Result result = projectService.queryAuthorizedProject(loginUser, userId);
return new ProjectListResponse(result);
@@ -237,15 +235,15 @@ public ProjectListResponse queryAuthorizedProject(@ApiIgnore @RequestAttribute(v
* @param projectCode project code
* @return users who have permission for the specified project
*/
- @ApiOperation(value = "queryAuthorizedUser", notes = "QUERY_AUTHORIZED_USER_NOTES")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "projectCode", value = "PROJECT_CODE", dataTypeClass = long.class, example = "100", required = true)
+ @Operation(summary = "queryAuthorizedUser", description = "QUERY_AUTHORIZED_USER_NOTES")
+ @Parameters({
+ @Parameter(name = "projectCode", description = "PROJECT_CODE", schema =@Schema( implementation = long.class, example = "100", required = true))
})
@GetMapping(value = "/authed-user")
@ResponseStatus(HttpStatus.OK)
@ApiException(QUERY_AUTHORIZED_USER)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public UserListResponse queryAuthorizedUser(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ public UserListResponse queryAuthorizedUser(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@RequestParam("projectCode") Long projectCode) {
Result result = projectService.queryAuthorizedUser(loginUser, projectCode);
return new UserListResponse(result);
@@ -257,15 +255,15 @@ public UserListResponse queryAuthorizedUser(@ApiIgnore @RequestAttribute(value =
* @param loginUser login user
* @return projects which the user create and authorized
*/
- @ApiOperation(value = "queryProjectCreatedAndAuthorizedByUser", notes = "QUERY_AUTHORIZED_AND_USER_CREATED_PROJECT_NOTES")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "loginUser", value = "LOGIN_USER", dataTypeClass = Object.class, example = "\"{id:100}\"", required = true)
+ @Operation(summary = "queryProjectCreatedAndAuthorizedByUser", description = "QUERY_AUTHORIZED_AND_USER_CREATED_PROJECT_NOTES")
+ @Parameters({
+ @Parameter(name = "loginUser", description = "LOGIN_USER", schema =@Schema( implementation = Object.class, example = "\"{id:100}\"", required = true))
})
@GetMapping(value = "/created-and-authed")
@ResponseStatus(HttpStatus.OK)
@ApiException(QUERY_AUTHORIZED_AND_USER_CREATED_PROJECT_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public ProjectListResponse queryProjectCreatedAndAuthorizedByUser(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser) {
+ public ProjectListResponse queryProjectCreatedAndAuthorizedByUser(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser) {
Result result = projectService.queryProjectCreatedAndAuthorizedByUser(loginUser);
return new ProjectListResponse(result);
}
@@ -276,15 +274,15 @@ public ProjectListResponse queryProjectCreatedAndAuthorizedByUser(@ApiIgnore @Re
* @param loginUser login user
* @return all project list
*/
- @ApiOperation(value = "queryAllProjectList", notes = "QUERY_ALL_PROJECT_LIST_NOTES")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "loginUser", value = "LOGIN_USER", dataTypeClass = Object.class, example = "\"{id:100}\"", required = true)
+ @Operation(summary = "queryAllProjectList", description = "QUERY_ALL_PROJECT_LIST_NOTES")
+ @Parameters({
+ @Parameter(name = "loginUser", description = "LOGIN_USER", schema =@Schema( implementation = Object.class, example = "\"{id:100}\"", required = true))
})
@GetMapping(value = "/list")
@ResponseStatus(HttpStatus.OK)
@ApiException(LOGIN_USER_QUERY_PROJECT_LIST_PAGING_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public ProjectListResponse queryAllProjectList(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser) {
+ public ProjectListResponse queryAllProjectList(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser) {
Result result = projectService.queryAllProjectList(loginUser);
return new ProjectListResponse(result);
}
@@ -295,12 +293,12 @@ public ProjectListResponse queryAllProjectList(@ApiIgnore @RequestAttribute(valu
* @param loginUser login user
* @return all project list
*/
- @ApiOperation(value = "queryAllProjectListForDependent", notes = "QUERY_ALL_PROJECT_LIST_FOR_DEPENDENT_NOTES")
+ @Operation(summary = "queryAllProjectListForDependent", description = "QUERY_ALL_PROJECT_LIST_FOR_DEPENDENT_NOTES")
@GetMapping(value = "/list-dependent")
@ResponseStatus(HttpStatus.OK)
@ApiException(LOGIN_USER_QUERY_PROJECT_LIST_PAGING_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public ProjectListResponse queryAllProjectListForDependent(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser) {
+ public ProjectListResponse queryAllProjectListForDependent(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser) {
Result result = projectService.queryAllProjectListForDependent();
return new ProjectListResponse(result);
}
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 d71760be1103..241ff219544e 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
@@ -22,6 +22,11 @@
import static org.apache.dolphinscheduler.api.enums.Status.UPDATE_QUEUE_ERROR;
import static org.apache.dolphinscheduler.api.enums.Status.VERIFY_QUEUE_ERROR;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Parameters;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.tags.Tag;
import org.apache.dolphinscheduler.api.aspect.AccessLogAnnotation;
import org.apache.dolphinscheduler.api.exceptions.ApiException;
import org.apache.dolphinscheduler.api.service.QueueService;
@@ -30,8 +35,6 @@
import org.apache.dolphinscheduler.dao.entity.User;
import org.apache.dolphinscheduler.plugin.task.api.utils.ParameterUtils;
-import springfox.documentation.annotations.ApiIgnore;
-
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.GetMapping;
@@ -44,15 +47,10 @@
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiImplicitParam;
-import io.swagger.annotations.ApiImplicitParams;
-import io.swagger.annotations.ApiOperation;
-
/**
* queue controller
*/
-@Api(tags = "QUEUE_TAG")
+@Tag(name = "QUEUE_TAG")
@RestController
@RequestMapping("/queues")
public class QueueController extends BaseController {
@@ -66,12 +64,12 @@ public class QueueController extends BaseController {
* @param loginUser login user
* @return queue list
*/
- @ApiOperation(value = "queryList", notes = "QUERY_QUEUE_LIST_NOTES")
+ @Operation(summary = "queryList", description = "QUERY_QUEUE_LIST_NOTES")
@GetMapping(value = "/list")
@ResponseStatus(HttpStatus.OK)
@ApiException(QUERY_QUEUE_LIST_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result queryList(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser) {
+ public Result queryList(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser) {
return queueService.queryList(loginUser);
}
@@ -84,17 +82,17 @@ public Result queryList(@ApiIgnore @RequestAttribute(value = Constants.SESSION_U
* @param pageSize page size
* @return queue list
*/
- @ApiOperation(value = "queryQueueListPaging", notes = "QUERY_QUEUE_LIST_PAGING_NOTES")
- @ApiImplicitParams({
- @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")
+ @Operation(summary = "queryQueueListPaging", description = "QUERY_QUEUE_LIST_PAGING_NOTES")
+ @Parameters({
+ @Parameter(name = "searchVal", description = "SEARCH_VAL", schema =@Schema( implementation = String.class)),
+ @Parameter(name = "pageNo", description = "PAGE_NO", required = true, schema =@Schema( implementation = int.class, example = "1")),
+ @Parameter(name = "pageSize", description = "PAGE_SIZE", required = true, schema =@Schema( implementation = int.class, example = "20"))
})
@GetMapping()
@ResponseStatus(HttpStatus.OK)
@ApiException(QUERY_QUEUE_LIST_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result queryQueueListPaging(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ public Result queryQueueListPaging(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@RequestParam("pageNo") Integer pageNo,
@RequestParam(value = "searchVal", required = false) String searchVal,
@RequestParam("pageSize") Integer pageSize) {
@@ -116,16 +114,16 @@ public Result queryQueueListPaging(@ApiIgnore @RequestAttribute(value = Constant
* @param queueName queue name
* @return create result
*/
- @ApiOperation(value = "createQueue", notes = "CREATE_QUEUE_NOTES")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "queue", value = "YARN_QUEUE_NAME", required = true, dataTypeClass = String.class),
- @ApiImplicitParam(name = "queueName", value = "QUEUE_NAME", required = true, dataTypeClass = String.class)
+ @Operation(summary = "createQueue", description = "CREATE_QUEUE_NOTES")
+ @Parameters({
+ @Parameter(name = "queue", description = "YARN_QUEUE_NAME", required = true, schema =@Schema( implementation = String.class)),
+ @Parameter(name = "queueName", description = "QUEUE_NAME", required = true, schema =@Schema( implementation = String.class))
})
@PostMapping()
@ResponseStatus(HttpStatus.CREATED)
@ApiException(CREATE_QUEUE_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result createQueue(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ public Result createQueue(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@RequestParam(value = "queue") String queue,
@RequestParam(value = "queueName") String queueName) {
return queueService.createQueue(loginUser, queue, queueName);
@@ -140,17 +138,17 @@ public Result createQueue(@ApiIgnore @RequestAttribute(value = Constants.SESSION
* @param queueName queue name
* @return update result code
*/
- @ApiOperation(value = "updateQueue", notes = "UPDATE_QUEUE_NOTES")
- @ApiImplicitParams({
- @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)
+ @Operation(summary = "updateQueue", description = "UPDATE_QUEUE_NOTES")
+ @Parameters({
+ @Parameter(name = "id", description = "QUEUE_ID", required = true, schema =@Schema( implementation = int.class, example = "100")),
+ @Parameter(name = "queue", description = "YARN_QUEUE_NAME", required = true, schema =@Schema( implementation = String.class)),
+ @Parameter(name = "queueName", description = "QUEUE_NAME", required = true, schema =@Schema( implementation = String.class))
})
@PutMapping(value = "/{id}")
@ResponseStatus(HttpStatus.CREATED)
@ApiException(UPDATE_QUEUE_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result updateQueue(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ public Result updateQueue(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@PathVariable(value = "id") int id,
@RequestParam(value = "queue") String queue,
@RequestParam(value = "queueName") String queueName) {
@@ -165,16 +163,16 @@ public Result updateQueue(@ApiIgnore @RequestAttribute(value = Constants.SESSION
* @param queueName queue name
* @return true if the queue name not exists, otherwise return false
*/
- @ApiOperation(value = "verifyQueue", notes = "VERIFY_QUEUE_NOTES")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "queue", value = "YARN_QUEUE_NAME", required = true, dataTypeClass = String.class),
- @ApiImplicitParam(name = "queueName", value = "QUEUE_NAME", required = true, dataTypeClass = String.class)
+ @Operation(summary = "verifyQueue", description = "VERIFY_QUEUE_NOTES")
+ @Parameters({
+ @Parameter(name = "queue", description = "YARN_QUEUE_NAME", required = true, schema =@Schema( implementation = String.class)),
+ @Parameter(name = "queueName", description = "QUEUE_NAME", required = true, schema =@Schema( implementation = String.class))
})
@PostMapping(value = "/verify")
@ResponseStatus(HttpStatus.OK)
@ApiException(VERIFY_QUEUE_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result verifyQueue(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ public Result verifyQueue(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@RequestParam(value = "queue") String queue,
@RequestParam(value = "queueName") String queueName) {
return queueService.verifyQueue(queue, queueName);
diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/QueueV2Controller.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/QueueV2Controller.java
index ec87292fbaf2..2d5cde2028c9 100644
--- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/QueueV2Controller.java
+++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/QueueV2Controller.java
@@ -22,6 +22,11 @@
import static org.apache.dolphinscheduler.api.enums.Status.UPDATE_QUEUE_ERROR;
import static org.apache.dolphinscheduler.api.enums.Status.VERIFY_QUEUE_ERROR;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Parameters;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.tags.Tag;
import org.apache.dolphinscheduler.api.aspect.AccessLogAnnotation;
import org.apache.dolphinscheduler.api.dto.queue.QueueCreateRequest;
import org.apache.dolphinscheduler.api.dto.queue.QueueCreateResponse;
@@ -36,10 +41,8 @@
import org.apache.dolphinscheduler.api.service.QueueService;
import org.apache.dolphinscheduler.api.utils.Result;
import org.apache.dolphinscheduler.common.Constants;
-import org.apache.dolphinscheduler.dao.entity.User;
import org.apache.dolphinscheduler.plugin.task.api.utils.ParameterUtils;
-
-import springfox.documentation.annotations.ApiIgnore;
+import org.apache.dolphinscheduler.dao.entity.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
@@ -53,15 +56,10 @@
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiImplicitParam;
-import io.swagger.annotations.ApiImplicitParams;
-import io.swagger.annotations.ApiOperation;
-
/**
* queue controller
*/
-@Api(tags = "QUEUE_TAG")
+@Tag(name = "QUEUE_TAG")
@RestController
@RequestMapping("/v2/queues")
public class QueueV2Controller extends BaseController {
@@ -75,12 +73,12 @@ public class QueueV2Controller extends BaseController {
* @param loginUser login user
* @return queue list
*/
- @ApiOperation(value = "queryList", notes = "QUERY_QUEUE_LIST_NOTES")
+ @Operation(summary = "queryList", description = "QUERY_QUEUE_LIST_NOTES")
@GetMapping(value = "/list")
@ResponseStatus(HttpStatus.OK)
@ApiException(QUERY_QUEUE_LIST_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public QueueListResponse queryList(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser) {
+ public QueueListResponse queryList(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser) {
Result result = queueService.queryList(loginUser);
return new QueueListResponse(result);
}
@@ -92,17 +90,17 @@ public QueueListResponse queryList(@ApiIgnore @RequestAttribute(value = Constant
* @param queueQueryRequest queueQueryRequest
* @return queue list
*/
- @ApiOperation(value = "queryQueueListPaging", notes = "QUERY_QUEUE_LIST_PAGING_NOTES")
- @ApiImplicitParams({
- @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")
+ @Operation(summary = "queryQueueListPaging", description = "QUERY_QUEUE_LIST_PAGING_NOTES")
+ @Parameters({
+ @Parameter(name = "searchVal", description = "SEARCH_VAL", schema =@Schema( implementation = String.class)),
+ @Parameter(name = "pageNo", description = "PAGE_NO", required = true, schema =@Schema( implementation = int.class, example = "1")),
+ @Parameter(name = "pageSize", description = "PAGE_SIZE", required = true, schema =@Schema( implementation = int.class, example = "20"))
})
@GetMapping()
@ResponseStatus(HttpStatus.OK)
@ApiException(QUERY_QUEUE_LIST_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public QueueListPagingResponse queryQueueListPaging(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ public QueueListPagingResponse queryQueueListPaging(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
QueueQueryRequest queueQueryRequest) {
Result result = checkPageParams(queueQueryRequest.getPageNo(), queueQueryRequest.getPageSize());
if (!result.checkResult()) {
@@ -122,12 +120,12 @@ public QueueListPagingResponse queryQueueListPaging(@ApiIgnore @RequestAttribute
* @param queueCreateRequest queueCreateRequest
* @return create result
*/
- @ApiOperation(value = "createQueue", notes = "CREATE_QUEUE_NOTES")
+ @Operation(summary = "createQueue", description = "CREATE_QUEUE_NOTES")
@PostMapping(consumes = {"application/json"})
@ResponseStatus(HttpStatus.CREATED)
@ApiException(CREATE_QUEUE_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public QueueCreateResponse createQueue(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ public QueueCreateResponse createQueue(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@RequestBody QueueCreateRequest queueCreateRequest) {
Result result =
queueService.createQueue(loginUser, queueCreateRequest.getQueue(), queueCreateRequest.getQueueName());
@@ -142,17 +140,16 @@ public QueueCreateResponse createQueue(@ApiIgnore @RequestAttribute(value = Cons
* @param queueUpdateRequest queueUpdateRequest
* @return update result code
*/
- @ApiOperation(value = "updateQueue", notes = "UPDATE_QUEUE_NOTES")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "id", value = "QUEUE_ID", required = true, dataTypeClass = int.class, example = "100")
+ @Operation(summary = "updateQueue", description = "UPDATE_QUEUE_NOTES")
+ @Parameters({
+ @Parameter(name = "id", description = "QUEUE_ID", required = true, schema =@Schema( implementation = int.class, example = "100"))
})
@PutMapping(value = "/{id}", consumes = {"application/json"})
@ResponseStatus(HttpStatus.CREATED)
@ApiException(UPDATE_QUEUE_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public QueueUpdateResponse updateQueue(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
- @PathVariable(value = "id") int id,
- @RequestBody QueueUpdateRequest queueUpdateRequest) {
+ public QueueUpdateResponse updateQueue(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ @PathVariable(value = "id") int id, @RequestBody QueueUpdateRequest queueUpdateRequest) {
Result result = queueService.updateQueue(loginUser, id, queueUpdateRequest.getQueue(),
queueUpdateRequest.getQueueName());
return new QueueUpdateResponse(result);
@@ -165,12 +162,12 @@ public QueueUpdateResponse updateQueue(@ApiIgnore @RequestAttribute(value = Cons
* @param queueVerifyRequest queueVerifyRequest
* @return true if the queue name not exists, otherwise return false
*/
- @ApiOperation(value = "verifyQueue", notes = "VERIFY_QUEUE_NOTES")
+ @Operation(summary = "verifyQueue", description = "VERIFY_QUEUE_NOTES")
@PostMapping(value = "/verify", consumes = {"application/json"})
@ResponseStatus(HttpStatus.OK)
@ApiException(VERIFY_QUEUE_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public QueueVerifyResponse verifyQueue(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ public QueueVerifyResponse verifyQueue(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@RequestBody QueueVerifyRequest queueVerifyRequest) {
Result result = queueService.verifyQueue(queueVerifyRequest.getQueue(), queueVerifyRequest.getQueueName());
return new QueueVerifyResponse(result);
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 55ca04a1a0f7..aabfca069387 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
@@ -41,6 +41,11 @@
import static org.apache.dolphinscheduler.api.enums.Status.VIEW_RESOURCE_FILE_ON_LINE_ERROR;
import static org.apache.dolphinscheduler.api.enums.Status.VIEW_UDF_FUNCTION_ERROR;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Parameters;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.tags.Tag;
import org.apache.dolphinscheduler.api.aspect.AccessLogAnnotation;
import org.apache.dolphinscheduler.api.exceptions.ApiException;
import org.apache.dolphinscheduler.api.service.ResourcesService;
@@ -53,8 +58,6 @@
import org.apache.dolphinscheduler.plugin.task.api.utils.ParameterUtils;
import org.apache.dolphinscheduler.spi.enums.ResourceType;
-import springfox.documentation.annotations.ApiIgnore;
-
import org.apache.commons.lang3.StringUtils;
import java.util.Map;
@@ -79,15 +82,10 @@
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiImplicitParam;
-import io.swagger.annotations.ApiImplicitParams;
-import io.swagger.annotations.ApiOperation;
-
/**
* resources controller
*/
-@Api(tags = "RESOURCES_TAG")
+@Tag(name = "RESOURCES_TAG")
@RestController
@RequestMapping("resources")
public class ResourcesController extends BaseController {
@@ -108,18 +106,18 @@ public class ResourcesController extends BaseController {
* @param currentDir current directory
* @return create result code
*/
- @ApiOperation(value = "createDirectory", notes = "CREATE_RESOURCE_NOTES")
- @ApiImplicitParams({
- @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)
+ @Operation(summary = "createDirectory", description = "CREATE_RESOURCE_NOTES")
+ @Parameters({
+ @Parameter(name = "type", description = "RESOURCE_TYPE", required = true, schema =@Schema( implementation = ResourceType.class)),
+ @Parameter(name = "name", description = "RESOURCE_NAME", required = true, schema =@Schema( implementation = String.class)),
+ @Parameter(name = "description", description = "RESOURCE_DESC", schema =@Schema( implementation = String.class)),
+ @Parameter(name = "pid", description = "RESOURCE_PID", required = true, schema =@Schema( implementation = int.class, example = "10")),
+ @Parameter(name = "currentDir", description = "RESOURCE_CURRENT_DIR", required = true, schema =@Schema( implementation = String.class))
})
@PostMapping(value = "/directory")
@ApiException(CREATE_RESOURCE_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result
-
-
org.hibernate.validator
hibernate-validator
diff --git a/dolphinscheduler-bom/pom.xml b/dolphinscheduler-bom/pom.xml
index ea9124e2916a..337312e0dd9a 100644
--- a/dolphinscheduler-bom/pom.xml
+++ b/dolphinscheduler-bom/pom.xml
@@ -75,7 +75,6 @@
6.1.0.jre8
0.238.1
2.5
- 3.0.0
2.0.0
0.10.2
0.10.9
@@ -562,11 +561,6 @@
javax.servlet-api
${javax.servlet-api.version}
-
- io.springfox
- springfox-boot-starter
- ${springfox.version}
-
com.github.rholder
From 6bf0d4b5311fc325fa31aa1f900d88e03c55f7d1 Mon Sep 17 00:00:00 2001
From: fuchanghai <1105596917@qq.com>
Date: Sun, 16 Oct 2022 12:55:53 +0800
Subject: [PATCH 04/14] [improvement-#12266]add other version
---
.../api/configuration/OpenAPIConfiguration.java | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/configuration/OpenAPIConfiguration.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/configuration/OpenAPIConfiguration.java
index 1c89f7b5b5df..cc0fcc344c4a 100644
--- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/configuration/OpenAPIConfiguration.java
+++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/configuration/OpenAPIConfiguration.java
@@ -36,7 +36,7 @@
public class OpenAPIConfiguration implements WebMvcConfigurer {
@Bean
- public OpenAPI apiV1Info() {
+ public OpenAPI apiV1Info1() {
return new OpenAPI()
.info(new Info()
.title("Dolphin Scheduler Api Docs")
@@ -45,11 +45,18 @@ public OpenAPI apiV1Info() {
}
@Bean
- public GroupedOpenApi publicApi() {
+ public GroupedOpenApi publicApi1() {
return GroupedOpenApi.builder()
.group("v1")
.pathsToMatch("/**")
.build();
}
+ @Bean
+ public GroupedOpenApi publicApi2() {
+ return GroupedOpenApi.builder()
+ .group("v2")
+ .pathsToMatch("/**")
+ .build();
+ }
}
From 171c7b6f97ec4931761e74df38f7cd073e2aba6f Mon Sep 17 00:00:00 2001
From: fuchanghai <1105596917@qq.com>
Date: Sun, 16 Oct 2022 17:31:25 +0800
Subject: [PATCH 05/14] [improvement-#12266]delete swagger and springfox in
know-dependencies.txt
---
tools/dependencies/known-dependencies.txt | 17 -----------------
1 file changed, 17 deletions(-)
diff --git a/tools/dependencies/known-dependencies.txt b/tools/dependencies/known-dependencies.txt
index 304b63887187..36cdf6d396a6 100644
--- a/tools/dependencies/known-dependencies.txt
+++ b/tools/dependencies/known-dependencies.txt
@@ -319,24 +319,7 @@ spring-tx-5.3.22.jar
spring-web-5.3.22.jar
spring-webmvc-5.3.22.jar
springdoc-openapi-ui-1.6.9.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
stax2-api-4.2.1.jar
-swagger-annotations-1.5.20.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
third-party-jackson-core-2.17.282.jar
token-provider-1.0.1.jar
From 6e92388f0fd80e424fb5786241854e4d333e110c Mon Sep 17 00:00:00 2001
From: fuchanghai <‘2875334588@qq.com’>
Date: Mon, 17 Oct 2022 09:31:20 +0800
Subject: [PATCH 06/14] [improvement] fix denpendencies.txt
---
tools/dependencies/known-dependencies.txt | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/tools/dependencies/known-dependencies.txt b/tools/dependencies/known-dependencies.txt
index 36cdf6d396a6..1b8e9304b0ec 100644
--- a/tools/dependencies/known-dependencies.txt
+++ b/tools/dependencies/known-dependencies.txt
@@ -31,7 +31,7 @@ caffeine-2.9.3.jar
checker-qual-3.12.0.jar
checker-qual-3.19.0.jar
checker-qual-3.5.0.jar
-classgraph-4.8.83.jar
+classgraph-4.8.147.jar
classmate-1.5.1.jar
clickhouse-jdbc-0.1.52.jar
lz4-java-1.4.0.jar
@@ -214,7 +214,6 @@ 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.3.1.Final.jar
metrics-core-4.2.11.jar
metrics-spi-2.17.282.jar
micrometer-core-1.9.3.jar
@@ -310,8 +309,6 @@ spring-expression-5.3.22.jar
spring-jcl-5.3.22.jar
spring-jdbc-5.3.22.jar
spring-ldap-core-2.4.1.jar
-spring-plugin-core-2.0.0.RELEASE.jar
-spring-plugin-metadata-2.0.0.RELEASE.jar
spring-retry-1.3.3.jar
spring-security-crypto-5.7.3.jar
spring-security-rsa-1.0.10.RELEASE.jar
@@ -319,7 +316,13 @@ spring-tx-5.3.22.jar
spring-web-5.3.22.jar
spring-webmvc-5.3.22.jar
springdoc-openapi-ui-1.6.9.jar
+springdoc-openapi-common-1.6.9.jar
+springdoc-openapi-webmvc-core-1.6.9.jar
stax2-api-4.2.1.jar
+swagger-annotations-2.2.0.jar
+swagger-core-2.2.0.jar
+swagger-models-2.2.0.jar
+swagger-ui-4.11.1.jar
tephra-api-0.6.0.jar
third-party-jackson-core-2.17.282.jar
token-provider-1.0.1.jar
@@ -349,6 +352,7 @@ perfmark-api-0.23.0.jar
proto-google-common-protos-2.0.1.jar
protobuf-java-3.17.2.jar
protobuf-java-util-3.17.2.jar
+webjars-locator-core-0.50.jar
zjsonpatch-0.3.0.jar
zookeeper-3.8.0.jar
zookeeper-jute-3.8.0.jar
From 04985bf47458108cd4066c66b55cd6a04f3bb726 Mon Sep 17 00:00:00 2001
From: fuchanghai <‘2875334588@qq.com’>
Date: Mon, 17 Oct 2022 10:57:28 +0800
Subject: [PATCH 07/14] [improvement] upgrade LICENSE
---
dolphinscheduler-dist/release-docs/LICENSE | 19 +-
.../licenses/LICENSE-mapstruct.txt | 41 ----
.../licenses/LICENSE-spring-plugin-core.txt | 216 ------------------
.../LICENSE-spring-plugin-metadata.txt | 216 ------------------
...t => LICENSE-springdoc-openapi-common.txt} | 9 +-
...LICENSE-springdoc-openapi-webmvc-core.txt} | 9 +-
.../licenses/LICENSE-springfox-core.txt | 201 ----------------
.../LICENSE-springfox-swagger-common.txt | 201 ----------------
.../licenses/LICENSE-springfox-swagger-ui.txt | 201 ----------------
.../licenses/LICENSE-springfox-swagger2.txt | 201 ----------------
...pring-web.txt => LICENSE-swagger-core.txt} | 9 +-
.../licenses/LICENSE-swagger-ui.txt | 12 +
.../licenses/LICENSE-webjars-locator-core.txt | 7 +
13 files changed, 41 insertions(+), 1301 deletions(-)
delete mode 100644 dolphinscheduler-dist/release-docs/licenses/LICENSE-mapstruct.txt
delete mode 100644 dolphinscheduler-dist/release-docs/licenses/LICENSE-spring-plugin-core.txt
delete mode 100644 dolphinscheduler-dist/release-docs/licenses/LICENSE-spring-plugin-metadata.txt
rename dolphinscheduler-dist/release-docs/licenses/{LICENSE-springfox-schema.txt => LICENSE-springdoc-openapi-common.txt} (98%)
rename dolphinscheduler-dist/release-docs/licenses/{LICENSE-springfox-spi.txt => LICENSE-springdoc-openapi-webmvc-core.txt} (98%)
delete mode 100644 dolphinscheduler-dist/release-docs/licenses/LICENSE-springfox-core.txt
delete mode 100644 dolphinscheduler-dist/release-docs/licenses/LICENSE-springfox-swagger-common.txt
delete mode 100644 dolphinscheduler-dist/release-docs/licenses/LICENSE-springfox-swagger-ui.txt
delete mode 100644 dolphinscheduler-dist/release-docs/licenses/LICENSE-springfox-swagger2.txt
rename dolphinscheduler-dist/release-docs/licenses/{LICENSE-springfox-spring-web.txt => LICENSE-swagger-core.txt} (98%)
create mode 100644 dolphinscheduler-dist/release-docs/licenses/LICENSE-swagger-ui.txt
create mode 100644 dolphinscheduler-dist/release-docs/licenses/LICENSE-webjars-locator-core.txt
diff --git a/dolphinscheduler-dist/release-docs/LICENSE b/dolphinscheduler-dist/release-docs/LICENSE
index ef14fc1b55d5..c4948c45f49d 100644
--- a/dolphinscheduler-dist/release-docs/LICENSE
+++ b/dolphinscheduler-dist/release-docs/LICENSE
@@ -334,7 +334,6 @@ The text of each license is also included at licenses/LICENSE-[project].txt.
log4j-core-2.11.2: https://mvnrepository.com/artifact/org.apache.logging.log4j/log4j-core/2.11.2, 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.3.1.Final: https://github.com/mapstruct/mapstruct, Apache 2.0
mybatis 3.5.10 https://mvnrepository.com/artifact/org.mybatis/mybatis/3.5.10, Apache 2.0
mybatis-plus 3.5.2: https://github.com/baomidou/mybatis-plus, Apache 2.0
mybatis-plus-annotation 3.5.2: https://mvnrepository.com/artifact/com.baomidou/mybatis-plus-annotation/3.5.2, Apache 2.0
@@ -378,22 +377,17 @@ The text of each license is also included at licenses/LICENSE-[project].txt.
spring-core 5.3.22: https://mvnrepository.com/artifact/org.springframework/spring-core/5.3.22, Apache 2.0
spring-expression 5.3.13: https://mvnrepository.com/artifact/org.springframework/spring-expression/5.3.13, Apache 2.0
springdoc-openapi-ui 1.6.9: https://mvnrepository.com/artifact/org.springdoc/springdoc-openapi-ui/1.6.9, 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
+ springdoc-openapi-common 1.6.9: https://mvnrepository.com/artifact/org.springdoc/springdoc-openapi-common/1.6.9, Apache 2.0
+ springdoc-openapi-webmvc-core 1.6.9: https://mvnrepository.com/artifact/org.springdoc/springdoc-openapi-webmvc-core/1.6.9, 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.22: https://mvnrepository.com/artifact/org.springframework/spring-jdbc/5.3.22, 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.22: https://mvnrepository.com/artifact/org.springframework/spring-tx/5.3.22, 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-models 1.5.24: https://mvnrepository.com/artifact/io.swagger/swagger-models/1.5.24, Apache 2.0
+ swagger-annotations 2.2.0: https://mvnrepository.com/artifact/io.swagger/swagger-annotations/2.2.0, Apache 2.0
+ swagger-models 2.2.0: https://mvnrepository.com/artifact/io.swagger/swagger-models/2.2.0, Apache 2.0
+ swagger-core 2.2.0: https://mvnrepository.com/artifact/io.swagger/swagger-core/2.2.0, Apache 2.0
+ swagger-ui 4.11.1: https://mvnrepository.com/artifact/io.swagger/swagger-ui/4.11.1, Apache 2.0
tephra-api 0.6.0: https://mvnrepository.com/artifact/co.cask.tephra/tephra-api/0.6.0, Apache 2.0
token-provider 1.0.1: https://mvnrepository.com/artifact/org.apache.kerby/token-provider/1.0.1, 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
@@ -589,6 +583,7 @@ The text of each license is also included at licenses/LICENSE-[project].txt.
bcpkix-jdk15on 1.68: https://mvnrepository.com/artifact/org.bouncycastle/bcpkix-jdk15on, MIT
bcprov-jdk15on 1.68: https://mvnrepository.com/artifact/org.bouncycastle/bcprov-jdk15on, MIT
reactive-streams 1.0.4: https://mvnrepository.com/artifact/org.reactivestreams/reactive-streams/1.0.4, MIT
+ webjars-locator-core 0.50 https://mvnrepository.com/artifact/org.webjars/webjars-locator-core/0.50, MIT
========================================================================
MPL 1.1 licenses
diff --git a/dolphinscheduler-dist/release-docs/licenses/LICENSE-mapstruct.txt b/dolphinscheduler-dist/release-docs/licenses/LICENSE-mapstruct.txt
deleted file mode 100644
index f052b4665d62..000000000000
--- a/dolphinscheduler-dist/release-docs/licenses/LICENSE-mapstruct.txt
+++ /dev/null
@@ -1,41 +0,0 @@
- Copyright 2012-2017 Gunnar Morling (http://www.gunnarmorling.de/)
- and/or other contributors as indicated by the @authors tag. See the
- copyright.txt file in the distribution for a full listing of all
- contributors.
-
- MapStruct is licensed under the Apache License, Version 2.0 (the
- "License"); you may not use this software 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.
-
-------------------------------------------------------------------------
-
- MAPSTRUCT SUBCOMPONENTS WITH DIFFERENT COPYRIGHT OWNERS
-
- The MapStruct distribution (ZIP, TAR.GZ) as well as the MapStruct
- library (JAR) include FreeMarker, a software developed by Attila
- Szegedi, Daniel Dekany and Jonathan Revusky. FreeMarker is licensed
- under the same license as MapStruct itself - Apache License, Version
- 2.0 - but the copyright owners are the aforementioned individuals.
-
- The MapStruct distribution (ZIP, TAR.GZ) as well as the MapStruct
- library (JAR) include a number of files that are licensed by the
- Apache Software Foundation under the same license as MapStruct itself -
- Apache License, Version 2.0 - but the copyright owner is the Apache
- Software Foundation. These files are:
-
- freemarker/ext/jsp/web-app_2_2.dtd
- freemarker/ext/jsp/web-app_2_3.dtd
- freemarker/ext/jsp/web-app_2_4.xsd
- freemarker/ext/jsp/web-app_2_5.xsd
- freemarker/ext/jsp/web-jsptaglibrary_1_1.dtd
- freemarker/ext/jsp/web-jsptaglibrary_1_2.dtd
- freemarker/ext/jsp/web-jsptaglibrary_2_0.xsd
- freemarker/ext/jsp/web-jsptaglibrary_2_1.xsd
diff --git a/dolphinscheduler-dist/release-docs/licenses/LICENSE-spring-plugin-core.txt b/dolphinscheduler-dist/release-docs/licenses/LICENSE-spring-plugin-core.txt
deleted file mode 100644
index 7b1adee7af1d..000000000000
--- a/dolphinscheduler-dist/release-docs/licenses/LICENSE-spring-plugin-core.txt
+++ /dev/null
@@ -1,216 +0,0 @@
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed 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.
-
-=======================================================================
-
-To the extent any open source subcomponents are licensed under the EPL and/or other
-similar licenses that require the source code and/or modifications to
-source code to be made available (as would be noted above), you may obtain a
-copy of the source code corresponding to the binaries for such open source
-components and modifications thereto, if any, (the "Source Files"), by
-downloading the Source Files from http://www.springsource.org/download,
-or by sending a request, with your name and address to: VMware, Inc., 3401 Hillview
-Avenue, Palo Alto, CA 94304, United States of America or email info@vmware.com. All
-such requests should clearly specify: OPEN SOURCE FILES REQUEST, Attention General
-Counsel. VMware shall mail a copy of the Source Files to you on a CD or equivalent
-physical medium. This offer to obtain a copy of the Source Files is valid for three
-years from the date you acquired this Software product.
\ No newline at end of file
diff --git a/dolphinscheduler-dist/release-docs/licenses/LICENSE-spring-plugin-metadata.txt b/dolphinscheduler-dist/release-docs/licenses/LICENSE-spring-plugin-metadata.txt
deleted file mode 100644
index 7b1adee7af1d..000000000000
--- a/dolphinscheduler-dist/release-docs/licenses/LICENSE-spring-plugin-metadata.txt
+++ /dev/null
@@ -1,216 +0,0 @@
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed 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.
-
-=======================================================================
-
-To the extent any open source subcomponents are licensed under the EPL and/or other
-similar licenses that require the source code and/or modifications to
-source code to be made available (as would be noted above), you may obtain a
-copy of the source code corresponding to the binaries for such open source
-components and modifications thereto, if any, (the "Source Files"), by
-downloading the Source Files from http://www.springsource.org/download,
-or by sending a request, with your name and address to: VMware, Inc., 3401 Hillview
-Avenue, Palo Alto, CA 94304, United States of America or email info@vmware.com. All
-such requests should clearly specify: OPEN SOURCE FILES REQUEST, Attention General
-Counsel. VMware shall mail a copy of the Source Files to you on a CD or equivalent
-physical medium. This offer to obtain a copy of the Source Files is valid for three
-years from the date you acquired this Software product.
\ No newline at end of file
diff --git a/dolphinscheduler-dist/release-docs/licenses/LICENSE-springfox-schema.txt b/dolphinscheduler-dist/release-docs/licenses/LICENSE-springdoc-openapi-common.txt
similarity index 98%
rename from dolphinscheduler-dist/release-docs/licenses/LICENSE-springfox-schema.txt
rename to dolphinscheduler-dist/release-docs/licenses/LICENSE-springdoc-openapi-common.txt
index 980a15ac24ee..7a4a3ea2424c 100644
--- a/dolphinscheduler-dist/release-docs/licenses/LICENSE-springfox-schema.txt
+++ b/dolphinscheduler-dist/release-docs/licenses/LICENSE-springdoc-openapi-common.txt
@@ -1,4 +1,5 @@
- Apache License
+
+ Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
@@ -178,7 +179,7 @@
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "{}"
+ boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
@@ -186,7 +187,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.
- Copyright {yyyy} {name of copyright owner}
+ Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -198,4 +199,4 @@
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.
+ limitations under the License.
\ No newline at end of file
diff --git a/dolphinscheduler-dist/release-docs/licenses/LICENSE-springfox-spi.txt b/dolphinscheduler-dist/release-docs/licenses/LICENSE-springdoc-openapi-webmvc-core.txt
similarity index 98%
rename from dolphinscheduler-dist/release-docs/licenses/LICENSE-springfox-spi.txt
rename to dolphinscheduler-dist/release-docs/licenses/LICENSE-springdoc-openapi-webmvc-core.txt
index 980a15ac24ee..7a4a3ea2424c 100644
--- a/dolphinscheduler-dist/release-docs/licenses/LICENSE-springfox-spi.txt
+++ b/dolphinscheduler-dist/release-docs/licenses/LICENSE-springdoc-openapi-webmvc-core.txt
@@ -1,4 +1,5 @@
- Apache License
+
+ Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
@@ -178,7 +179,7 @@
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "{}"
+ boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
@@ -186,7 +187,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.
- Copyright {yyyy} {name of copyright owner}
+ Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -198,4 +199,4 @@
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.
+ limitations under the License.
\ No newline at end of file
diff --git a/dolphinscheduler-dist/release-docs/licenses/LICENSE-springfox-core.txt b/dolphinscheduler-dist/release-docs/licenses/LICENSE-springfox-core.txt
deleted file mode 100644
index 980a15ac24ee..000000000000
--- a/dolphinscheduler-dist/release-docs/licenses/LICENSE-springfox-core.txt
+++ /dev/null
@@ -1,201 +0,0 @@
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "{}"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright {yyyy} {name of copyright owner}
-
- Licensed 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.
diff --git a/dolphinscheduler-dist/release-docs/licenses/LICENSE-springfox-swagger-common.txt b/dolphinscheduler-dist/release-docs/licenses/LICENSE-springfox-swagger-common.txt
deleted file mode 100644
index 980a15ac24ee..000000000000
--- a/dolphinscheduler-dist/release-docs/licenses/LICENSE-springfox-swagger-common.txt
+++ /dev/null
@@ -1,201 +0,0 @@
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "{}"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright {yyyy} {name of copyright owner}
-
- Licensed 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.
diff --git a/dolphinscheduler-dist/release-docs/licenses/LICENSE-springfox-swagger-ui.txt b/dolphinscheduler-dist/release-docs/licenses/LICENSE-springfox-swagger-ui.txt
deleted file mode 100644
index 980a15ac24ee..000000000000
--- a/dolphinscheduler-dist/release-docs/licenses/LICENSE-springfox-swagger-ui.txt
+++ /dev/null
@@ -1,201 +0,0 @@
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "{}"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright {yyyy} {name of copyright owner}
-
- Licensed 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.
diff --git a/dolphinscheduler-dist/release-docs/licenses/LICENSE-springfox-swagger2.txt b/dolphinscheduler-dist/release-docs/licenses/LICENSE-springfox-swagger2.txt
deleted file mode 100644
index 980a15ac24ee..000000000000
--- a/dolphinscheduler-dist/release-docs/licenses/LICENSE-springfox-swagger2.txt
+++ /dev/null
@@ -1,201 +0,0 @@
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "{}"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright {yyyy} {name of copyright owner}
-
- Licensed 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.
diff --git a/dolphinscheduler-dist/release-docs/licenses/LICENSE-springfox-spring-web.txt b/dolphinscheduler-dist/release-docs/licenses/LICENSE-swagger-core.txt
similarity index 98%
rename from dolphinscheduler-dist/release-docs/licenses/LICENSE-springfox-spring-web.txt
rename to dolphinscheduler-dist/release-docs/licenses/LICENSE-swagger-core.txt
index 980a15ac24ee..7a4a3ea2424c 100644
--- a/dolphinscheduler-dist/release-docs/licenses/LICENSE-springfox-spring-web.txt
+++ b/dolphinscheduler-dist/release-docs/licenses/LICENSE-swagger-core.txt
@@ -1,4 +1,5 @@
- Apache License
+
+ Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
@@ -178,7 +179,7 @@
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "{}"
+ boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
@@ -186,7 +187,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.
- Copyright {yyyy} {name of copyright owner}
+ Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -198,4 +199,4 @@
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.
+ limitations under the License.
\ No newline at end of file
diff --git a/dolphinscheduler-dist/release-docs/licenses/LICENSE-swagger-ui.txt b/dolphinscheduler-dist/release-docs/licenses/LICENSE-swagger-ui.txt
new file mode 100644
index 000000000000..657c7a2da868
--- /dev/null
+++ b/dolphinscheduler-dist/release-docs/licenses/LICENSE-swagger-ui.txt
@@ -0,0 +1,12 @@
+swagger-ui
+Copyright 2020-2021 SmartBear Software Inc.
+
+Licensed 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 [apache.org/licenses/LICENSE-2.0](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.
\ No newline at end of file
diff --git a/dolphinscheduler-dist/release-docs/licenses/LICENSE-webjars-locator-core.txt b/dolphinscheduler-dist/release-docs/licenses/LICENSE-webjars-locator-core.txt
new file mode 100644
index 000000000000..decadab03c8c
--- /dev/null
+++ b/dolphinscheduler-dist/release-docs/licenses/LICENSE-webjars-locator-core.txt
@@ -0,0 +1,7 @@
+Copyright (c) 2013 James Ward
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\ No newline at end of file
From 196221bec10ad990add42807b3b229ac4d15ab28 Mon Sep 17 00:00:00 2001
From: fuchanghai <‘2875334588@qq.com’>
Date: Mon, 17 Oct 2022 11:26:52 +0800
Subject: [PATCH 08/14] [improvement] delete
OpenAPITranslationConfiguration.java
---
.../OpenAPITranslationConfiguration.java | 67 -------------------
1 file changed, 67 deletions(-)
delete mode 100644 dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/configuration/OpenAPITranslationConfiguration.java
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
deleted file mode 100644
index 0a6a81535ba7..000000000000
--- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/configuration/OpenAPITranslationConfiguration.java
+++ /dev/null
@@ -1,67 +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;
-
-
-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, description, locale);
-
- Set tags = operation.getTags().stream()
- .map(tag -> messageSource.getMessage(tag, null, tag, locale))
- .collect(toSet());
-
- Collection 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);
- }
- }*/
-}
From 6fafc6f1d490add7d854fa65b2c0ee2d62a04eb7 Mon Sep 17 00:00:00 2001
From: fuchanghai <33984497+fuchanghai@users.noreply.github.com>
Date: Mon, 17 Oct 2022 22:41:55 +0800
Subject: [PATCH 09/14] Update
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/configuration/OpenAPIConfiguration.java
Co-authored-by: Wenjun Ruan
---
.../api/configuration/OpenAPIConfiguration.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/configuration/OpenAPIConfiguration.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/configuration/OpenAPIConfiguration.java
index cc0fcc344c4a..5f8da8c4ba3e 100644
--- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/configuration/OpenAPIConfiguration.java
+++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/configuration/OpenAPIConfiguration.java
@@ -48,7 +48,7 @@ public OpenAPI apiV1Info1() {
public GroupedOpenApi publicApi1() {
return GroupedOpenApi.builder()
.group("v1")
- .pathsToMatch("/**")
+ .pathsToExclude("v2/**")
.build();
}
From a6ce63123550de933203307d775e46d3f470c676 Mon Sep 17 00:00:00 2001
From: fuchanghai <33984497+fuchanghai@users.noreply.github.com>
Date: Mon, 17 Oct 2022 22:49:42 +0800
Subject: [PATCH 10/14] Update
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/configuration/OpenAPIConfiguration.java
Co-authored-by: Wenjun Ruan
---
.../api/configuration/OpenAPIConfiguration.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/configuration/OpenAPIConfiguration.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/configuration/OpenAPIConfiguration.java
index 5f8da8c4ba3e..e678a92e90c5 100644
--- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/configuration/OpenAPIConfiguration.java
+++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/configuration/OpenAPIConfiguration.java
@@ -56,7 +56,7 @@ public GroupedOpenApi publicApi1() {
public GroupedOpenApi publicApi2() {
return GroupedOpenApi.builder()
.group("v2")
- .pathsToMatch("/**")
+ .pathsToMatch("v2/**")
.build();
}
}
From 0d1a7d86e9963718ab941c7dc90a433e3138b74f Mon Sep 17 00:00:00 2001
From: fuchanghai <33984497+fuchanghai@users.noreply.github.com>
Date: Mon, 17 Oct 2022 22:54:51 +0800
Subject: [PATCH 11/14] update how to match different versions
---
.../api/configuration/OpenAPIConfiguration.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/configuration/OpenAPIConfiguration.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/configuration/OpenAPIConfiguration.java
index e678a92e90c5..adc3a782df26 100644
--- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/configuration/OpenAPIConfiguration.java
+++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/configuration/OpenAPIConfiguration.java
@@ -48,7 +48,7 @@ public OpenAPI apiV1Info1() {
public GroupedOpenApi publicApi1() {
return GroupedOpenApi.builder()
.group("v1")
- .pathsToExclude("v2/**")
+ .pathsToExclude("/v2/**")
.build();
}
@@ -56,7 +56,7 @@ public GroupedOpenApi publicApi1() {
public GroupedOpenApi publicApi2() {
return GroupedOpenApi.builder()
.group("v2")
- .pathsToMatch("v2/**")
+ .pathsToMatch("/v2/**")
.build();
}
}
From b07e50bf4705f12c6fbb79fd2c8144e74831b3aa Mon Sep 17 00:00:00 2001
From: fuchanghai <1105596917@qq.com>
Date: Sat, 22 Oct 2022 14:12:57 +0800
Subject: [PATCH 12/14] [improvement-#12416] reslove conflict
---
.../api/configuration/AppConfiguration.java | 2 +-
.../configuration/OpenAPIConfiguration.java | 9 +-
.../api/controller/AccessTokenController.java | 12 +-
.../controller/AccessTokenV2Controller.java | 11 +-
.../api/controller/AlertGroupController.java | 48 +++---
.../AlertPluginInstanceController.java | 32 ++--
.../api/controller/AuditLogController.java | 25 ++-
.../api/controller/ClusterController.java | 38 ++---
.../controller/DataAnalysisController.java | 25 ++-
.../api/controller/DataQualityController.java | 41 +++--
.../api/controller/DataSourceController.java | 43 ++---
.../api/controller/EnvironmentController.java | 41 ++---
.../api/controller/ExecutorController.java | 117 +++++++-------
.../api/controller/FavTaskController.java | 21 +--
.../controller/K8sNamespaceController.java | 43 ++---
.../api/controller/LoggerController.java | 31 ++--
.../api/controller/LoginController.java | 15 +-
.../api/controller/MonitorController.java | 7 +-
.../ProcessDefinitionController.java | 121 +++++++-------
.../controller/ProcessInstanceController.java | 99 +++++++-----
.../ProcessTaskRelationController.java | 53 ++++---
.../ProcessTaskRelationV2Controller.java | 15 +-
.../api/controller/ProjectController.java | 39 ++---
.../api/controller/ProjectV2Controller.java | 31 ++--
.../api/controller/QueueController.java | 31 ++--
.../api/controller/QueueV2Controller.java | 24 +--
.../api/controller/ResourcesController.java | 149 +++++++++---------
.../api/controller/ScheduleV2Controller.java | 13 +-
.../api/controller/SchedulerController.java | 75 ++++-----
.../controller/TaskDefinitionController.java | 77 ++++-----
.../TaskDefinitionV2Controller.java | 17 +-
.../api/controller/TaskGroupController.java | 67 ++++----
.../controller/TaskInstanceController.java | 41 ++---
.../api/controller/TenantController.java | 35 ++--
.../api/controller/UiPluginController.java | 15 +-
.../api/controller/UsersController.java | 95 +++++------
.../controller/WorkFlowLineageController.java | 17 +-
.../api/controller/WorkerGroupController.java | 31 ++--
.../api/controller/WorkflowV2Controller.java | 13 +-
.../api/dto/CreateTokenRequest.java | 2 +-
.../api/dto/PageQueryDto.java | 3 +-
.../api/dto/project/ProjectCreateRequest.java | 2 +-
.../api/dto/project/ProjectQueryRequest.java | 8 +-
.../api/dto/project/ProjectUpdateRequest.java | 4 +-
.../api/dto/queue/QueueCreateRequest.java | 5 +-
.../api/dto/queue/QueueQueryRequest.java | 7 +-
.../api/dto/queue/QueueUpdateRequest.java | 7 +-
.../api/dto/queue/QueueVerifyRequest.java | 5 +-
.../dto/schedule/ScheduleFilterRequest.java | 4 +-
.../api/dto/task/TaskFilterRequest.java | 4 +-
.../TaskRelationFilterRequest.java | 4 +-
.../dto/workflow/WorkflowFilterRequest.java | 4 +-
52 files changed, 856 insertions(+), 822 deletions(-)
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 5cfb11ad72c0..423cf6757158 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
@@ -103,7 +103,7 @@ public void addInterceptors(InterceptorRegistry registry) {
registry.addInterceptor(loginInterceptor())
.addPathPatterns(LOGIN_INTERCEPTOR_PATH_PATTERN)
.excludePathPatterns(LOGIN_PATH_PATTERN, REGISTER_PATH_PATTERN,
- "/swagger-resources/**", "/webjars/**", "/v3/api-docs/**", "/api-docs/**","/swagger-ui.html",
+ "/swagger-resources/**", "/webjars/**", "/v3/api-docs/**", "/api-docs/**", "/swagger-ui.html",
"/doc.html", "/swagger-ui/**", "*.html", "/ui/**", "/error");
}
diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/configuration/OpenAPIConfiguration.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/configuration/OpenAPIConfiguration.java
index adc3a782df26..349445616b08 100644
--- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/configuration/OpenAPIConfiguration.java
+++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/configuration/OpenAPIConfiguration.java
@@ -16,10 +16,6 @@
*/
package org.apache.dolphinscheduler.api.configuration;
-
-
-import io.swagger.v3.oas.models.OpenAPI;
-import io.swagger.v3.oas.models.info.Info;
import org.springdoc.core.GroupedOpenApi;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
import org.springframework.context.annotation.Bean;
@@ -27,6 +23,9 @@
import org.springframework.context.annotation.PropertySource;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
+import io.swagger.v3.oas.models.OpenAPI;
+import io.swagger.v3.oas.models.info.Info;
+
/**
* swager2 config class
*/
@@ -48,7 +47,7 @@ public OpenAPI apiV1Info1() {
public GroupedOpenApi publicApi1() {
return GroupedOpenApi.builder()
.group("v1")
- .pathsToExclude("/v2/**")
+ .pathsToExclude("/v2/**")
.build();
}
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 627a1215e871..812203016b56 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
@@ -24,12 +24,6 @@
import static org.apache.dolphinscheduler.api.enums.Status.QUERY_ACCESSTOKEN_LIST_PAGING_ERROR;
import static org.apache.dolphinscheduler.api.enums.Status.UPDATE_ACCESS_TOKEN_ERROR;
-import io.swagger.v3.oas.annotations.Hidden;
-import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.Parameter;
-import io.swagger.v3.oas.annotations.Parameters;
-import io.swagger.v3.oas.annotations.media.Schema;
-import io.swagger.v3.oas.annotations.tags.Tag;
import org.apache.dolphinscheduler.api.aspect.AccessLogAnnotation;
import org.apache.dolphinscheduler.api.exceptions.ApiException;
import org.apache.dolphinscheduler.api.service.AccessTokenService;
@@ -38,7 +32,6 @@
import org.apache.dolphinscheduler.dao.entity.User;
import org.apache.dolphinscheduler.plugin.task.api.utils.ParameterUtils;
-
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
@@ -54,6 +47,11 @@
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Parameters;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.tags.Tag;
/**
* access token controller
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 214983b440a2..221f069ffc5f 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
@@ -19,10 +19,6 @@
import static org.apache.dolphinscheduler.api.enums.Status.CREATE_ACCESS_TOKEN_ERROR;
-import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.Parameter;
-import io.swagger.v3.oas.annotations.media.Schema;
-import io.swagger.v3.oas.annotations.tags.Tag;
import org.apache.dolphinscheduler.api.aspect.AccessLogAnnotation;
import org.apache.dolphinscheduler.api.dto.CreateTokenRequest;
import org.apache.dolphinscheduler.api.dto.CreateTokenResponse;
@@ -32,7 +28,6 @@
import org.apache.dolphinscheduler.common.Constants;
import org.apache.dolphinscheduler.dao.entity.User;
-
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.PostMapping;
@@ -42,6 +37,10 @@
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.tags.Tag;
/**
* access token controller
@@ -64,7 +63,7 @@ public class AccessTokenV2Controller extends BaseController {
@Operation(summary = "createTokenV2", description = "CREATE_TOKEN_V2")
@PostMapping(consumes = {"application/json"})
@ResponseStatus(HttpStatus.CREATED)
- @Parameter(name = "createTokenRequest", description = "createTokenRequest", required = true, schema =@Schema( implementation = CreateTokenRequest.class))
+ @Parameter(name = "createTokenRequest", description = "createTokenRequest", required = true, schema = @Schema(implementation = CreateTokenRequest.class))
@ApiException(CREATE_ACCESS_TOKEN_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
public CreateTokenResponse createToken(@Parameter(hidden = true) @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 dec344f26285..85c1f5f9916b 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
@@ -24,11 +24,6 @@
import static org.apache.dolphinscheduler.api.enums.Status.QUERY_ALL_ALERTGROUP_ERROR;
import static org.apache.dolphinscheduler.api.enums.Status.UPDATE_ALERT_GROUP_ERROR;
-import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.Parameter;
-import io.swagger.v3.oas.annotations.Parameters;
-import io.swagger.v3.oas.annotations.media.Schema;
-import io.swagger.v3.oas.annotations.tags.Tag;
import org.apache.dolphinscheduler.api.aspect.AccessLogAnnotation;
import org.apache.dolphinscheduler.api.enums.Status;
import org.apache.dolphinscheduler.api.exceptions.ApiException;
@@ -38,15 +33,30 @@
import org.apache.dolphinscheduler.dao.entity.User;
import org.apache.dolphinscheduler.plugin.task.api.utils.ParameterUtils;
-
+import java.util.Map;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
-import org.springframework.web.bind.annotation.*;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.RequestAttribute;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+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 io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Parameters;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.tags.Tag;
-import java.util.Map;
/**
* alert group controller
@@ -72,7 +82,7 @@ public class AlertGroupController extends BaseController {
@Operation(summary = "createAlertgroup", description = "CREATE_ALERT_GROUP_NOTES")
@Parameters({
@Parameter(name = "groupName", description = "GROUP_NAME", required = true, schema = @Schema(implementation = String.class)),
- @Parameter(name = "description", description = "DESC", schema = @Schema( implementation = String.class)),
+ @Parameter(name = "description", description = "DESC", schema = @Schema(implementation = String.class)),
@Parameter(name = "alertInstanceIds", description = "alertInstanceIds", required = true, schema = @Schema(implementation = String.class))
})
@PostMapping()
@@ -116,9 +126,9 @@ public Result list(@Parameter(hidden = true) @RequestAttribute(value = Constants
*/
@Operation(summary = "queryAlertGroupListPaging", description = "QUERY_ALERT_GROUP_LIST_PAGING_NOTES")
@Parameters({
- @Parameter(name = "searchVal", description = "SEARCH_VAL", schema =@Schema( implementation = String.class)),
- @Parameter(name = "pageNo", description = "PAGE_NO", required = true, schema =@Schema( implementation = int.class, example = "1")),
- @Parameter(name = "pageSize", description = "PAGE_SIZE", required = true, schema =@Schema( implementation = int.class, example = "20"))
+ @Parameter(name = "searchVal", description = "SEARCH_VAL", schema = @Schema(implementation = String.class)),
+ @Parameter(name = "pageNo", description = "PAGE_NO", required = true, schema = @Schema(implementation = int.class, example = "1")),
+ @Parameter(name = "pageSize", description = "PAGE_SIZE", required = true, schema = @Schema(implementation = int.class, example = "20"))
})
@GetMapping()
@ResponseStatus(HttpStatus.OK)
@@ -145,7 +155,7 @@ public Result listPaging(@Parameter(hidden = true) @RequestAttribute(value = Con
@Operation(summary = "queryAlertGroupById", description = "QUERY_ALERT_GROUP_BY_ID_NOTES")
@Parameters({
- @Parameter(name = "id", description = "ALERT_GROUP_ID", schema =@Schema( implementation = int.class, example = "1"))
+ @Parameter(name = "id", description = "ALERT_GROUP_ID", schema = @Schema(implementation = int.class, example = "1"))
})
@PostMapping(value = "/query")
@ResponseStatus(HttpStatus.OK)
@@ -169,10 +179,10 @@ public Result queryAlertGroupById(@Parameter(hidden = true) @RequestAttribute(va
*/
@Operation(summary = "updateAlertgroup", description = "UPDATE_ALERT_GROUP_NOTES")
@Parameters({
- @Parameter(name = "id", description = "ALERT_GROUP_ID", required = true, schema =@Schema( implementation = int.class, example = "100")),
- @Parameter(name = "groupName", description = "GROUP_NAME", required = true, schema =@Schema( implementation = String.class)),
- @Parameter(name = "description", description = "DESC", schema =@Schema( implementation = String.class)),
- @Parameter(name = "alertInstanceIds", description = "alertInstanceIds", required = true, schema =@Schema( implementation = String.class))
+ @Parameter(name = "id", description = "ALERT_GROUP_ID", required = true, schema = @Schema(implementation = int.class, example = "100")),
+ @Parameter(name = "groupName", description = "GROUP_NAME", required = true, schema = @Schema(implementation = String.class)),
+ @Parameter(name = "description", description = "DESC", schema = @Schema(implementation = String.class)),
+ @Parameter(name = "alertInstanceIds", description = "alertInstanceIds", required = true, schema = @Schema(implementation = String.class))
})
@PutMapping(value = "/{id}")
@ResponseStatus(HttpStatus.OK)
@@ -198,7 +208,7 @@ public Result updateAlertgroup(@Parameter(hidden = true) @RequestAttribute(value
*/
@Operation(summary = "delAlertgroupById", description = "DELETE_ALERT_GROUP_BY_ID_NOTES")
@Parameters({
- @Parameter(name = "id", description = "ALERT_GROUP_ID", required = true, schema =@Schema( implementation = int.class, example = "100"))
+ @Parameter(name = "id", description = "ALERT_GROUP_ID", required = true, schema = @Schema(implementation = int.class, example = "100"))
})
@DeleteMapping(value = "/{id}")
@ResponseStatus(HttpStatus.OK)
@@ -219,7 +229,7 @@ public Result delAlertgroupById(@Parameter(hidden = true) @RequestAttribute(valu
*/
@Operation(summary = "verifyGroupName", description = "VERIFY_ALERT_GROUP_NAME_NOTES")
@Parameters({
- @Parameter(name = "groupName", description = "GROUP_NAME", required = true, schema =@Schema( implementation = String.class)),
+ @Parameter(name = "groupName", description = "GROUP_NAME", required = true, schema = @Schema(implementation = 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 7be67984bbd1..600d514041e7 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
@@ -24,11 +24,6 @@
import static org.apache.dolphinscheduler.api.enums.Status.QUERY_ALL_ALERT_PLUGIN_INSTANCE_ERROR;
import static org.apache.dolphinscheduler.api.enums.Status.UPDATE_ALERT_PLUGIN_INSTANCE_ERROR;
-import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.Parameter;
-import io.swagger.v3.oas.annotations.Parameters;
-import io.swagger.v3.oas.annotations.media.Schema;
-import io.swagger.v3.oas.annotations.tags.Tag;
import org.apache.dolphinscheduler.api.aspect.AccessLogAnnotation;
import org.apache.dolphinscheduler.api.enums.Status;
import org.apache.dolphinscheduler.api.exceptions.ApiException;
@@ -55,6 +50,11 @@
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Parameters;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.tags.Tag;
/**
* alert plugin instance controller
@@ -80,9 +80,9 @@ public class AlertPluginInstanceController extends BaseController {
*/
@Operation(summary = "createAlertPluginInstance", description = "CREATE_ALERT_PLUGIN_INSTANCE_NOTES")
@Parameters({
- @Parameter(name = "pluginDefineId", description = "ALERT_PLUGIN_DEFINE_ID", required = true, schema =@Schema( implementation = int.class, example = "100")),
- @Parameter(name = "instanceName", description = "ALERT_PLUGIN_INSTANCE_NAME", required = true, schema =@Schema( implementation = String.class, example = "DING TALK")),
- @Parameter(name = "pluginInstanceParams", description = "ALERT_PLUGIN_INSTANCE_PARAMS", required = true, schema =@Schema( implementation = String.class, example = "ALERT_PLUGIN_INSTANCE_PARAMS"))
+ @Parameter(name = "pluginDefineId", description = "ALERT_PLUGIN_DEFINE_ID", required = true, schema = @Schema(implementation = int.class, example = "100")),
+ @Parameter(name = "instanceName", description = "ALERT_PLUGIN_INSTANCE_NAME", required = true, schema = @Schema(implementation = String.class, example = "DING TALK")),
+ @Parameter(name = "pluginInstanceParams", description = "ALERT_PLUGIN_INSTANCE_PARAMS", required = true, schema = @Schema(implementation = String.class, example = "ALERT_PLUGIN_INSTANCE_PARAMS"))
})
@PostMapping()
@ResponseStatus(HttpStatus.CREATED)
@@ -108,9 +108,9 @@ public Result createAlertPluginInstance(@Parameter(hidden = true) @RequestAttrib
*/
@Operation(summary = "updateAlertPluginInstance", description = "UPDATE_ALERT_PLUGIN_INSTANCE_NOTES")
@Parameters({
- @Parameter(name = "alertPluginInstanceId", description = "ALERT_PLUGIN_INSTANCE_ID", required = true, schema =@Schema( implementation = int.class, example = "100")),
- @Parameter(name = "instanceName", description = "ALERT_PLUGIN_INSTANCE_NAME", required = true, schema =@Schema( implementation = String.class, example = "DING TALK")),
- @Parameter(name = "pluginInstanceParams", description = "ALERT_PLUGIN_INSTANCE_PARAMS", required = true, schema =@Schema( implementation = String.class, example = "ALERT_PLUGIN_INSTANCE_PARAMS"))
+ @Parameter(name = "alertPluginInstanceId", description = "ALERT_PLUGIN_INSTANCE_ID", required = true, schema = @Schema(implementation = int.class, example = "100")),
+ @Parameter(name = "instanceName", description = "ALERT_PLUGIN_INSTANCE_NAME", required = true, schema = @Schema(implementation = String.class, example = "DING TALK")),
+ @Parameter(name = "pluginInstanceParams", description = "ALERT_PLUGIN_INSTANCE_PARAMS", required = true, schema = @Schema(implementation = String.class, example = "ALERT_PLUGIN_INSTANCE_PARAMS"))
})
@PutMapping(value = "/{id}")
@ResponseStatus(HttpStatus.OK)
@@ -134,7 +134,7 @@ public Result updateAlertPluginInstance(@Parameter(hidden = true) @RequestAttrib
*/
@Operation(summary = "deleteAlertPluginInstance", description = "DELETE_ALERT_PLUGIN_INSTANCE_NOTES")
@Parameters({
- @Parameter(name = "id", description = "ALERT_PLUGIN_ID", required = true, schema =@Schema( implementation = int.class, example = "100"))
+ @Parameter(name = "id", description = "ALERT_PLUGIN_ID", required = true, schema = @Schema(implementation = int.class, example = "100"))
})
@DeleteMapping(value = "/{id}")
@ResponseStatus(HttpStatus.OK)
@@ -190,7 +190,7 @@ public Result getAlertPluginInstance(@Parameter(hidden = true) @RequestAttribute
*/
@Operation(summary = "verifyAlertInstanceName", description = "VERIFY_ALERT_INSTANCE_NAME_NOTES")
@Parameters({
- @Parameter(name = "alertInstanceName", description = "ALERT_INSTANCE_NAME", required = true, schema =@Schema( implementation = String.class)),
+ @Parameter(name = "alertInstanceName", description = "ALERT_INSTANCE_NAME", required = true, schema = @Schema(implementation = String.class)),
})
@GetMapping(value = "/verify-name")
@ResponseStatus(HttpStatus.OK)
@@ -218,9 +218,9 @@ public Result verifyGroupName(@Parameter(hidden = true) @RequestAttribute(value
*/
@Operation(summary = "queryAlertPluginInstanceListPaging", description = "QUERY_ALERT_PLUGIN_INSTANCE_LIST_PAGING_NOTES")
@Parameters({
- @Parameter(name = "searchVal", description = "SEARCH_VAL", schema =@Schema( implementation = String.class)),
- @Parameter(name = "pageNo", description = "PAGE_NO", required = true, schema =@Schema( implementation = int.class, example = "1")),
- @Parameter(name = "pageSize", description = "PAGE_SIZE", required = true, schema =@Schema( implementation = int.class, example = "20"))
+ @Parameter(name = "searchVal", description = "SEARCH_VAL", schema = @Schema(implementation = String.class)),
+ @Parameter(name = "pageNo", description = "PAGE_NO", required = true, schema = @Schema(implementation = int.class, example = "1")),
+ @Parameter(name = "pageSize", description = "PAGE_SIZE", required = true, schema = @Schema(implementation = 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 ac4b17fd3b92..546119ec2a26 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
@@ -19,11 +19,6 @@
import static org.apache.dolphinscheduler.api.enums.Status.QUERY_AUDIT_LOG_LIST_PAGING;
-import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.Parameter;
-import io.swagger.v3.oas.annotations.Parameters;
-import io.swagger.v3.oas.annotations.media.Schema;
-import io.swagger.v3.oas.annotations.tags.Tag;
import org.apache.dolphinscheduler.api.aspect.AccessLogAnnotation;
import org.apache.dolphinscheduler.api.exceptions.ApiException;
import org.apache.dolphinscheduler.api.service.AuditService;
@@ -33,7 +28,6 @@
import org.apache.dolphinscheduler.common.enums.AuditResourceType;
import org.apache.dolphinscheduler.dao.entity.User;
-
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.GetMapping;
@@ -43,6 +37,11 @@
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Parameters;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.tags.Tag;
@Tag(name = "AUDIT_LOG_TAG")
@RestController
@@ -67,13 +66,13 @@ public class AuditLogController extends BaseController {
*/
@Operation(summary = "queryAuditLogListPaging", description = "QUERY_AUDIT_LOG")
@Parameters({
- @Parameter(name = "startDate", description = "START_DATE", schema =@Schema( implementation = String.class)),
- @Parameter(name = "endDate", description = "END_DATE", schema =@Schema( implementation = String.class)),
- @Parameter(name = "resourceType", description = "RESOURCE_TYPE", schema =@Schema( implementation = AuditResourceType.class)),
- @Parameter(name = "operationType", description = "OPERATION_TYPE", schema =@Schema( implementation = AuditOperationType.class)),
- @Parameter(name = "userName", description = "USER_NAME", schema =@Schema( implementation = String.class)),
- @Parameter(name = "pageNo", description = "PAGE_NO", required = true, schema =@Schema( implementation = int.class, example = "1")),
- @Parameter(name = "pageSize", description = "PAGE_SIZE", required = true, schema =@Schema( implementation = int.class, example = "20"))
+ @Parameter(name = "startDate", description = "START_DATE", schema = @Schema(implementation = String.class)),
+ @Parameter(name = "endDate", description = "END_DATE", schema = @Schema(implementation = String.class)),
+ @Parameter(name = "resourceType", description = "RESOURCE_TYPE", schema = @Schema(implementation = AuditResourceType.class)),
+ @Parameter(name = "operationType", description = "OPERATION_TYPE", schema = @Schema(implementation = AuditOperationType.class)),
+ @Parameter(name = "userName", description = "USER_NAME", schema = @Schema(implementation = String.class)),
+ @Parameter(name = "pageNo", description = "PAGE_NO", required = true, schema = @Schema(implementation = int.class, example = "1")),
+ @Parameter(name = "pageSize", description = "PAGE_SIZE", required = true, schema = @Schema(implementation = int.class, example = "20"))
})
@GetMapping(value = "/audit-log-list")
@ResponseStatus(HttpStatus.OK)
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 160c4c5906c5..a3117ed647c6 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
@@ -24,11 +24,6 @@
import static org.apache.dolphinscheduler.api.enums.Status.UPDATE_CLUSTER_ERROR;
import static org.apache.dolphinscheduler.api.enums.Status.VERIFY_CLUSTER_ERROR;
-import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.Parameter;
-import io.swagger.v3.oas.annotations.Parameters;
-import io.swagger.v3.oas.annotations.media.Schema;
-import io.swagger.v3.oas.annotations.tags.Tag;
import org.apache.dolphinscheduler.api.aspect.AccessLogAnnotation;
import org.apache.dolphinscheduler.api.exceptions.ApiException;
import org.apache.dolphinscheduler.api.service.ClusterService;
@@ -37,7 +32,6 @@
import org.apache.dolphinscheduler.dao.entity.User;
import org.apache.dolphinscheduler.plugin.task.api.utils.ParameterUtils;
-
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
@@ -50,6 +44,12 @@
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Parameters;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.tags.Tag;
+
/**
* cluster controller
*/
@@ -72,9 +72,9 @@ public class ClusterController extends BaseController {
*/
@Operation(summary = "createCluster", description = "CREATE_CLUSTER_NOTES")
@Parameters({
- @Parameter(name = "name", description = "CLUSTER_NAME", required = true, schema =@Schema( implementation = String.class)),
- @Parameter(name = "config", description = "CONFIG", required = true, schema =@Schema( implementation = String.class)),
- @Parameter(name = "description", description = "CLUSTER_DESC", schema =@Schema( implementation = String.class))
+ @Parameter(name = "name", description = "CLUSTER_NAME", required = true, schema = @Schema(implementation = String.class)),
+ @Parameter(name = "config", description = "CONFIG", required = true, schema = @Schema(implementation = String.class)),
+ @Parameter(name = "description", description = "CLUSTER_DESC", schema = @Schema(implementation = String.class))
})
@PostMapping(value = "/create")
@ResponseStatus(HttpStatus.CREATED)
@@ -101,10 +101,10 @@ public Result createProject(@Parameter(hidden = true) @RequestAttribute(value =
*/
@Operation(summary = "updateCluster", description = "UPDATE_CLUSTER_NOTES")
@Parameters({
- @Parameter(name = "code", description = "CLUSTER_CODE", required = true, schema =@Schema( implementation = long.class, example = "100")),
- @Parameter(name = "name", description = "CLUSTER_NAME", required = true, schema =@Schema( implementation = String.class)),
- @Parameter(name = "config", description = "CLUSTER_CONFIG", required = true, schema =@Schema( implementation = String.class)),
- @Parameter(name = "description", description = "CLUSTER_DESC", schema =@Schema( implementation = String.class)),
+ @Parameter(name = "code", description = "CLUSTER_CODE", required = true, schema = @Schema(implementation = long.class, example = "100")),
+ @Parameter(name = "name", description = "CLUSTER_NAME", required = true, schema = @Schema(implementation = String.class)),
+ @Parameter(name = "config", description = "CLUSTER_CONFIG", required = true, schema = @Schema(implementation = String.class)),
+ @Parameter(name = "description", description = "CLUSTER_DESC", schema = @Schema(implementation = String.class)),
})
@PostMapping(value = "/update")
@ResponseStatus(HttpStatus.OK)
@@ -127,7 +127,7 @@ public Result updateCluster(@Parameter(hidden = true) @RequestAttribute(value =
*/
@Operation(summary = "queryClusterByCode", description = "QUERY_CLUSTER_BY_CODE_NOTES")
@Parameters({
- @Parameter(name = "clusterCode", description = "CLUSTER_CODE", required = true, schema =@Schema( implementation = long.class, example = "100"))
+ @Parameter(name = "clusterCode", description = "CLUSTER_CODE", required = true, schema = @Schema(implementation = long.class, example = "100"))
})
@GetMapping(value = "/query-by-code")
@ResponseStatus(HttpStatus.OK)
@@ -150,9 +150,9 @@ public Result queryClusterByCode(@Parameter(hidden = true) @RequestAttribute(val
*/
@Operation(summary = "queryClusterListPaging", description = "QUERY_CLUSTER_LIST_PAGING_NOTES")
@Parameters({
- @Parameter(name = "searchVal", description = "SEARCH_VAL", schema =@Schema( implementation = String.class)),
- @Parameter(name = "pageSize", description = "PAGE_SIZE", required = true, schema =@Schema( implementation = int.class, example = "20")),
- @Parameter(name = "pageNo", description = "PAGE_NO", required = true, schema =@Schema( implementation = int.class, example = "1"))
+ @Parameter(name = "searchVal", description = "SEARCH_VAL", schema = @Schema(implementation = String.class)),
+ @Parameter(name = "pageSize", description = "PAGE_SIZE", required = true, schema = @Schema(implementation = int.class, example = "20")),
+ @Parameter(name = "pageNo", description = "PAGE_NO", required = true, schema = @Schema(implementation = int.class, example = "1"))
})
@GetMapping(value = "/list-paging")
@ResponseStatus(HttpStatus.OK)
@@ -181,7 +181,7 @@ public Result queryClusterListPaging(@Parameter(hidden = true) @RequestAttribute
*/
@Operation(summary = "deleteClusterByCode", description = "DELETE_CLUSTER_BY_CODE_NOTES")
@Parameters({
- @Parameter(name = "clusterCode", description = "CLUSTER_CODE", required = true, schema =@Schema( implementation = long.class, example = "100"))
+ @Parameter(name = "clusterCode", description = "CLUSTER_CODE", required = true, schema = @Schema(implementation = long.class, example = "100"))
})
@PostMapping(value = "/delete")
@ResponseStatus(HttpStatus.OK)
@@ -219,7 +219,7 @@ public Result queryAllClusterList(@Parameter(hidden = true) @RequestAttribute(va
*/
@Operation(summary = "verifyCluster", description = "VERIFY_CLUSTER_NOTES")
@Parameters({
- @Parameter(name = "clusterName", description = "CLUSTER_NAME", required = true, schema =@Schema( implementation = String.class))
+ @Parameter(name = "clusterName", description = "CLUSTER_NAME", required = true, schema = @Schema(implementation = String.class))
})
@PostMapping(value = "/verify-cluster")
@ResponseStatus(HttpStatus.OK)
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 b10cf2d914bc..a3c34c983371 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
@@ -23,11 +23,6 @@
import static org.apache.dolphinscheduler.api.enums.Status.QUEUE_COUNT_ERROR;
import static org.apache.dolphinscheduler.api.enums.Status.TASK_INSTANCE_STATE_COUNT_ERROR;
-import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.Parameter;
-import io.swagger.v3.oas.annotations.Parameters;
-import io.swagger.v3.oas.annotations.media.Schema;
-import io.swagger.v3.oas.annotations.tags.Tag;
import org.apache.dolphinscheduler.api.aspect.AccessLogAnnotation;
import org.apache.dolphinscheduler.api.exceptions.ApiException;
import org.apache.dolphinscheduler.api.service.DataAnalysisService;
@@ -35,7 +30,6 @@
import org.apache.dolphinscheduler.common.Constants;
import org.apache.dolphinscheduler.dao.entity.User;
-
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
@@ -47,6 +41,11 @@
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Parameters;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.tags.Tag;
/**
* data analysis controller
@@ -70,9 +69,9 @@ public class DataAnalysisController extends BaseController {
*/
@Operation(summary = "countTaskState", description = "COUNT_TASK_STATE_NOTES")
@Parameters({
- @Parameter(name = "startDate", description = "START_DATE", schema =@Schema( implementation = String.class)),
- @Parameter(name = "endDate", description = "END_DATE", schema =@Schema( implementation = String.class)),
- @Parameter(name = "projectCode", description = "PROJECT_CODE", schema =@Schema( implementation = long.class, example = "100"))
+ @Parameter(name = "startDate", description = "START_DATE", schema = @Schema(implementation = String.class)),
+ @Parameter(name = "endDate", description = "END_DATE", schema = @Schema(implementation = String.class)),
+ @Parameter(name = "projectCode", description = "PROJECT_CODE", schema = @Schema(implementation = long.class, example = "100"))
})
@GetMapping(value = "/task-state-count")
@ResponseStatus(HttpStatus.OK)
@@ -99,9 +98,9 @@ public Result countTaskState(@Parameter(hidden = true) @RequestAttribute(value =
*/
@Operation(summary = "countProcessInstanceState", description = "COUNT_PROCESS_INSTANCE_NOTES")
@Parameters({
- @Parameter(name = "startDate", description = "START_DATE", schema =@Schema( implementation = String.class)),
- @Parameter(name = "endDate", description = "END_DATE", schema =@Schema( implementation = String.class)),
- @Parameter(name = "projectCode", description = "PROJECT_CODE", schema =@Schema( implementation = long.class, example = "100"))
+ @Parameter(name = "startDate", description = "START_DATE", schema = @Schema(implementation = String.class)),
+ @Parameter(name = "endDate", description = "END_DATE", schema = @Schema(implementation = String.class)),
+ @Parameter(name = "projectCode", description = "PROJECT_CODE", schema = @Schema(implementation = long.class, example = "100"))
})
@GetMapping(value = "/process-state-count")
@ResponseStatus(HttpStatus.OK)
@@ -126,7 +125,7 @@ public Result countProcessInstanceState(@Parameter(hidden = true) @RequestAttrib
*/
@Operation(summary = "countDefinitionByUser", description = "COUNT_PROCESS_DEFINITION_BY_USER_NOTES")
@Parameters({
- @Parameter(name = "projectCode", description = "PROJECT_CODE", schema =@Schema( implementation = long.class, example = "100"))
+ @Parameter(name = "projectCode", description = "PROJECT_CODE", schema = @Schema(implementation = 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 ad18d3c5e177..9ddd3caa8092 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
@@ -23,11 +23,6 @@
import static org.apache.dolphinscheduler.api.enums.Status.QUERY_RULE_LIST_ERROR;
import static org.apache.dolphinscheduler.api.enums.Status.QUERY_RULE_LIST_PAGING_ERROR;
-import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.Parameter;
-import io.swagger.v3.oas.annotations.Parameters;
-import io.swagger.v3.oas.annotations.media.Schema;
-import io.swagger.v3.oas.annotations.tags.Tag;
import org.apache.dolphinscheduler.api.exceptions.ApiException;
import org.apache.dolphinscheduler.api.service.DqExecuteResultService;
import org.apache.dolphinscheduler.api.service.DqRuleService;
@@ -36,7 +31,6 @@
import org.apache.dolphinscheduler.dao.entity.User;
import org.apache.dolphinscheduler.plugin.task.api.utils.ParameterUtils;
-
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
@@ -48,6 +42,11 @@
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Parameters;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.tags.Tag;
/**
* data quality controller
@@ -70,7 +69,7 @@ public class DataQualityController extends BaseController {
*/
@Operation(summary = "getRuleFormCreateJson", description = "GET_RULE_FORM_CREATE_JSON_NOTES")
@Parameters({
- @Parameter(name = "ruleId", description = "RULE_ID", schema =@Schema( implementation = int.class, example = "1"))
+ @Parameter(name = "ruleId", description = "RULE_ID", schema = @Schema(implementation = int.class, example = "1"))
})
@GetMapping(value = "/getRuleFormCreateJson")
@ResponseStatus(HttpStatus.OK)
@@ -91,12 +90,12 @@ public Result getRuleFormCreateJsonById(@RequestParam(value = "ruleId") int rule
*/
@Operation(summary = "queryRuleListPaging", description = "QUERY_RULE_LIST_PAGING_NOTES")
@Parameters({
- @Parameter(name = "searchVal", description = "SEARCH_VAL", schema =@Schema( implementation = String.class)),
- @Parameter(name = "ruleType", description = "RULE_TYPE", schema =@Schema( implementation = int.class, example = "1")),
- @Parameter(name = "startDate", description = "START_DATE", schema =@Schema( implementation = String.class)),
- @Parameter(name = "endDate", description = "END_DATE", schema =@Schema( implementation = String.class)),
- @Parameter(name = "pageNo", description = "PAGE_NO", schema =@Schema( implementation = int.class, example = "1")),
- @Parameter(name = "pageSize", description = "PAGE_SIZE", schema =@Schema( implementation = int.class, example = "10"))
+ @Parameter(name = "searchVal", description = "SEARCH_VAL", schema = @Schema(implementation = String.class)),
+ @Parameter(name = "ruleType", description = "RULE_TYPE", schema = @Schema(implementation = int.class, example = "1")),
+ @Parameter(name = "startDate", description = "START_DATE", schema = @Schema(implementation = String.class)),
+ @Parameter(name = "endDate", description = "END_DATE", schema = @Schema(implementation = String.class)),
+ @Parameter(name = "pageNo", description = "PAGE_NO", schema = @Schema(implementation = int.class, example = "1")),
+ @Parameter(name = "pageSize", description = "PAGE_SIZE", schema = @Schema(implementation = int.class, example = "10"))
})
@GetMapping(value = "/rule/page")
@ResponseStatus(HttpStatus.OK)
@@ -145,13 +144,13 @@ public Result queryRuleList() {
*/
@Operation(summary = "queryExecuteResultListPaging", description = "QUERY_EXECUTE_RESULT_LIST_PAGING_NOTES")
@Parameters({
- @Parameter(name = "searchVal", description = "SEARCH_VAL", schema =@Schema( implementation = String.class)),
- @Parameter(name = "ruleType", description = "RULE_TYPE", schema =@Schema( implementation = int.class, example = "1")),
- @Parameter(name = "state", description = "STATE", schema =@Schema( implementation = int.class, example = "1")),
- @Parameter(name = "startDate", description = "START_DATE", schema =@Schema( implementation = String.class)),
- @Parameter(name = "endDate", description = "END_DATE", schema =@Schema( implementation = String.class)),
- @Parameter(name = "pageNo", description = "PAGE_NO", schema =@Schema( implementation = int.class, example = "1")),
- @Parameter(name = "pageSize", description = "PAGE_SIZE", schema =@Schema( implementation = int.class, example = "10"))
+ @Parameter(name = "searchVal", description = "SEARCH_VAL", schema = @Schema(implementation = String.class)),
+ @Parameter(name = "ruleType", description = "RULE_TYPE", schema = @Schema(implementation = int.class, example = "1")),
+ @Parameter(name = "state", description = "STATE", schema = @Schema(implementation = int.class, example = "1")),
+ @Parameter(name = "startDate", description = "START_DATE", schema = @Schema(implementation = String.class)),
+ @Parameter(name = "endDate", description = "END_DATE", schema = @Schema(implementation = String.class)),
+ @Parameter(name = "pageNo", description = "PAGE_NO", schema = @Schema(implementation = int.class, example = "1")),
+ @Parameter(name = "pageSize", description = "PAGE_SIZE", schema = @Schema(implementation = int.class, example = "10"))
})
@GetMapping(value = "/result/page")
@ResponseStatus(HttpStatus.OK)
@@ -182,7 +181,7 @@ public Result queryExecuteResultListPaging(@Parameter(hidden = true) @RequestAtt
*/
@Operation(summary = "getDatasourceOptionsById", description = "GET_DATASOURCE_OPTIONS_NOTES")
@Parameters({
- @Parameter(name = "datasourceId", description = "DATA_SOURCE_ID", schema =@Schema( implementation = int.class, example = "1"))
+ @Parameter(name = "datasourceId", description = "DATA_SOURCE_ID", schema = @Schema(implementation = 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 5fc0de1273e6..867402a40b94 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
@@ -30,11 +30,6 @@
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.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.Parameter;
-import io.swagger.v3.oas.annotations.Parameters;
-import io.swagger.v3.oas.annotations.media.Schema;
-import io.swagger.v3.oas.annotations.tags.Tag;
import org.apache.dolphinscheduler.api.aspect.AccessLogAnnotation;
import org.apache.dolphinscheduler.api.enums.Status;
import org.apache.dolphinscheduler.api.exceptions.ApiException;
@@ -65,6 +60,12 @@
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Parameters;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.tags.Tag;
+
/**
* data source controller
*/
@@ -106,8 +107,8 @@ public Result createDataSource(@Parameter(hidden = true) @RequestAttribute(value
*/
@Operation(summary = "updateDataSource", description = "UPDATE_DATA_SOURCE_NOTES")
@Parameters({
- @Parameter(name = "id", description = "DATA_SOURCE_ID", required = true, schema =@Schema( implementation = int.class)),
- @Parameter(name = "dataSourceParam", description = "DATA_SOURCE_PARAM", required = true, schema =@Schema( implementation = BaseDataSourceParamDTO.class))
+ @Parameter(name = "id", description = "DATA_SOURCE_ID", required = true, schema = @Schema(implementation = int.class)),
+ @Parameter(name = "dataSourceParam", description = "DATA_SOURCE_PARAM", required = true, schema = @Schema(implementation = BaseDataSourceParamDTO.class))
})
@PutMapping(value = "/{id}")
@ResponseStatus(HttpStatus.OK)
@@ -130,7 +131,7 @@ public Result updateDataSource(@Parameter(hidden = true) @RequestAttribute(value
*/
@Operation(summary = "queryDataSource", description = "QUERY_DATA_SOURCE_NOTES")
@Parameters({
- @Parameter(name = "id", description = "DATA_SOURCE_ID", required = true, schema =@Schema( implementation = int.class, example = "100"))
+ @Parameter(name = "id", description = "DATA_SOURCE_ID", required = true, schema = @Schema(implementation = int.class, example = "100"))
})
@GetMapping(value = "/{id}")
@@ -153,8 +154,8 @@ public Result queryDataSource(@Parameter(hidden = true) @RequestAttribute(value
*/
@Operation(summary = "queryDataSourceList", description = "QUERY_DATA_SOURCE_LIST_BY_TYPE_NOTES")
@Parameters({
- @Parameter(name = "type", description = "DB_TYPE", required = true, schema = @Schema (implementation = DbType.class)),
- @Parameter(name = "testFlag", description = "DB_TEST_FLAG", required = true, schema = @Schema (implementation = int.class))
+ @Parameter(name = "type", description = "DB_TYPE", required = true, schema = @Schema(implementation = DbType.class)),
+ @Parameter(name = "testFlag", description = "DB_TEST_FLAG", required = true, schema = @Schema(implementation = int.class))
})
@GetMapping(value = "/list")
@ResponseStatus(HttpStatus.OK)
@@ -178,9 +179,9 @@ public Result queryDataSourceList(@Parameter(hidden = true) @RequestAttribute(va
*/
@Operation(summary = "queryDataSourceListPaging", description = "QUERY_DATA_SOURCE_LIST_PAGING_NOTES")
@Parameters({
- @Parameter(name = "searchVal", description = "SEARCH_VAL", schema =@Schema( implementation = String.class)),
- @Parameter(name = "pageNo", description = "PAGE_NO", required = true, schema =@Schema( implementation = int.class, example = "1")),
- @Parameter(name = "pageSize", description = "PAGE_SIZE", required = true, schema =@Schema( implementation = int.class, example = "20"))
+ @Parameter(name = "searchVal", description = "SEARCH_VAL", schema = @Schema(implementation = String.class)),
+ @Parameter(name = "pageNo", description = "PAGE_NO", required = true, schema = @Schema(implementation = int.class, example = "1")),
+ @Parameter(name = "pageSize", description = "PAGE_SIZE", required = true, schema = @Schema(implementation = int.class, example = "20"))
})
@GetMapping()
@ResponseStatus(HttpStatus.OK)
@@ -228,7 +229,7 @@ public Result connectDataSource(@Parameter(hidden = true) @RequestAttribute(valu
*/
@Operation(summary = "connectionTest", description = "CONNECT_DATA_SOURCE_TEST_NOTES")
@Parameters({
- @Parameter(name = "id", description = "DATA_SOURCE_ID", required = true, schema =@Schema( implementation = int.class, example = "100"))
+ @Parameter(name = "id", description = "DATA_SOURCE_ID", required = true, schema = @Schema(implementation = int.class, example = "100"))
})
@GetMapping(value = "/{id}/connect-test")
@ResponseStatus(HttpStatus.OK)
@@ -248,7 +249,7 @@ public Result connectionTest(@Parameter(hidden = true) @RequestAttribute(value =
*/
@Operation(summary = "deleteDataSource", description = "DELETE_DATA_SOURCE_NOTES")
@Parameters({
- @Parameter(name = "id", description = "DATA_SOURCE_ID", required = true, schema =@Schema( implementation = int.class, example = "100"))
+ @Parameter(name = "id", description = "DATA_SOURCE_ID", required = true, schema = @Schema(implementation = int.class, example = "100"))
})
@DeleteMapping(value = "/{id}")
@ResponseStatus(HttpStatus.OK)
@@ -268,7 +269,7 @@ public Result deleteDataSource(@Parameter(hidden = true) @RequestAttribute(value
*/
@Operation(summary = "verifyDataSourceName", description = "VERIFY_DATA_SOURCE_NOTES")
@Parameters({
- @Parameter(name = "name", description = "DATA_SOURCE_NAME", required = true, schema =@Schema( implementation = String.class))
+ @Parameter(name = "name", description = "DATA_SOURCE_NAME", required = true, schema = @Schema(implementation = String.class))
})
@GetMapping(value = "/verify-name")
@ResponseStatus(HttpStatus.OK)
@@ -288,7 +289,7 @@ public Result verifyDataSourceName(@Parameter(hidden = true) @RequestAttribute(v
*/
@Operation(summary = "unauthDatasource", description = "UNAUTHORIZED_DATA_SOURCE_NOTES")
@Parameters({
- @Parameter(name = "userId", description = "USER_ID", required = true, schema =@Schema( implementation = int.class, example = "100"))
+ @Parameter(name = "userId", description = "USER_ID", required = true, schema = @Schema(implementation = int.class, example = "100"))
})
@GetMapping(value = "/unauth-datasource")
@ResponseStatus(HttpStatus.OK)
@@ -310,7 +311,7 @@ public Result unauthDatasource(@Parameter(hidden = true) @RequestAttribute(value
*/
@Operation(summary = "authedDatasource", description = "AUTHORIZED_DATA_SOURCE_NOTES")
@Parameters({
- @Parameter(name = "userId", description = "USER_ID", required = true, schema =@Schema( implementation = int.class, example = "100"))
+ @Parameter(name = "userId", description = "USER_ID", required = true, schema = @Schema(implementation = int.class, example = "100"))
})
@GetMapping(value = "/authed-datasource")
@ResponseStatus(HttpStatus.OK)
@@ -341,7 +342,7 @@ public Result getKerberosStartupState(@Parameter(hidden = true) @RequestAttribut
@Operation(summary = "tables", description = "GET_DATASOURCE_TABLES_NOTES")
@Parameters({
- @Parameter(name = "datasourceId", description = "DATA_SOURCE_ID", required = true, schema =@Schema( implementation = int.class, example = "1"))
+ @Parameter(name = "datasourceId", description = "DATA_SOURCE_ID", required = true, schema = @Schema(implementation = int.class, example = "1"))
})
@GetMapping(value = "/tables")
@ResponseStatus(HttpStatus.OK)
@@ -353,8 +354,8 @@ public Result getTables(@RequestParam("datasourceId") Integer datasourceId) {
@Operation(summary = "tableColumns", description = "GET_DATASOURCE_TABLE_COLUMNS_NOTES")
@Parameters({
- @Parameter(name = "datasourceId", description = "DATA_SOURCE_ID", required = true, schema =@Schema( implementation = int.class, example = "1")),
- @Parameter(name = "tableName", description = "TABLE_NAME", required = true, schema =@Schema( implementation = String.class, example = "test"))
+ @Parameter(name = "datasourceId", description = "DATA_SOURCE_ID", required = true, schema = @Schema(implementation = int.class, example = "1")),
+ @Parameter(name = "tableName", description = "TABLE_NAME", required = true, schema = @Schema(implementation = String.class, example = "test"))
})
@GetMapping(value = "/tableColumns")
@ResponseStatus(HttpStatus.OK)
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 05f57a77f7df..d6a2ff08581c 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
@@ -24,11 +24,6 @@
import static org.apache.dolphinscheduler.api.enums.Status.UPDATE_ENVIRONMENT_ERROR;
import static org.apache.dolphinscheduler.api.enums.Status.VERIFY_ENVIRONMENT_ERROR;
-import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.Parameter;
-import io.swagger.v3.oas.annotations.Parameters;
-import io.swagger.v3.oas.annotations.media.Schema;
-import io.swagger.v3.oas.annotations.tags.Tag;
import org.apache.dolphinscheduler.api.aspect.AccessLogAnnotation;
import org.apache.dolphinscheduler.api.exceptions.ApiException;
import org.apache.dolphinscheduler.api.service.EnvironmentService;
@@ -49,6 +44,12 @@
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Parameters;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.tags.Tag;
+
/**
* environment controller
*/
@@ -71,10 +72,10 @@ public class EnvironmentController extends BaseController {
*/
@Operation(summary = "createEnvironment", description = "CREATE_ENVIRONMENT_NOTES")
@Parameters({
- @Parameter(name = "name", description = "ENVIRONMENT_NAME", required = true, schema =@Schema( implementation = String.class)),
- @Parameter(name = "config", description = "CONFIG", required = true, schema =@Schema( implementation = String.class)),
- @Parameter(name = "description", description = "ENVIRONMENT_DESC", schema =@Schema( implementation = String.class)),
- @Parameter(name = "workerGroups", description = "WORKER_GROUP_LIST", schema =@Schema( implementation = String.class))
+ @Parameter(name = "name", description = "ENVIRONMENT_NAME", required = true, schema = @Schema(implementation = String.class)),
+ @Parameter(name = "config", description = "CONFIG", required = true, schema = @Schema(implementation = String.class)),
+ @Parameter(name = "description", description = "ENVIRONMENT_DESC", schema = @Schema(implementation = String.class)),
+ @Parameter(name = "workerGroups", description = "WORKER_GROUP_LIST", schema = @Schema(implementation = String.class))
})
@PostMapping(value = "/create")
@ResponseStatus(HttpStatus.CREATED)
@@ -103,11 +104,11 @@ public Result createEnvironment(@Parameter(hidden = true) @RequestAttribute(valu
*/
@Operation(summary = "updateEnvironment", description = "UPDATE_ENVIRONMENT_NOTES")
@Parameters({
- @Parameter(name = "code", description = "ENVIRONMENT_CODE", required = true, schema =@Schema( implementation = long.class, example = "100")),
- @Parameter(name = "name", description = "ENVIRONMENT_NAME", required = true, schema =@Schema( implementation = String.class)),
- @Parameter(name = "config", description = "ENVIRONMENT_CONFIG", required = true, schema =@Schema( implementation = String.class)),
- @Parameter(name = "description", description = "ENVIRONMENT_DESC", schema =@Schema( implementation = String.class)),
- @Parameter(name = "workerGroups", description = "WORKER_GROUP_LIST", schema =@Schema( implementation = String.class))
+ @Parameter(name = "code", description = "ENVIRONMENT_CODE", required = true, schema = @Schema(implementation = long.class, example = "100")),
+ @Parameter(name = "name", description = "ENVIRONMENT_NAME", required = true, schema = @Schema(implementation = String.class)),
+ @Parameter(name = "config", description = "ENVIRONMENT_CONFIG", required = true, schema = @Schema(implementation = String.class)),
+ @Parameter(name = "description", description = "ENVIRONMENT_DESC", schema = @Schema(implementation = String.class)),
+ @Parameter(name = "workerGroups", description = "WORKER_GROUP_LIST", schema = @Schema(implementation = String.class))
})
@PostMapping(value = "/update")
@ResponseStatus(HttpStatus.OK)
@@ -132,7 +133,7 @@ public Result updateEnvironment(@Parameter(hidden = true) @RequestAttribute(valu
*/
@Operation(summary = "queryEnvironmentByCode", description = "QUERY_ENVIRONMENT_BY_CODE_NOTES")
@Parameters({
- @Parameter(name = "environmentCode", description = "ENVIRONMENT_CODE", required = true, schema =@Schema( implementation = long.class, example = "100"))
+ @Parameter(name = "environmentCode", description = "ENVIRONMENT_CODE", required = true, schema = @Schema(implementation = long.class, example = "100"))
})
@GetMapping(value = "/query-by-code")
@ResponseStatus(HttpStatus.OK)
@@ -155,9 +156,9 @@ public Result queryEnvironmentByCode(@Parameter(hidden = true) @RequestAttribute
*/
@Operation(summary = "queryEnvironmentListPaging", description = "QUERY_ENVIRONMENT_LIST_PAGING_NOTES")
@Parameters({
- @Parameter(name = "searchVal", description = "SEARCH_VAL", schema =@Schema( implementation = String.class)),
- @Parameter(name = "pageSize", description = "PAGE_SIZE", required = true, schema =@Schema( implementation = int.class, example = "20")),
- @Parameter(name = "pageNo", description = "PAGE_NO", required = true, schema =@Schema( implementation = int.class, example = "1"))
+ @Parameter(name = "searchVal", description = "SEARCH_VAL", schema = @Schema(implementation = String.class)),
+ @Parameter(name = "pageSize", description = "PAGE_SIZE", required = true, schema = @Schema(implementation = int.class, example = "20")),
+ @Parameter(name = "pageNo", description = "PAGE_NO", required = true, schema = @Schema(implementation = int.class, example = "1"))
})
@GetMapping(value = "/list-paging")
@ResponseStatus(HttpStatus.OK)
@@ -186,7 +187,7 @@ public Result queryEnvironmentListPaging(@Parameter(hidden = true) @RequestAttri
*/
@Operation(summary = "deleteEnvironmentByCode", description = "DELETE_ENVIRONMENT_BY_CODE_NOTES")
@Parameters({
- @Parameter(name = "environmentCode", description = "ENVIRONMENT_CODE", required = true, schema =@Schema( implementation = long.class, example = "100"))
+ @Parameter(name = "environmentCode", description = "ENVIRONMENT_CODE", required = true, schema = @Schema(implementation = long.class, example = "100"))
})
@PostMapping(value = "/delete")
@ResponseStatus(HttpStatus.OK)
@@ -224,7 +225,7 @@ public Result queryAllEnvironmentList(@Parameter(hidden = true) @RequestAttribut
*/
@Operation(summary = "verifyEnvironment", description = "VERIFY_ENVIRONMENT_NOTES")
@Parameters({
- @Parameter(name = "environmentName", description = "ENVIRONMENT_NAME", required = true, schema =@Schema( implementation = String.class))
+ @Parameter(name = "environmentName", description = "ENVIRONMENT_NAME", required = true, schema = @Schema(implementation = String.class))
})
@PostMapping(value = "/verify-environment")
@ResponseStatus(HttpStatus.OK)
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 12f37015943d..b402cffe4a08 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
@@ -23,11 +23,6 @@
import static org.apache.dolphinscheduler.api.enums.Status.QUERY_EXECUTING_WORKFLOW_ERROR;
import static org.apache.dolphinscheduler.api.enums.Status.START_PROCESS_INSTANCE_ERROR;
-import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.Parameter;
-import io.swagger.v3.oas.annotations.Parameters;
-import io.swagger.v3.oas.annotations.media.Schema;
-import io.swagger.v3.oas.annotations.tags.Tag;
import org.apache.dolphinscheduler.api.aspect.AccessLogAnnotation;
import org.apache.dolphinscheduler.api.enums.ExecuteType;
import org.apache.dolphinscheduler.api.enums.Status;
@@ -69,6 +64,12 @@
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Parameters;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.tags.Tag;
+
/**
* executor controller
*/
@@ -105,23 +106,23 @@ public class ExecutorController extends BaseController {
*/
@Operation(summary = "startProcessInstance", description = "RUN_PROCESS_INSTANCE_NOTES")
@Parameters({
- @Parameter(name = "processDefinitionCode", description = "PROCESS_DEFINITION_CODE", required = true, schema =@Schema( implementation = Long.class), example = "100"),
- @Parameter(name = "scheduleTime", description = "SCHEDULE_TIME", required = true, schema =@Schema( implementation = String.class), example = "2022-04-06 00:00:00,2022-04-06 00:00:00"),
- @Parameter(name = "failureStrategy", description = "FAILURE_STRATEGY", required = true, schema =@Schema( implementation = FailureStrategy.class)),
- @Parameter(name = "startNodeList", description = "START_NODE_LIST", schema =@Schema( implementation = String.class)),
- @Parameter(name = "taskDependType", description = "TASK_DEPEND_TYPE", schema =@Schema( implementation = TaskDependType.class)),
- @Parameter(name = "execType", description = "COMMAND_TYPE", schema =@Schema( implementation = CommandType.class)),
- @Parameter(name = "warningType", description = "WARNING_TYPE", required = true, schema =@Schema( implementation = WarningType.class)),
- @Parameter(name = "warningGroupId", description = "WARNING_GROUP_ID", schema =@Schema( implementation = int.class, example = "100")),
- @Parameter(name = "runMode", description = "RUN_MODE", schema =@Schema( implementation = RunMode.class)),
- @Parameter(name = "processInstancePriority", description = "PROCESS_INSTANCE_PRIORITY", required = true, schema =@Schema( implementation = Priority.class)),
- @Parameter(name = "workerGroup", description = "WORKER_GROUP", schema =@Schema( implementation = String.class, example = "default")),
- @Parameter(name = "environmentCode", description = "ENVIRONMENT_CODE", schema =@Schema( implementation = Long.class, example = "-1")),
- @Parameter(name = "timeout", description = "TIMEOUT", schema =@Schema( implementation = int.class, example = "100")),
- @Parameter(name = "expectedParallelismNumber", description = "EXPECTED_PARALLELISM_NUMBER", schema =@Schema( implementation = int.class , example = "8")),
- @Parameter(name = "dryRun", description = "DRY_RUN", schema =@Schema( implementation = int.class, example = "0")),
- @Parameter(name = "testFlag", description = "TEST_FLAG", schema =@Schema( implementation = int.class, example = "0")),
- @Parameter(name = "complementDependentMode", description = "COMPLEMENT_DEPENDENT_MODE", schema =@Schema( implementation = ComplementDependentMode.class))
+ @Parameter(name = "processDefinitionCode", description = "PROCESS_DEFINITION_CODE", required = true, schema = @Schema(implementation = Long.class), example = "100"),
+ @Parameter(name = "scheduleTime", description = "SCHEDULE_TIME", required = true, schema = @Schema(implementation = String.class), example = "2022-04-06 00:00:00,2022-04-06 00:00:00"),
+ @Parameter(name = "failureStrategy", description = "FAILURE_STRATEGY", required = true, schema = @Schema(implementation = FailureStrategy.class)),
+ @Parameter(name = "startNodeList", description = "START_NODE_LIST", schema = @Schema(implementation = String.class)),
+ @Parameter(name = "taskDependType", description = "TASK_DEPEND_TYPE", schema = @Schema(implementation = TaskDependType.class)),
+ @Parameter(name = "execType", description = "COMMAND_TYPE", schema = @Schema(implementation = CommandType.class)),
+ @Parameter(name = "warningType", description = "WARNING_TYPE", required = true, schema = @Schema(implementation = WarningType.class)),
+ @Parameter(name = "warningGroupId", description = "WARNING_GROUP_ID", schema = @Schema(implementation = int.class, example = "100")),
+ @Parameter(name = "runMode", description = "RUN_MODE", schema = @Schema(implementation = RunMode.class)),
+ @Parameter(name = "processInstancePriority", description = "PROCESS_INSTANCE_PRIORITY", required = true, schema = @Schema(implementation = Priority.class)),
+ @Parameter(name = "workerGroup", description = "WORKER_GROUP", schema = @Schema(implementation = String.class, example = "default")),
+ @Parameter(name = "environmentCode", description = "ENVIRONMENT_CODE", schema = @Schema(implementation = Long.class, example = "-1")),
+ @Parameter(name = "timeout", description = "TIMEOUT", schema = @Schema(implementation = int.class, example = "100")),
+ @Parameter(name = "expectedParallelismNumber", description = "EXPECTED_PARALLELISM_NUMBER", schema = @Schema(implementation = int.class, example = "8")),
+ @Parameter(name = "dryRun", description = "DRY_RUN", schema = @Schema(implementation = int.class, example = "0")),
+ @Parameter(name = "testFlag", description = "TEST_FLAG", schema = @Schema(implementation = int.class, example = "0")),
+ @Parameter(name = "complementDependentMode", description = "COMPLEMENT_DEPENDENT_MODE", schema = @Schema(implementation = ComplementDependentMode.class))
})
@PostMapping(value = "start-process-instance")
@ResponseStatus(HttpStatus.OK)
@@ -193,23 +194,23 @@ public Result startProcessInstance(@Parameter(hidden = true) @RequestAttribute(v
*/
@Operation(summary = "batchStartProcessInstance", description = "BATCH_RUN_PROCESS_INSTANCE_NOTES")
@Parameters({
- @Parameter(name = "processDefinitionCodes", description = "PROCESS_DEFINITION_CODES", required = true, schema =@Schema( implementation = String.class, example = "1,2,3")),
- @Parameter(name = "scheduleTime", description = "SCHEDULE_TIME", required = true, schema =@Schema( implementation = String.class, example = "2022-04-06 00:00:00,2022-04-06 00:00:00")),
- @Parameter(name = "failureStrategy", description = "FAILURE_STRATEGY", required = true, schema =@Schema( implementation = FailureStrategy.class)),
- @Parameter(name = "startNodeList", description = "START_NODE_LIST", schema =@Schema( implementation = String.class)),
- @Parameter(name = "taskDependType", description = "TASK_DEPEND_TYPE", schema =@Schema( implementation = TaskDependType.class)),
- @Parameter(name = "execType", description = "COMMAND_TYPE", schema =@Schema( implementation = CommandType.class)),
- @Parameter(name = "warningType", description = "WARNING_TYPE", required = true, schema =@Schema( implementation = WarningType.class)),
- @Parameter(name = "warningGroupId", description = "WARNING_GROUP_ID", required = true, schema =@Schema( implementation = int.class, example = "100")),
- @Parameter(name = "runMode", description = "RUN_MODE", schema =@Schema( implementation = RunMode.class)),
- @Parameter(name = "processInstancePriority", description = "PROCESS_INSTANCE_PRIORITY", required = true, schema =@Schema( implementation = Priority.class)),
- @Parameter(name = "workerGroup", description = "WORKER_GROUP", schema =@Schema( implementation = String.class, example = "default")),
- @Parameter(name = "environmentCode", description = "ENVIRONMENT_CODE", schema =@Schema( implementation = Long.class, example = "-1")),
- @Parameter(name = "timeout", description = "TIMEOUT", schema =@Schema( implementation = int.class, example = "100")),
- @Parameter(name = "expectedParallelismNumber", description = "EXPECTED_PARALLELISM_NUMBER", schema =@Schema( implementation = int.class, example = "8")),
- @Parameter(name = "dryRun", description = "DRY_RUN", schema =@Schema( implementation = int.class, example = "0")),
- @Parameter(name = "testFlag", description = "TEST_FLAG", schema =@Schema( implementation = int.class, example = "0")),
- @Parameter(name = "complementDependentMode", description = "COMPLEMENT_DEPENDENT_MODE", schema =@Schema( implementation = ComplementDependentMode.class))
+ @Parameter(name = "processDefinitionCodes", description = "PROCESS_DEFINITION_CODES", required = true, schema = @Schema(implementation = String.class, example = "1,2,3")),
+ @Parameter(name = "scheduleTime", description = "SCHEDULE_TIME", required = true, schema = @Schema(implementation = String.class, example = "2022-04-06 00:00:00,2022-04-06 00:00:00")),
+ @Parameter(name = "failureStrategy", description = "FAILURE_STRATEGY", required = true, schema = @Schema(implementation = FailureStrategy.class)),
+ @Parameter(name = "startNodeList", description = "START_NODE_LIST", schema = @Schema(implementation = String.class)),
+ @Parameter(name = "taskDependType", description = "TASK_DEPEND_TYPE", schema = @Schema(implementation = TaskDependType.class)),
+ @Parameter(name = "execType", description = "COMMAND_TYPE", schema = @Schema(implementation = CommandType.class)),
+ @Parameter(name = "warningType", description = "WARNING_TYPE", required = true, schema = @Schema(implementation = WarningType.class)),
+ @Parameter(name = "warningGroupId", description = "WARNING_GROUP_ID", required = true, schema = @Schema(implementation = int.class, example = "100")),
+ @Parameter(name = "runMode", description = "RUN_MODE", schema = @Schema(implementation = RunMode.class)),
+ @Parameter(name = "processInstancePriority", description = "PROCESS_INSTANCE_PRIORITY", required = true, schema = @Schema(implementation = Priority.class)),
+ @Parameter(name = "workerGroup", description = "WORKER_GROUP", schema = @Schema(implementation = String.class, example = "default")),
+ @Parameter(name = "environmentCode", description = "ENVIRONMENT_CODE", schema = @Schema(implementation = Long.class, example = "-1")),
+ @Parameter(name = "timeout", description = "TIMEOUT", schema = @Schema(implementation = int.class, example = "100")),
+ @Parameter(name = "expectedParallelismNumber", description = "EXPECTED_PARALLELISM_NUMBER", schema = @Schema(implementation = int.class, example = "8")),
+ @Parameter(name = "dryRun", description = "DRY_RUN", schema = @Schema(implementation = int.class, example = "0")),
+ @Parameter(name = "testFlag", description = "TEST_FLAG", schema = @Schema(implementation = int.class, example = "0")),
+ @Parameter(name = "complementDependentMode", description = "COMPLEMENT_DEPENDENT_MODE", schema = @Schema(implementation = ComplementDependentMode.class))
})
@PostMapping(value = "batch-start-process-instance")
@ResponseStatus(HttpStatus.OK)
@@ -294,8 +295,8 @@ public Result batchStartProcessInstance(@Parameter(hidden = true) @RequestAttrib
*/
@Operation(summary = "execute", description = "EXECUTE_ACTION_TO_PROCESS_INSTANCE_NOTES")
@Parameters({
- @Parameter(name = "processInstanceId", description = "PROCESS_INSTANCE_ID", required = true, schema =@Schema( implementation = int.class, example = "100")),
- @Parameter(name = "executeType", description = "EXECUTE_TYPE", required = true, schema =@Schema( implementation = ExecuteType.class))
+ @Parameter(name = "processInstanceId", description = "PROCESS_INSTANCE_ID", required = true, schema = @Schema(implementation = int.class, example = "100")),
+ @Parameter(name = "executeType", description = "EXECUTE_TYPE", required = true, schema = @Schema(implementation = ExecuteType.class))
})
@PostMapping(value = "/execute")
@ResponseStatus(HttpStatus.OK)
@@ -304,9 +305,9 @@ public Result batchStartProcessInstance(@Parameter(hidden = true) @RequestAttrib
public Result execute(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@Parameter(name = "projectCode", description = "PROJECT_CODE", required = true) @PathVariable long projectCode,
@RequestParam("processInstanceId") Integer processInstanceId,
- @RequestParam("executeType") ExecuteType executeType
- ) {
- logger.info("Start to execute process instance, projectCode:{}, processInstanceId:{}.", projectCode, processInstanceId);
+ @RequestParam("executeType") ExecuteType executeType) {
+ logger.info("Start to execute process instance, projectCode:{}, processInstanceId:{}.", projectCode,
+ processInstanceId);
Map result = execService.execute(loginUser, projectCode, processInstanceId, executeType);
return returnDataList(result);
}
@@ -322,9 +323,9 @@ public Result execute(@Parameter(hidden = true) @RequestAttribute(value = Consta
*/
@Operation(summary = "batchExecute", description = "BATCH_EXECUTE_ACTION_TO_PROCESS_INSTANCE_NOTES")
@Parameters({
- @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true, schema =@Schema( implementation = int.class)),
- @Parameter(name = "processInstanceIds", description = "PROCESS_INSTANCE_IDS", required = true, schema =@Schema( implementation = String.class)),
- @Parameter(name = "executeType", description = "EXECUTE_TYPE", required = true, schema =@Schema( implementation = ExecuteType.class))
+ @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true, schema = @Schema(implementation = int.class)),
+ @Parameter(name = "processInstanceIds", description = "PROCESS_INSTANCE_IDS", required = true, schema = @Schema(implementation = String.class)),
+ @Parameter(name = "executeType", description = "EXECUTE_TYPE", required = true, schema = @Schema(implementation = ExecuteType.class))
})
@PostMapping(value = "/batch-execute")
@ResponseStatus(HttpStatus.OK)
@@ -373,7 +374,7 @@ public Result batchExecute(@RequestAttribute(value = Constants.SESSION_USER) Use
*/
@Operation(summary = "startCheckProcessDefinition", description = "START_CHECK_PROCESS_DEFINITION_NOTES")
@Parameters({
- @Parameter(name = "processDefinitionCode", description = "PROCESS_DEFINITION_CODE", required = true, schema =@Schema( implementation = long.class, example = "100"))
+ @Parameter(name = "processDefinitionCode", description = "PROCESS_DEFINITION_CODE", required = true, schema = @Schema(implementation = long.class, example = "100"))
})
@PostMapping(value = "/start-check")
@ResponseStatus(HttpStatus.OK)
@@ -389,7 +390,7 @@ public Result startCheckProcessDefinition(@RequestParam(value = "processDefiniti
*/
@Operation(summary = "queryExecutingWorkflow", description = "QUERY_WORKFLOW_EXECUTE_DATA")
@Parameters({
- @Parameter(name = "processInstanceId", description = "PROCESS_INSTANCE_ID", required = true, schema =@Schema( implementation = int.class, example = "100"))
+ @Parameter(name = "processInstanceId", description = "PROCESS_INSTANCE_ID", required = true, schema = @Schema(implementation = int.class, example = "100"))
})
@GetMapping(value = "/query-executing-workflow")
@ResponseStatus(HttpStatus.OK)
@@ -414,15 +415,15 @@ public Result queryExecutingWorkflow(@RequestParam("id") Integer processInstance
*/
@Operation(summary = "startTaskInstance", description = "RUN_TASK_INSTANCE_NOTES")
@Parameters({
- @Parameter(name = "version", description = "VERSION", schema =@Schema( implementation = int.class, example = "1")),
- @Parameter(name = "failureStrategy", description = "FAILURE_STRATEGY", required = true, schema =@Schema( implementation = FailureStrategy.class)),
- @Parameter(name = "execType", description = "COMMAND_TYPE", schema =@Schema( implementation = CommandType.class)),
- @Parameter(name = "warningType", description = "WARNING_TYPE", required = true, schema =@Schema( implementation = WarningType.class)),
- @Parameter(name = "warningGroupId", description = "WARNING_GROUP_ID", schema =@Schema( implementation = int.class, example = "100")),
- @Parameter(name = "workerGroup", description = "WORKER_GROUP", schema =@Schema( implementation = String.class, example = "default")),
- @Parameter(name = "environmentCode", description = "ENVIRONMENT_CODE", schema =@Schema( implementation = long.class, example = "-1")),
- @Parameter(name = "timeout", description = "TIMEOUT", schema =@Schema( implementation = int.class, example = "100")),
- @Parameter(name = "dryRun", description = "DRY_RUN", schema =@Schema( implementation = int.class, example = "0")),
+ @Parameter(name = "version", description = "VERSION", schema = @Schema(implementation = int.class, example = "1")),
+ @Parameter(name = "failureStrategy", description = "FAILURE_STRATEGY", required = true, schema = @Schema(implementation = FailureStrategy.class)),
+ @Parameter(name = "execType", description = "COMMAND_TYPE", schema = @Schema(implementation = CommandType.class)),
+ @Parameter(name = "warningType", description = "WARNING_TYPE", required = true, schema = @Schema(implementation = WarningType.class)),
+ @Parameter(name = "warningGroupId", description = "WARNING_GROUP_ID", schema = @Schema(implementation = int.class, example = "100")),
+ @Parameter(name = "workerGroup", description = "WORKER_GROUP", schema = @Schema(implementation = String.class, example = "default")),
+ @Parameter(name = "environmentCode", description = "ENVIRONMENT_CODE", schema = @Schema(implementation = long.class, example = "-1")),
+ @Parameter(name = "timeout", description = "TIMEOUT", schema = @Schema(implementation = int.class, example = "100")),
+ @Parameter(name = "dryRun", description = "DRY_RUN", schema = @Schema(implementation = int.class, example = "0")),
})
@PostMapping(value = "/task-instance/{code}/start")
@ResponseStatus(HttpStatus.OK)
diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/FavTaskController.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/FavTaskController.java
index 69d5b6f0c302..4d4e401a8400 100644
--- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/FavTaskController.java
+++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/FavTaskController.java
@@ -17,9 +17,10 @@
package org.apache.dolphinscheduler.api.controller;
-import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.Parameter;
-import io.swagger.v3.oas.annotations.tags.Tag;
+import static org.apache.dolphinscheduler.api.enums.Status.ADD_TASK_TYPE_ERROR;
+import static org.apache.dolphinscheduler.api.enums.Status.DELETE_TASK_TYPE_ERROR;
+import static org.apache.dolphinscheduler.api.enums.Status.LIST_TASK_TYPE_ERROR;
+
import org.apache.dolphinscheduler.api.aspect.AccessLogAnnotation;
import org.apache.dolphinscheduler.api.dto.FavTaskDto;
import org.apache.dolphinscheduler.api.enums.Status;
@@ -28,6 +29,11 @@
import org.apache.dolphinscheduler.api.utils.Result;
import org.apache.dolphinscheduler.common.Constants;
import org.apache.dolphinscheduler.dao.entity.User;
+
+import java.util.List;
+
+import javax.annotation.Resource;
+
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
@@ -38,12 +44,9 @@
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;
-import javax.annotation.Resource;
-import java.util.List;
-
-import static org.apache.dolphinscheduler.api.enums.Status.ADD_TASK_TYPE_ERROR;
-import static org.apache.dolphinscheduler.api.enums.Status.DELETE_TASK_TYPE_ERROR;
-import static org.apache.dolphinscheduler.api.enums.Status.LIST_TASK_TYPE_ERROR;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.tags.Tag;
/**
* fav controller
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 d8822f055e53..22d672f15e6b 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
@@ -26,11 +26,6 @@
import static org.apache.dolphinscheduler.api.enums.Status.UPDATE_K8S_NAMESPACE_ERROR;
import static org.apache.dolphinscheduler.api.enums.Status.VERIFY_K8S_NAMESPACE_ERROR;
-import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.Parameter;
-import io.swagger.v3.oas.annotations.Parameters;
-import io.swagger.v3.oas.annotations.media.Schema;
-import io.swagger.v3.oas.annotations.tags.Tag;
import org.apache.dolphinscheduler.api.aspect.AccessLogAnnotation;
import org.apache.dolphinscheduler.api.exceptions.ApiException;
import org.apache.dolphinscheduler.api.service.K8sNamespaceService;
@@ -55,6 +50,12 @@
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Parameters;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.tags.Tag;
+
/**
* k8s namespace controller
*/
@@ -77,9 +78,9 @@ public class K8sNamespaceController extends BaseController {
*/
@Operation(summary = "queryNamespaceListPaging", description = "QUERY_NAMESPACE_LIST_PAGING_NOTES")
@Parameters({
- @Parameter(name = "searchVal", description = "SEARCH_VAL", schema =@Schema( implementation = String.class)),
- @Parameter(name = "pageSize", description = "PAGE_SIZE", required = true, schema =@Schema( implementation = int.class, example = "10")),
- @Parameter(name = "pageNo", description = "PAGE_NO", required = true, schema =@Schema( implementation = int.class, example = "1"))
+ @Parameter(name = "searchVal", description = "SEARCH_VAL", schema = @Schema(implementation = String.class)),
+ @Parameter(name = "pageSize", description = "PAGE_SIZE", required = true, schema = @Schema(implementation = int.class, example = "10")),
+ @Parameter(name = "pageNo", description = "PAGE_NO", required = true, schema = @Schema(implementation = int.class, example = "1"))
})
@GetMapping()
@ResponseStatus(HttpStatus.OK)
@@ -111,10 +112,10 @@ public Result queryNamespaceListPaging(@Parameter(hidden = true) @RequestAttribu
*/
@Operation(summary = "createK8sNamespace", description = "CREATE_NAMESPACE_NOTES")
@Parameters({
- @Parameter(name = "namespace", description = "NAMESPACE", required = true, schema =@Schema( implementation = String.class)),
- @Parameter(name = "clusterCode", description = "CLUSTER_CODE", required = true, schema =@Schema( implementation = long.class)),
- @Parameter(name = "limits_cpu", description = "LIMITS_CPU", required = false, schema =@Schema( implementation = double.class)),
- @Parameter(name = "limits_memory", description = "LIMITS_MEMORY", required = false, schema =@Schema( implementation = int.class))
+ @Parameter(name = "namespace", description = "NAMESPACE", required = true, schema = @Schema(implementation = String.class)),
+ @Parameter(name = "clusterCode", description = "CLUSTER_CODE", required = true, schema = @Schema(implementation = long.class)),
+ @Parameter(name = "limits_cpu", description = "LIMITS_CPU", required = false, schema = @Schema(implementation = double.class)),
+ @Parameter(name = "limits_memory", description = "LIMITS_MEMORY", required = false, schema = @Schema(implementation = int.class))
})
@PostMapping()
@ResponseStatus(HttpStatus.CREATED)
@@ -141,10 +142,10 @@ public Result createNamespace(@Parameter(hidden = true) @RequestAttribute(value
*/
@Operation(summary = "updateK8sNamespace", description = "UPDATE_NAMESPACE_NOTES")
@Parameters({
- @Parameter(name = "id", description = "K8S_NAMESPACE_ID", required = true, schema =@Schema( implementation = int.class, example = "100")),
- @Parameter(name = "userName", description = "OWNER", required = false, schema =@Schema( implementation = String.class)),
- @Parameter(name = "limitsCpu", description = "LIMITS_CPU", required = false, schema =@Schema( implementation = double.class)),
- @Parameter(name = "limitsMemory", description = "LIMITS_MEMORY", required = false, schema =@Schema( implementation = int.class))})
+ @Parameter(name = "id", description = "K8S_NAMESPACE_ID", required = true, schema = @Schema(implementation = int.class, example = "100")),
+ @Parameter(name = "userName", description = "OWNER", required = false, schema = @Schema(implementation = String.class)),
+ @Parameter(name = "limitsCpu", description = "LIMITS_CPU", required = false, schema = @Schema(implementation = double.class)),
+ @Parameter(name = "limitsMemory", description = "LIMITS_MEMORY", required = false, schema = @Schema(implementation = int.class))})
@PutMapping(value = "/{id}")
@ResponseStatus(HttpStatus.CREATED)
@ApiException(UPDATE_K8S_NAMESPACE_ERROR)
@@ -170,8 +171,8 @@ public Result updateNamespace(@Parameter(hidden = true) @RequestAttribute(value
*/
@Operation(summary = "verifyNamespaceK8s", description = "VERIFY_NAMESPACE_K8S_NOTES")
@Parameters({
- @Parameter(name = "namespace", description = "NAMESPACE", required = true, schema =@Schema( implementation = String.class)),
- @Parameter(name = "clusterCode", description = "CLUSTER_CODE", required = true, schema =@Schema( implementation = long.class)),
+ @Parameter(name = "namespace", description = "NAMESPACE", required = true, schema = @Schema(implementation = String.class)),
+ @Parameter(name = "clusterCode", description = "CLUSTER_CODE", required = true, schema = @Schema(implementation = long.class)),
})
@PostMapping(value = "/verify")
@ResponseStatus(HttpStatus.OK)
@@ -193,7 +194,7 @@ public Result verifyNamespace(@Parameter(hidden = true) @RequestAttribute(value
*/
@Operation(summary = "delNamespaceById", description = "DELETE_NAMESPACE_BY_ID_NOTES")
@Parameters({
- @Parameter(name = "id", description = "NAMESPACE_ID", required = true, schema =@Schema( implementation = int.class, example = "100"))
+ @Parameter(name = "id", description = "NAMESPACE_ID", required = true, schema = @Schema(implementation = int.class, example = "100"))
})
@PostMapping(value = "/delete")
@ResponseStatus(HttpStatus.OK)
@@ -214,7 +215,7 @@ public Result delNamespaceById(@Parameter(hidden = true) @RequestAttribute(value
*/
@Operation(summary = "queryUnauthorizedNamespace", description = "QUERY_UNAUTHORIZED_NAMESPACE_NOTES")
@Parameters({
- @Parameter(name = "userId", description = "USER_ID", schema =@Schema( implementation = int.class, example = "100"))
+ @Parameter(name = "userId", description = "USER_ID", schema = @Schema(implementation = int.class, example = "100"))
})
@GetMapping(value = "/unauth-namespace")
@ResponseStatus(HttpStatus.OK)
@@ -235,7 +236,7 @@ public Result queryUnauthorizedNamespace(@Parameter(hidden = true) @RequestAttri
*/
@Operation(summary = "queryAuthorizedNamespace", description = "QUERY_AUTHORIZED_NAMESPACE_NOTES")
@Parameters({
- @Parameter(name = "userId", description = "USER_ID", schema =@Schema( implementation = int.class, example = "100"))
+ @Parameter(name = "userId", description = "USER_ID", schema = @Schema(implementation = int.class, example = "100"))
})
@GetMapping(value = "/authed-namespace")
@ResponseStatus(HttpStatus.OK)
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 23c1d953adc2..11ccfb321488 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
@@ -20,11 +20,6 @@
import static org.apache.dolphinscheduler.api.enums.Status.DOWNLOAD_TASK_INSTANCE_LOG_FILE_ERROR;
import static org.apache.dolphinscheduler.api.enums.Status.QUERY_TASK_INSTANCE_LOG_ERROR;
-import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.Parameter;
-import io.swagger.v3.oas.annotations.Parameters;
-import io.swagger.v3.oas.annotations.media.Schema;
-import io.swagger.v3.oas.annotations.tags.Tag;
import org.apache.dolphinscheduler.api.aspect.AccessLogAnnotation;
import org.apache.dolphinscheduler.api.exceptions.ApiException;
import org.apache.dolphinscheduler.api.service.LoggerService;
@@ -46,6 +41,12 @@
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Parameters;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.tags.Tag;
+
/**
* logger controller
*/
@@ -68,9 +69,9 @@ public class LoggerController extends BaseController {
*/
@Operation(summary = "queryLog", description = "QUERY_TASK_INSTANCE_LOG_NOTES")
@Parameters({
- @Parameter(name = "taskInstanceId", description = "TASK_ID", required = true, schema =@Schema( implementation = int.class, example = "100")),
- @Parameter(name = "skipLineNum", description = "SKIP_LINE_NUM", required = true, schema =@Schema( implementation = int.class, example = "100")),
- @Parameter(name = "limit", description = "LIMIT", required = true, schema =@Schema( implementation = int.class, example = "100"))
+ @Parameter(name = "taskInstanceId", description = "TASK_ID", required = true, schema = @Schema(implementation = int.class, example = "100")),
+ @Parameter(name = "skipLineNum", description = "SKIP_LINE_NUM", required = true, schema = @Schema(implementation = int.class, example = "100")),
+ @Parameter(name = "limit", description = "LIMIT", required = true, schema = @Schema(implementation = int.class, example = "100"))
})
@GetMapping(value = "/detail")
@ResponseStatus(HttpStatus.OK)
@@ -92,7 +93,7 @@ public Result queryLog(@Parameter(hidden = true) @RequestAttrib
*/
@Operation(summary = "downloadTaskLog", description = "DOWNLOAD_TASK_INSTANCE_LOG_NOTES")
@Parameters({
- @Parameter(name = "taskInstanceId", description = "TASK_ID", required = true, schema =@Schema( implementation = int.class, example = "100"))
+ @Parameter(name = "taskInstanceId", description = "TASK_ID", required = true, schema = @Schema(implementation = int.class, example = "100"))
})
@GetMapping(value = "/download-log")
@ResponseBody
@@ -120,10 +121,10 @@ public ResponseEntity downloadTaskLog(@Parameter(hidden = true) @RequestAttribut
*/
@Operation(summary = "queryLogInSpecifiedProject", description = "QUERY_TASK_INSTANCE_LOG_IN_SPECIFIED_PROJECT_NOTES")
@Parameters({
- @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true, schema =@Schema( implementation = long.class)),
- @Parameter(name = "taskInstanceId", description = "TASK_ID", required = true, schema =@Schema( implementation = int.class, example = "100")),
- @Parameter(name = "skipLineNum", description = "SKIP_LINE_NUM", required = true, schema =@Schema( implementation = int.class, example = "100")),
- @Parameter(name = "limit", description = "LIMIT", required = true, schema =@Schema( implementation = int.class, example = "100"))
+ @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true, schema = @Schema(implementation = long.class)),
+ @Parameter(name = "taskInstanceId", description = "TASK_ID", required = true, schema = @Schema(implementation = int.class, example = "100")),
+ @Parameter(name = "skipLineNum", description = "SKIP_LINE_NUM", required = true, schema = @Schema(implementation = int.class, example = "100")),
+ @Parameter(name = "limit", description = "LIMIT", required = true, schema = @Schema(implementation = int.class, example = "100"))
})
@GetMapping(value = "/{projectCode}/detail")
@ResponseStatus(HttpStatus.OK)
@@ -147,8 +148,8 @@ public Result queryLog(@Parameter(hidden = true) @RequestAttribute(value
*/
@Operation(summary = "downloadTaskLogInSpecifiedProject", description = "DOWNLOAD_TASK_INSTANCE_LOG_IN_SPECIFIED_PROJECT_NOTES")
@Parameters({
- @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true, schema =@Schema( implementation = long.class)),
- @Parameter(name = "taskInstanceId", description = "TASK_ID", required = true, schema =@Schema( implementation = int.class, example = "100"))
+ @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true, schema = @Schema(implementation = long.class)),
+ @Parameter(name = "taskInstanceId", description = "TASK_ID", required = true, schema = @Schema(implementation = int.class, example = "100"))
})
@GetMapping(value = "/{projectCode}/download-log")
@ResponseBody
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 ca503e69f058..7eb73433f61b 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
@@ -21,11 +21,6 @@
import static org.apache.dolphinscheduler.api.enums.Status.SIGN_OUT_ERROR;
import static org.apache.dolphinscheduler.api.enums.Status.USER_LOGIN_FAILURE;
-import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.Parameter;
-import io.swagger.v3.oas.annotations.Parameters;
-import io.swagger.v3.oas.annotations.media.Schema;
-import io.swagger.v3.oas.annotations.tags.Tag;
import org.apache.dolphinscheduler.api.aspect.AccessLogAnnotation;
import org.apache.dolphinscheduler.api.enums.Status;
import org.apache.dolphinscheduler.api.exceptions.ApiException;
@@ -51,6 +46,12 @@
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Parameters;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.tags.Tag;
+
/**
* login controller
*/
@@ -76,8 +77,8 @@ public class LoginController extends BaseController {
*/
@Operation(summary = "login", description = "LOGIN_NOTES")
@Parameters({
- @Parameter(name = "userName", description = "USER_NAME", required = true, schema =@Schema( implementation = String.class)),
- @Parameter(name = "userPassword", description = "USER_PASSWORD", required = true, schema =@Schema( implementation = String.class))
+ @Parameter(name = "userName", description = "USER_NAME", required = true, schema = @Schema(implementation = String.class)),
+ @Parameter(name = "userPassword", description = "USER_PASSWORD", required = true, schema = @Schema(implementation = String.class))
})
@PostMapping(value = "/login")
@ApiException(USER_LOGIN_FAILURE)
diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/MonitorController.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/MonitorController.java
index 6a09639a8e87..3e5cb5d07a7e 100644
--- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/MonitorController.java
+++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/MonitorController.java
@@ -21,9 +21,6 @@
import static org.apache.dolphinscheduler.api.enums.Status.LIST_WORKERS_ERROR;
import static org.apache.dolphinscheduler.api.enums.Status.QUERY_DATABASE_STATE_ERROR;
-import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.Parameter;
-import io.swagger.v3.oas.annotations.tags.Tag;
import org.apache.dolphinscheduler.api.aspect.AccessLogAnnotation;
import org.apache.dolphinscheduler.api.exceptions.ApiException;
import org.apache.dolphinscheduler.api.service.MonitorService;
@@ -41,6 +38,10 @@
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.tags.Tag;
+
/**
* monitor controller
*/
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 4411f45b5555..98580dee9acc 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
@@ -35,11 +35,6 @@
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.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.Parameter;
-import io.swagger.v3.oas.annotations.Parameters;
-import io.swagger.v3.oas.annotations.media.Schema;
-import io.swagger.v3.oas.annotations.tags.Tag;
import org.apache.dolphinscheduler.api.aspect.AccessLogAnnotation;
import org.apache.dolphinscheduler.api.enums.Status;
import org.apache.dolphinscheduler.api.exceptions.ApiException;
@@ -74,6 +69,12 @@
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Parameters;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.tags.Tag;
+
/**
* process definition controller
*/
@@ -105,10 +106,10 @@ public class ProcessDefinitionController extends BaseController {
*/
@Operation(summary = "createProcessDefinition", description = "CREATE_PROCESS_DEFINITION_NOTES")
@Parameters({
- @Parameter(name = "name", description = "PROCESS_DEFINITION_NAME", required = true, schema =@Schema( implementation = String.class)),
- @Parameter(name = "locations", description = "PROCESS_DEFINITION_LOCATIONS", required = true, schema =@Schema( implementation = String.class)),
- @Parameter(name = "description", description = "PROCESS_DEFINITION_DESC", required = false, schema =@Schema( implementation = String.class)),
- @Parameter(name = "otherParamsJson", description = "OTHER_PARAMS_JSON", required = false, schema =@Schema( implementation = String.class))
+ @Parameter(name = "name", description = "PROCESS_DEFINITION_NAME", required = true, schema = @Schema(implementation = String.class)),
+ @Parameter(name = "locations", description = "PROCESS_DEFINITION_LOCATIONS", required = true, schema = @Schema(implementation = String.class)),
+ @Parameter(name = "description", description = "PROCESS_DEFINITION_DESC", required = false, schema = @Schema(implementation = String.class)),
+ @Parameter(name = "otherParamsJson", description = "OTHER_PARAMS_JSON", required = false, schema = @Schema(implementation = String.class))
})
@PostMapping()
@ResponseStatus(HttpStatus.CREATED)
@@ -143,8 +144,8 @@ public Result createProcessDefinition(@Parameter(hidden = true) @RequestAttribut
*/
@Operation(summary = "batchCopyByCodes", description = "COPY_PROCESS_DEFINITION_NOTES")
@Parameters({
- @Parameter(name = "codes", description = "PROCESS_DEFINITION_CODES", required = true, schema =@Schema( implementation = String.class, example = "3,4")),
- @Parameter(name = "targetProjectCode", description = "TARGET_PROJECT_CODE", required = true, schema =@Schema( implementation = long.class, example = "123"))
+ @Parameter(name = "codes", description = "PROCESS_DEFINITION_CODES", required = true, schema = @Schema(implementation = String.class, example = "3,4")),
+ @Parameter(name = "targetProjectCode", description = "TARGET_PROJECT_CODE", required = true, schema = @Schema(implementation = long.class, example = "123"))
})
@PostMapping(value = "/batch-copy")
@ResponseStatus(HttpStatus.OK)
@@ -169,8 +170,8 @@ public Result copyProcessDefinition(@Parameter(hidden = true) @RequestAttribute(
*/
@Operation(summary = "batchMoveByCodes", description = "MOVE_PROCESS_DEFINITION_NOTES")
@Parameters({
- @Parameter(name = "codes", description = "PROCESS_DEFINITION_CODES", required = true, schema =@Schema( implementation = String.class, example = "3,4")),
- @Parameter(name = "targetProjectCode", description = "TARGET_PROJECT_CODE", required = true, schema =@Schema( implementation = long.class, example = "123"))
+ @Parameter(name = "codes", description = "PROCESS_DEFINITION_CODES", required = true, schema = @Schema(implementation = String.class, example = "3,4")),
+ @Parameter(name = "targetProjectCode", description = "TARGET_PROJECT_CODE", required = true, schema = @Schema(implementation = long.class, example = "123"))
})
@PostMapping(value = "/batch-move")
@ResponseStatus(HttpStatus.OK)
@@ -194,8 +195,8 @@ public Result moveProcessDefinition(@Parameter(hidden = true) @RequestAttribute(
*/
@Operation(summary = "verify-name", description = "VERIFY_PROCESS_DEFINITION_NAME_NOTES")
@Parameters({
- @Parameter(name = "name", description = "PROCESS_DEFINITION_NAME", required = true, schema =@Schema( implementation = String.class)),
- @Parameter(name = "code", description = "PROCESS_DEFINITION_CODE", required = false, schema =@Schema( implementation = Long.class)),
+ @Parameter(name = "name", description = "PROCESS_DEFINITION_NAME", required = true, schema = @Schema(implementation = String.class)),
+ @Parameter(name = "code", description = "PROCESS_DEFINITION_CODE", required = false, schema = @Schema(implementation = Long.class)),
})
@GetMapping(value = "/verify-name")
@ResponseStatus(HttpStatus.OK)
@@ -229,12 +230,12 @@ public Result verifyProcessDefinitionName(@Parameter(hidden = true) @RequestAttr
*/
@Operation(summary = "update", description = "UPDATE_PROCESS_DEFINITION_NOTES")
@Parameters({
- @Parameter(name = "name", description = "PROCESS_DEFINITION_NAME", required = true, schema =@Schema( implementation = String.class)),
- @Parameter(name = "code", description = "PROCESS_DEFINITION_CODE", required = true, schema =@Schema( implementation = long.class, example = "123456789")),
- @Parameter(name = "locations", description = "PROCESS_DEFINITION_LOCATIONS", required = true, schema =@Schema( implementation = String.class)),
- @Parameter(name = "description", description = "PROCESS_DEFINITION_DESC", required = false, schema =@Schema( implementation = String.class)),
- @Parameter(name = "releaseState", description = "RELEASE_PROCESS_DEFINITION_NOTES", required = false, schema =@Schema( implementation = ReleaseState.class)),
- @Parameter(name = "otherParamsJson", description = "OTHER_PARAMS_JSON", required = false, schema =@Schema( implementation = String.class))
+ @Parameter(name = "name", description = "PROCESS_DEFINITION_NAME", required = true, schema = @Schema(implementation = String.class)),
+ @Parameter(name = "code", description = "PROCESS_DEFINITION_CODE", required = true, schema = @Schema(implementation = long.class, example = "123456789")),
+ @Parameter(name = "locations", description = "PROCESS_DEFINITION_LOCATIONS", required = true, schema = @Schema(implementation = String.class)),
+ @Parameter(name = "description", description = "PROCESS_DEFINITION_DESC", required = false, schema = @Schema(implementation = String.class)),
+ @Parameter(name = "releaseState", description = "RELEASE_PROCESS_DEFINITION_NOTES", required = false, schema = @Schema(implementation = ReleaseState.class)),
+ @Parameter(name = "otherParamsJson", description = "OTHER_PARAMS_JSON", required = false, schema = @Schema(implementation = String.class))
})
@PutMapping(value = "/{code}")
@ResponseStatus(HttpStatus.OK)
@@ -282,9 +283,9 @@ public Result updateProcessDefinition(@Parameter(hidden = true) @RequestAttribut
*/
@Operation(summary = "queryVersions", description = "QUERY_PROCESS_DEFINITION_VERSIONS_NOTES")
@Parameters({
- @Parameter(name = "pageNo", description = "PAGE_NO", required = true, schema =@Schema( implementation = int.class, example = "1")),
- @Parameter(name = "pageSize", description = "PAGE_SIZE", required = true, schema =@Schema( implementation = int.class, example = "10")),
- @Parameter(name = "code", description = "PROCESS_DEFINITION_CODE", required = true, schema =@Schema( implementation = long.class, example = "1"))
+ @Parameter(name = "pageNo", description = "PAGE_NO", required = true, schema = @Schema(implementation = int.class, example = "1")),
+ @Parameter(name = "pageSize", description = "PAGE_SIZE", required = true, schema = @Schema(implementation = int.class, example = "10")),
+ @Parameter(name = "code", description = "PROCESS_DEFINITION_CODE", required = true, schema = @Schema(implementation = long.class, example = "1"))
})
@GetMapping(value = "/{code}/versions")
@ResponseStatus(HttpStatus.OK)
@@ -317,8 +318,8 @@ public Result queryProcessDefinitionVersions(@Parameter(hidden = true) @RequestA
*/
@Operation(summary = "switchVersion", description = "SWITCH_PROCESS_DEFINITION_VERSION_NOTES")
@Parameters({
- @Parameter(name = "code", description = "PROCESS_DEFINITION_CODE", required = true, schema =@Schema( implementation = long.class, example = "1")),
- @Parameter(name = "version", description = "VERSION", required = true, schema =@Schema( implementation = int.class, example = "100"))
+ @Parameter(name = "code", description = "PROCESS_DEFINITION_CODE", required = true, schema = @Schema(implementation = long.class, example = "1")),
+ @Parameter(name = "version", description = "VERSION", required = true, schema = @Schema(implementation = int.class, example = "100"))
})
@GetMapping(value = "/{code}/versions/{version}")
@ResponseStatus(HttpStatus.OK)
@@ -344,8 +345,8 @@ public Result switchProcessDefinitionVersion(@Parameter(hidden = true) @RequestA
*/
@Operation(summary = "deleteVersion", description = "DELETE_PROCESS_DEFINITION_VERSION_NOTES")
@Parameters({
- @Parameter(name = "code", description = "PROCESS_DEFINITION_CODE", required = true, schema =@Schema( implementation = long.class, example = "1")),
- @Parameter(name = "version", description = "VERSION", required = true, schema =@Schema( implementation = int.class, example = "100"))
+ @Parameter(name = "code", description = "PROCESS_DEFINITION_CODE", required = true, schema = @Schema(implementation = long.class, example = "1")),
+ @Parameter(name = "version", description = "VERSION", required = true, schema = @Schema(implementation = int.class, example = "100"))
})
@DeleteMapping(value = "/{code}/versions/{version}")
@ResponseStatus(HttpStatus.OK)
@@ -371,9 +372,9 @@ public Result deleteProcessDefinitionVersion(@Parameter(hidden = true) @RequestA
*/
@Operation(summary = "release", description = "RELEASE_PROCESS_DEFINITION_NOTES")
@Parameters({
- @Parameter(name = "name", description = "PROCESS_DEFINITION_NAME", required = true, schema =@Schema( implementation = String.class)),
- @Parameter(name = "code", description = "PROCESS_DEFINITION_CODE", required = true, schema =@Schema( implementation = long.class, example = "123456789")),
- @Parameter(name = "releaseState", description = "PROCESS_DEFINITION_RELEASE", required = true, schema =@Schema( implementation = ReleaseState.class)),
+ @Parameter(name = "name", description = "PROCESS_DEFINITION_NAME", required = true, schema = @Schema(implementation = String.class)),
+ @Parameter(name = "code", description = "PROCESS_DEFINITION_CODE", required = true, schema = @Schema(implementation = long.class, example = "123456789")),
+ @Parameter(name = "releaseState", description = "PROCESS_DEFINITION_RELEASE", required = true, schema = @Schema(implementation = ReleaseState.class)),
})
@PostMapping(value = "/{code}/release")
@ResponseStatus(HttpStatus.OK)
@@ -398,7 +399,7 @@ public Result releaseProcessDefinition(@Parameter(hidden = true) @RequestAttribu
*/
@Operation(summary = "queryProcessDefinitionByCode", description = "QUERY_PROCESS_DEFINITION_BY_CODE_NOTES")
@Parameters({
- @Parameter(name = "code", description = "PROCESS_DEFINITION_CODE", required = true, schema =@Schema( implementation = long.class, example = "123456789"))
+ @Parameter(name = "code", description = "PROCESS_DEFINITION_CODE", required = true, schema = @Schema(implementation = long.class, example = "123456789"))
})
@GetMapping(value = "/{code}")
@ResponseStatus(HttpStatus.OK)
@@ -422,7 +423,7 @@ public Result queryProcessDefinitionByCode(@Parameter(hidden = true) @RequestAtt
*/
@Operation(summary = "queryProcessDefinitionByName", description = "QUERY_PROCESS_DEFINITION_BY_NAME_NOTES")
@Parameters({
- @Parameter(name = "name", description = "PROCESS_DEFINITION_NAME", required = true, schema =@Schema( implementation = String.class))
+ @Parameter(name = "name", description = "PROCESS_DEFINITION_NAME", required = true, schema = @Schema(implementation = String.class))
})
@GetMapping(value = "/query-by-name")
@ResponseStatus(HttpStatus.OK)
@@ -486,11 +487,11 @@ public Result queryProcessDefinitionSimpleList(@Parameter(hidden = true) @Reques
*/
@Operation(summary = "queryListPaging", description = "QUERY_PROCESS_DEFINITION_LIST_PAGING_NOTES")
@Parameters({
- @Parameter(name = "searchVal", description = "SEARCH_VAL", required = false, schema =@Schema( implementation = String.class)),
- @Parameter(name = "userId", description = "USER_ID", required = false, schema =@Schema( implementation = int.class, example = "100")),
- @Parameter(name = "pageNo", description = "PAGE_NO", required = true, schema =@Schema( implementation = int.class, example = "1")),
- @Parameter(name = "pageSize", description = "PAGE_SIZE", required = true, schema =@Schema( implementation = int.class, example = "10")),
- @Parameter(name = "otherParamsJson", description = "OTHER_PARAMS_JSON", required = false, schema =@Schema( implementation = String.class))
+ @Parameter(name = "searchVal", description = "SEARCH_VAL", required = false, schema = @Schema(implementation = String.class)),
+ @Parameter(name = "userId", description = "USER_ID", required = false, schema = @Schema(implementation = int.class, example = "100")),
+ @Parameter(name = "pageNo", description = "PAGE_NO", required = true, schema = @Schema(implementation = int.class, example = "1")),
+ @Parameter(name = "pageSize", description = "PAGE_SIZE", required = true, schema = @Schema(implementation = int.class, example = "10")),
+ @Parameter(name = "otherParamsJson", description = "OTHER_PARAMS_JSON", required = false, schema = @Schema(implementation = String.class))
})
@GetMapping()
@ResponseStatus(HttpStatus.OK)
@@ -528,8 +529,8 @@ public Result> queryProcessDefinitionListPaging(
*/
@Operation(summary = "viewTree", description = "VIEW_TREE_NOTES")
@Parameters({
- @Parameter(name = "code", description = "PROCESS_DEFINITION_CODE", required = true, schema =@Schema( implementation = long.class, example = "100")),
- @Parameter(name = "limit", description = "LIMIT", required = true, schema =@Schema( implementation = int.class, example = "100"))
+ @Parameter(name = "code", description = "PROCESS_DEFINITION_CODE", required = true, schema = @Schema(implementation = long.class, example = "100")),
+ @Parameter(name = "limit", description = "LIMIT", required = true, schema = @Schema(implementation = int.class, example = "100"))
})
@GetMapping(value = "/{code}/view-tree")
@ResponseStatus(HttpStatus.OK)
@@ -553,7 +554,7 @@ public Result viewTree(@Parameter(hidden = true) @RequestAttribute(value = Const
*/
@Operation(summary = "getTasksByDefinitionCode", description = "GET_TASK_LIST_BY_DEFINITION_CODE_NOTES")
@Parameters({
- @Parameter(name = "code", description = "PROCESS_DEFINITION_CODE", required = true, schema =@Schema( implementation = long.class, example = "100"))
+ @Parameter(name = "code", description = "PROCESS_DEFINITION_CODE", required = true, schema = @Schema(implementation = long.class, example = "100"))
})
@GetMapping(value = "/{code}/tasks")
@ResponseStatus(HttpStatus.OK)
@@ -576,7 +577,7 @@ public Result getNodeListByDefinitionCode(@Parameter(hidden = true) @RequestAttr
*/
@Operation(summary = "getTaskListByDefinitionCodes", description = "GET_TASK_LIST_BY_DEFINITION_CODE_NOTES")
@Parameters({
- @Parameter(name = "codes", description = "PROCESS_DEFINITION_CODES", required = true, schema =@Schema( implementation = String.class, example = "100,200,300"))
+ @Parameter(name = "codes", description = "PROCESS_DEFINITION_CODES", required = true, schema = @Schema(implementation = String.class, example = "100,200,300"))
})
@GetMapping(value = "/batch-query-tasks")
@ResponseStatus(HttpStatus.OK)
@@ -598,7 +599,7 @@ public Result getNodeListMapByDefinitionCodes(@Parameter(hidden = true) @Request
*/
@Operation(summary = "getProcessListByProjectCode", description = "GET_PROCESS_LIST_BY_PROCESS_CODE_NOTES")
@Parameters({
- @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true, schema =@Schema( implementation = long.class, example = "100"))
+ @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true, schema = @Schema(implementation = long.class, example = "100"))
})
@GetMapping(value = "/query-process-definition-list")
@ResponseStatus(HttpStatus.OK)
@@ -618,8 +619,8 @@ public Result getProcessListByProjectCodes(@Parameter(hidden = true) @RequestAtt
*/
@Operation(summary = "getTaskListByProcessDefinitionCode", description = "GET_TASK_LIST_BY_PROCESS_CODE_NOTES")
@Parameters({
- @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true, schema =@Schema( implementation = long.class, example = "100")),
- @Parameter(name = "processDefinitionCode", description = "PROCESS_DEFINITION_CODE", required = true, schema =@Schema( implementation = long.class, example = "100")),
+ @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true, schema = @Schema(implementation = long.class, example = "100")),
+ @Parameter(name = "processDefinitionCode", description = "PROCESS_DEFINITION_CODE", required = true, schema = @Schema(implementation = long.class, example = "100")),
})
@GetMapping(value = "/query-task-definition-list")
@ResponseStatus(HttpStatus.OK)
@@ -642,7 +643,7 @@ public Result getTaskListByProcessDefinitionCode(@Parameter(hidden = true) @Requ
*/
@Operation(summary = "deleteByCode", description = "DELETE_PROCESS_DEFINITION_BY_ID_NOTES")
@Parameters({
- @Parameter(name = "code", description = "PROCESS_DEFINITION_CODE", schema =@Schema( implementation = int.class, example = "100"))
+ @Parameter(name = "code", description = "PROCESS_DEFINITION_CODE", schema = @Schema(implementation = int.class, example = "100"))
})
@DeleteMapping(value = "/{code}")
@ResponseStatus(HttpStatus.OK)
@@ -665,7 +666,7 @@ public Result deleteProcessDefinitionByCode(@Parameter(hidden = true) @RequestAt
*/
@Operation(summary = "batchDeleteByCodes", description = "BATCH_DELETE_PROCESS_DEFINITION_BY_IDS_NOTES")
@Parameters({
- @Parameter(name = "codes", description = "PROCESS_DEFINITION_CODE", required = true, schema =@Schema( implementation = String.class))
+ @Parameter(name = "codes", description = "PROCESS_DEFINITION_CODE", required = true, schema = @Schema(implementation = String.class))
})
@PostMapping(value = "/batch-delete")
@ResponseStatus(HttpStatus.OK)
@@ -690,7 +691,7 @@ public Result batchDeleteProcessDefinitionByCodes(@Parameter(hidden = true) @Req
*/
@Operation(summary = "batchExportByCodes", description = "BATCH_EXPORT_PROCESS_DEFINITION_BY_CODES_NOTES")
@Parameters({
- @Parameter(name = "codes", description = "PROCESS_DEFINITION_CODE", required = true, schema =@Schema( implementation = String.class))
+ @Parameter(name = "codes", description = "PROCESS_DEFINITION_CODE", required = true, schema = @Schema(implementation = String.class))
})
@PostMapping(value = "/batch-export")
@ResponseBody
@@ -735,7 +736,7 @@ public Result queryAllProcessDefinitionByProjectCode(@Parameter(hidden = true) @
*/
@Operation(summary = "importProcessDefinition", description = "IMPORT_PROCESS_DEFINITION_NOTES")
@Parameters({
- @Parameter(name = "file", description = "RESOURCE_FILE", required = true, schema =@Schema( implementation = MultipartFile.class))
+ @Parameter(name = "file", description = "RESOURCE_FILE", required = true, schema = @Schema(implementation = MultipartFile.class))
})
@PostMapping(value = "/import")
@ApiException(IMPORT_PROCESS_DEFINE_ERROR)
@@ -767,9 +768,9 @@ public Result importProcessDefinition(@Parameter(hidden = true) @RequestAttribut
*/
@Operation(summary = "createEmptyProcessDefinition", description = "CREATE_EMPTY_PROCESS_NOTES")
@Parameters({
- @Parameter(name = "name", description = "PROCESS_DEFINITION_NAME", required = true, schema =@Schema( implementation = String.class)),
- @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true, schema =@Schema( implementation = long.class, example = "123456789")),
- @Parameter(name = "description", description = "PROCESS_DEFINITION_DESC", required = false, schema =@Schema( implementation = String.class))
+ @Parameter(name = "name", description = "PROCESS_DEFINITION_NAME", required = true, schema = @Schema(implementation = String.class)),
+ @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true, schema = @Schema(implementation = long.class, example = "123456789")),
+ @Parameter(name = "description", description = "PROCESS_DEFINITION_DESC", required = false, schema = @Schema(implementation = String.class))
})
@PostMapping(value = "/empty")
@ResponseStatus(HttpStatus.OK)
@@ -808,11 +809,11 @@ public Result createEmptyProcessDefinition(@Parameter(hidden = true) @RequestAtt
*/
@Operation(summary = "updateBasicInfo", description = "UPDATE_PROCESS_DEFINITION_BASIC_INFO_NOTES")
@Parameters({
- @Parameter(name = "name", description = "PROCESS_DEFINITION_NAME", required = true, schema =@Schema( implementation = String.class)),
- @Parameter(name = "code", description = "PROCESS_DEFINITION_CODE", required = true, schema =@Schema( implementation = long.class, example = "123456789")),
- @Parameter(name = "description", description = "PROCESS_DEFINITION_DESC", required = false, schema =@Schema( implementation = String.class)),
- @Parameter(name = "releaseState", description = "RELEASE_PROCESS_DEFINITION_NOTES", required = false, schema =@Schema( implementation = ReleaseState.class)),
- @Parameter(name = "otherParamsJson", description = "OTHER_PARAMS_JSON", required = false, schema =@Schema( implementation = String.class))
+ @Parameter(name = "name", description = "PROCESS_DEFINITION_NAME", required = true, schema = @Schema(implementation = String.class)),
+ @Parameter(name = "code", description = "PROCESS_DEFINITION_CODE", required = true, schema = @Schema(implementation = long.class, example = "123456789")),
+ @Parameter(name = "description", description = "PROCESS_DEFINITION_DESC", required = false, schema = @Schema(implementation = String.class)),
+ @Parameter(name = "releaseState", description = "RELEASE_PROCESS_DEFINITION_NOTES", required = false, schema = @Schema(implementation = ReleaseState.class)),
+ @Parameter(name = "otherParamsJson", description = "OTHER_PARAMS_JSON", required = false, schema = @Schema(implementation = String.class))
})
@PutMapping(value = "/{code}/basic-info")
@ResponseStatus(HttpStatus.OK)
@@ -856,9 +857,9 @@ public Result updateProcessDefinitionBasicInfo(@Parameter(hidden = true) @Reques
*/
@Operation(summary = "releaseWorkflowAndSchedule", description = "RELEASE_WORKFLOW_SCHEDULE_NOTES")
@Parameters({
- @Parameter(name = "projectCode", description = "PROCESS_DEFINITION_NAME", required = true, schema =@Schema( implementation = long.class)),
- @Parameter(name = "code", description = "PROCESS_DEFINITION_CODE", required = true, schema =@Schema( implementation = long.class, example = "123456789")),
- @Parameter(name = "releaseState", description = "RELEASE_PROCESS_DEFINITION_NOTES", required = true, schema =@Schema( implementation = ReleaseState.class))
+ @Parameter(name = "projectCode", description = "PROCESS_DEFINITION_NAME", required = true, schema = @Schema(implementation = long.class)),
+ @Parameter(name = "code", description = "PROCESS_DEFINITION_CODE", required = true, schema = @Schema(implementation = long.class, example = "123456789")),
+ @Parameter(name = "releaseState", description = "RELEASE_PROCESS_DEFINITION_NOTES", required = true, schema = @Schema(implementation = ReleaseState.class))
})
@PostMapping(value = "/{code}/release-workflow")
@ResponseStatus(HttpStatus.OK)
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 af9b0a82fe17..11385ba9853b 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
@@ -17,12 +17,8 @@
package org.apache.dolphinscheduler.api.controller;
-import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.Parameter;
-import io.swagger.v3.oas.annotations.Parameters;
-import io.swagger.v3.oas.annotations.media.Schema;
-import io.swagger.v3.oas.annotations.tags.Tag;
-import org.apache.commons.lang3.StringUtils;
+import static org.apache.dolphinscheduler.api.enums.Status.*;
+
import org.apache.dolphinscheduler.api.aspect.AccessLogAnnotation;
import org.apache.dolphinscheduler.api.enums.Status;
import org.apache.dolphinscheduler.api.exceptions.ApiException;
@@ -30,14 +26,11 @@
import org.apache.dolphinscheduler.api.utils.Result;
import org.apache.dolphinscheduler.common.Constants;
import org.apache.dolphinscheduler.common.enums.WorkflowExecutionStatus;
-import org.apache.dolphinscheduler.plugin.task.api.utils.ParameterUtils;
import org.apache.dolphinscheduler.dao.entity.ProcessInstance;
import org.apache.dolphinscheduler.dao.entity.User;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.http.HttpStatus;
-import org.springframework.web.bind.annotation.*;
+import org.apache.dolphinscheduler.plugin.task.api.utils.ParameterUtils;
+
+import org.apache.commons.lang3.StringUtils;
import java.io.IOException;
import java.text.MessageFormat;
@@ -46,7 +39,27 @@
import java.util.List;
import java.util.Map;
-import static org.apache.dolphinscheduler.api.enums.Status.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpStatus;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.RequestAttribute;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+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 io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Parameters;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.tags.Tag;
/**
* process instance controller
@@ -79,15 +92,15 @@ public class ProcessInstanceController extends BaseController {
*/
@Operation(summary = "queryProcessInstanceListPaging", description = "QUERY_PROCESS_INSTANCE_LIST_NOTES")
@Parameters({
- @Parameter(name = "processDefineCode", description = "PROCESS_DEFINITION_CODE", schema =@Schema( implementation = long.class, example = "100")),
- @Parameter(name = "searchVal", description = "SEARCH_VAL", schema =@Schema( implementation = String.class)),
- @Parameter(name = "executorName", description = "EXECUTOR_NAME", schema =@Schema( implementation = String.class)),
- @Parameter(name = "stateType", description = "EXECUTION_STATUS", schema =@Schema( implementation = WorkflowExecutionStatus.class)),
- @Parameter(name = "host", description = "HOST", schema =@Schema( implementation = String.class)),
- @Parameter(name = "startDate", description = "START_DATE", schema =@Schema( implementation = String.class)),
- @Parameter(name = "endDate", description = "END_DATE", schema =@Schema( implementation = String.class)),
- @Parameter(name = "pageNo", description = "PAGE_NO", required = true, schema =@Schema( implementation = int.class, example = "1")),
- @Parameter(name = "pageSize", description = "PAGE_SIZE", required = true, schema =@Schema( implementation = int.class, example = "10"))
+ @Parameter(name = "processDefineCode", description = "PROCESS_DEFINITION_CODE", schema = @Schema(implementation = long.class, example = "100")),
+ @Parameter(name = "searchVal", description = "SEARCH_VAL", schema = @Schema(implementation = String.class)),
+ @Parameter(name = "executorName", description = "EXECUTOR_NAME", schema = @Schema(implementation = String.class)),
+ @Parameter(name = "stateType", description = "EXECUTION_STATUS", schema = @Schema(implementation = WorkflowExecutionStatus.class)),
+ @Parameter(name = "host", description = "HOST", schema = @Schema(implementation = String.class)),
+ @Parameter(name = "startDate", description = "START_DATE", schema = @Schema(implementation = String.class)),
+ @Parameter(name = "endDate", description = "END_DATE", schema = @Schema(implementation = String.class)),
+ @Parameter(name = "pageNo", description = "PAGE_NO", required = true, schema = @Schema(implementation = int.class, example = "1")),
+ @Parameter(name = "pageSize", description = "PAGE_SIZE", required = true, schema = @Schema(implementation = int.class, example = "10"))
})
@GetMapping()
@ResponseStatus(HttpStatus.OK)
@@ -127,7 +140,7 @@ public Result queryProcessInstanceList(@Parameter(hidden = true) @RequestAttribu
*/
@Operation(summary = "queryTaskListByProcessId", description = "QUERY_TASK_LIST_BY_PROCESS_INSTANCE_ID_NOTES")
@Parameters({
- @Parameter(name = "id", description = "PROCESS_INSTANCE_ID", required = true, schema =@Schema( implementation = int.class, example = "100"))
+ @Parameter(name = "id", description = "PROCESS_INSTANCE_ID", required = true, schema = @Schema(implementation = int.class, example = "100"))
})
@GetMapping(value = "/{id}/tasks")
@ResponseStatus(HttpStatus.OK)
@@ -156,15 +169,15 @@ public Result queryTaskListByProcessId(@Parameter(hidden = true) @RequestAttribu
*/
@Operation(summary = "updateProcessInstance", description = "UPDATE_PROCESS_INSTANCE_NOTES")
@Parameters({
- @Parameter(name = "taskRelationJson", description = "TASK_RELATION_JSON", schema =@Schema( implementation = String.class)),
- @Parameter(name = "taskDefinitionJson", description = "TASK_DEFINITION_JSON", schema =@Schema( implementation = String.class)),
- @Parameter(name = "id", description = "PROCESS_INSTANCE_ID", required = true, schema =@Schema( implementation = int.class, example = "1")),
- @Parameter(name = "scheduleTime", description = "SCHEDULE_TIME", schema =@Schema( implementation = String.class)),
- @Parameter(name = "syncDefine", description = "SYNC_DEFINE", required = true, schema =@Schema( implementation = boolean.class, example = "false")),
- @Parameter(name = "globalParams", description = "PROCESS_GLOBAL_PARAMS", schema =@Schema( implementation = String.class, example = "[]")),
- @Parameter(name = "locations", description = "PROCESS_INSTANCE_LOCATIONS", schema =@Schema( implementation = String.class)),
- @Parameter(name = "timeout", description = "PROCESS_TIMEOUT", schema =@Schema( implementation = int.class, example = "0")),
- @Parameter(name = "tenantCode", description = "TENANT_CODE", schema =@Schema( implementation = String.class, example = "default"))
+ @Parameter(name = "taskRelationJson", description = "TASK_RELATION_JSON", schema = @Schema(implementation = String.class)),
+ @Parameter(name = "taskDefinitionJson", description = "TASK_DEFINITION_JSON", schema = @Schema(implementation = String.class)),
+ @Parameter(name = "id", description = "PROCESS_INSTANCE_ID", required = true, schema = @Schema(implementation = int.class, example = "1")),
+ @Parameter(name = "scheduleTime", description = "SCHEDULE_TIME", schema = @Schema(implementation = String.class)),
+ @Parameter(name = "syncDefine", description = "SYNC_DEFINE", required = true, schema = @Schema(implementation = boolean.class, example = "false")),
+ @Parameter(name = "globalParams", description = "PROCESS_GLOBAL_PARAMS", schema = @Schema(implementation = String.class, example = "[]")),
+ @Parameter(name = "locations", description = "PROCESS_INSTANCE_LOCATIONS", schema = @Schema(implementation = String.class)),
+ @Parameter(name = "timeout", description = "PROCESS_TIMEOUT", schema = @Schema(implementation = int.class, example = "0")),
+ @Parameter(name = "tenantCode", description = "TENANT_CODE", schema = @Schema(implementation = String.class, example = "default"))
})
@PutMapping(value = "/{id}")
@ResponseStatus(HttpStatus.OK)
@@ -197,7 +210,7 @@ public Result updateProcessInstance(@Parameter(hidden = true) @RequestAttribute(
*/
@Operation(summary = "queryProcessInstanceById", description = "QUERY_PROCESS_INSTANCE_BY_ID_NOTES")
@Parameters({
- @Parameter(name = "id", description = "PROCESS_INSTANCE_ID", required = true, schema =@Schema( implementation = int.class, example = "100"))
+ @Parameter(name = "id", description = "PROCESS_INSTANCE_ID", required = true, schema = @Schema(implementation = int.class, example = "100"))
})
@GetMapping(value = "/{id}")
@ResponseStatus(HttpStatus.OK)
@@ -222,9 +235,9 @@ public Result queryProcessInstanceById(@Parameter(hidden = true) @RequestAttribu
*/
@Operation(summary = "queryTopNLongestRunningProcessInstance", description = "QUERY_TOPN_LONGEST_RUNNING_PROCESS_INSTANCE_NOTES")
@Parameters({
- @Parameter(name = "size", description = "PROCESS_INSTANCE_SIZE", required = true, schema =@Schema( implementation = int.class, example = "10")),
- @Parameter(name = "startTime", description = "PROCESS_INSTANCE_START_TIME", required = true, schema =@Schema( implementation = String.class)),
- @Parameter(name = "endTime", description = "PROCESS_INSTANCE_END_TIME", required = true, schema =@Schema( implementation = String.class)),
+ @Parameter(name = "size", description = "PROCESS_INSTANCE_SIZE", required = true, schema = @Schema(implementation = int.class, example = "10")),
+ @Parameter(name = "startTime", description = "PROCESS_INSTANCE_START_TIME", required = true, schema = @Schema(implementation = String.class)),
+ @Parameter(name = "endTime", description = "PROCESS_INSTANCE_END_TIME", required = true, schema = @Schema(implementation = String.class)),
})
@GetMapping(value = "/top-n")
@ResponseStatus(HttpStatus.OK)
@@ -251,7 +264,7 @@ public Result queryTopNLongestRunningProcessInstance(@Parameter
*/
@Operation(summary = "deleteProcessInstanceById", description = "DELETE_PROCESS_INSTANCE_BY_ID_NOTES")
@Parameters({
- @Parameter(name = "id", description = "PROCESS_INSTANCE_ID", required = true, schema =@Schema( implementation = int.class, example = "100"))
+ @Parameter(name = "id", description = "PROCESS_INSTANCE_ID", required = true, schema = @Schema(implementation = int.class, example = "100"))
})
@DeleteMapping(value = "/{id}")
@ResponseStatus(HttpStatus.OK)
@@ -274,7 +287,7 @@ public Result deleteProcessInstanceById(@Parameter(hidden = tru
*/
@Operation(summary = "querySubProcessInstanceByTaskCode", description = "QUERY_SUBPROCESS_INSTANCE_BY_TASK_CODE_NOTES")
@Parameters({
- @Parameter(name = "taskCode", description = "TASK_CODE", required = true, schema =@Schema( implementation = long.class, example = "100"))
+ @Parameter(name = "taskCode", description = "TASK_CODE", required = true, schema = @Schema(implementation = long.class, example = "100"))
})
@GetMapping(value = "/query-sub-by-parent")
@ResponseStatus(HttpStatus.OK)
@@ -298,7 +311,7 @@ public Result querySubProcessInstanceByTaskId(@Parameter(hidden = true) @Request
*/
@Operation(summary = "queryParentInstanceBySubId", description = "QUERY_PARENT_PROCESS_INSTANCE_BY_SUB_PROCESS_INSTANCE_ID_NOTES")
@Parameters({
- @Parameter(name = "subId", description = "SUB_PROCESS_INSTANCE_ID", required = true, schema =@Schema( implementation = int.class, example = "100"))
+ @Parameter(name = "subId", description = "SUB_PROCESS_INSTANCE_ID", required = true, schema = @Schema(implementation = int.class, example = "100"))
})
@GetMapping(value = "/query-parent-by-sub")
@ResponseStatus(HttpStatus.OK)
@@ -320,7 +333,7 @@ public Result queryParentInstanceBySubId(@Parameter(hidden = true) @RequestAttri
*/
@Operation(summary = "viewVariables", description = "QUERY_PROCESS_INSTANCE_GLOBAL_VARIABLES_AND_LOCAL_VARIABLES_NOTES")
@Parameters({
- @Parameter(name = "id", description = "PROCESS_INSTANCE_ID", required = true, schema =@Schema( implementation = int.class, example = "100"))
+ @Parameter(name = "id", description = "PROCESS_INSTANCE_ID", required = true, schema = @Schema(implementation = int.class, example = "100"))
})
@GetMapping(value = "/{id}/view-variables")
@ResponseStatus(HttpStatus.OK)
@@ -343,7 +356,7 @@ public Result viewVariables(@Parameter(hidden = true) @RequestAttribute(value =
*/
@Operation(summary = "vieGanttTree", description = "VIEW_GANTT_NOTES")
@Parameters({
- @Parameter(name = "id", description = "PROCESS_INSTANCE_ID", required = true, schema =@Schema( implementation = int.class, example = "100"))
+ @Parameter(name = "id", description = "PROCESS_INSTANCE_ID", required = true, schema = @Schema(implementation = int.class, example = "100"))
})
@GetMapping(value = "/{id}/view-gantt")
@ResponseStatus(HttpStatus.OK)
@@ -367,8 +380,8 @@ public Result viewTree(@Parameter(hidden = true) @RequestAttribute(value = Const
*/
@Operation(summary = "batchDeleteProcessInstanceByIds", description = "BATCH_DELETE_PROCESS_INSTANCE_BY_IDS_NOTES")
@Parameters({
- @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true, schema =@Schema( implementation = int.class)),
- @Parameter(name = "processInstanceIds", description = "PROCESS_INSTANCE_IDS", required = true, schema =@Schema( implementation = String.class)),
+ @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true, schema = @Schema(implementation = int.class)),
+ @Parameter(name = "processInstanceIds", description = "PROCESS_INSTANCE_IDS", required = true, schema = @Schema(implementation = 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 31e8cc393f89..019880569aaa 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
@@ -23,11 +23,6 @@
import static org.apache.dolphinscheduler.api.enums.Status.DELETE_TASK_PROCESS_RELATION_ERROR;
import static org.apache.dolphinscheduler.api.enums.Status.QUERY_TASK_PROCESS_RELATION_ERROR;
-import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.Parameter;
-import io.swagger.v3.oas.annotations.Parameters;
-import io.swagger.v3.oas.annotations.media.Schema;
-import io.swagger.v3.oas.annotations.tags.Tag;
import org.apache.dolphinscheduler.api.aspect.AccessLogAnnotation;
import org.apache.dolphinscheduler.api.exceptions.ApiException;
import org.apache.dolphinscheduler.api.service.ProcessTaskRelationService;
@@ -50,6 +45,12 @@
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Parameters;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.tags.Tag;
+
/**
* process task relation controller
*/
@@ -73,10 +74,10 @@ public class ProcessTaskRelationController extends BaseController {
*/
@Operation(summary = "save", description = "CREATE_PROCESS_TASK_RELATION_NOTES")
@Parameters({
- @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true, schema =@Schema( implementation = long.class)),
- @Parameter(name = "processDefinitionCode", description = "PROCESS_DEFINITION_CODE", required = true, schema =@Schema( implementation = long.class)),
- @Parameter(name = "preTaskCode", description = "PRE_TASK_CODE", required = true, schema =@Schema( implementation = long.class)),
- @Parameter(name = "postTaskCode", description = "POST_TASK_CODE", required = true, schema =@Schema( implementation = long.class))
+ @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true, schema = @Schema(implementation = long.class)),
+ @Parameter(name = "processDefinitionCode", description = "PROCESS_DEFINITION_CODE", required = true, schema = @Schema(implementation = long.class)),
+ @Parameter(name = "preTaskCode", description = "PRE_TASK_CODE", required = true, schema = @Schema(implementation = long.class)),
+ @Parameter(name = "postTaskCode", description = "POST_TASK_CODE", required = true, schema = @Schema(implementation = long.class))
})
@PostMapping()
@ResponseStatus(HttpStatus.CREATED)
@@ -110,9 +111,9 @@ public Result createProcessTaskRelation(@Parameter(hidden = true) @RequestAttrib
*/
@Operation(summary = "deleteRelation", description = "DELETE_PROCESS_TASK_RELATION_NOTES")
@Parameters({
- @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true, schema =@Schema( implementation = long.class)),
- @Parameter(name = "processDefinitionCode", description = "PROCESS_DEFINITION_CODE", required = true, schema =@Schema( implementation = long.class)),
- @Parameter(name = "taskCode", description = "TASK_CODE", required = true, schema =@Schema( implementation = long.class))
+ @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true, schema = @Schema(implementation = long.class)),
+ @Parameter(name = "processDefinitionCode", description = "PROCESS_DEFINITION_CODE", required = true, schema = @Schema(implementation = long.class)),
+ @Parameter(name = "taskCode", description = "TASK_CODE", required = true, schema = @Schema(implementation = long.class))
})
@DeleteMapping(value = "/{taskCode}")
@ResponseStatus(HttpStatus.OK)
@@ -137,9 +138,9 @@ public Result deleteTaskProcessRelation(@Parameter(hidden = true) @RequestAttrib
*/
@Operation(summary = "deleteUpstreamRelation", description = "DELETE_UPSTREAM_RELATION_NOTES")
@Parameters({
- @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true, schema =@Schema( implementation = long.class)),
- @Parameter(name = "preTaskCodes", description = "PRE_TASK_CODES", required = true, schema =@Schema( implementation = String.class, example = "1,2")),
- @Parameter(name = "taskCode", description = "TASK_CODE", required = true, schema =@Schema( implementation = long.class))
+ @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true, schema = @Schema(implementation = long.class)),
+ @Parameter(name = "preTaskCodes", description = "PRE_TASK_CODES", required = true, schema = @Schema(implementation = String.class, example = "1,2")),
+ @Parameter(name = "taskCode", description = "TASK_CODE", required = true, schema = @Schema(implementation = long.class))
})
@DeleteMapping(value = "/{taskCode}/upstream")
@ResponseStatus(HttpStatus.OK)
@@ -164,9 +165,9 @@ public Result deleteUpstreamRelation(@Parameter(hidden = true) @RequestAttribute
*/
@Operation(summary = "deleteDownstreamRelation", description = "DELETE_DOWNSTREAM_RELATION_NOTES")
@Parameters({
- @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true, schema =@Schema( implementation = long.class)),
- @Parameter(name = "postTaskCodes", description = "POST_TASK_CODES", required = true, schema =@Schema( implementation = String.class, example = "1,2")),
- @Parameter(name = "taskCode", description = "TASK_CODE", required = true, schema =@Schema( implementation = long.class))
+ @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true, schema = @Schema(implementation = long.class)),
+ @Parameter(name = "postTaskCodes", description = "POST_TASK_CODES", required = true, schema = @Schema(implementation = String.class, example = "1,2")),
+ @Parameter(name = "taskCode", description = "TASK_CODE", required = true, schema = @Schema(implementation = long.class))
})
@DeleteMapping(value = "/{taskCode}/downstream")
@ResponseStatus(HttpStatus.OK)
@@ -190,8 +191,8 @@ public Result deleteDownstreamRelation(@Parameter(hidden = true) @RequestAttribu
*/
@Operation(summary = "queryUpstreamRelation", description = "QUERY_UPSTREAM_RELATION_NOTES")
@Parameters({
- @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true, schema =@Schema( implementation = long.class)),
- @Parameter(name = "taskCode", description = "TASK_CODE", required = true, schema =@Schema( implementation = long.class))
+ @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true, schema = @Schema(implementation = long.class)),
+ @Parameter(name = "taskCode", description = "TASK_CODE", required = true, schema = @Schema(implementation = long.class))
})
@GetMapping(value = "/{taskCode}/upstream")
@ResponseStatus(HttpStatus.OK)
@@ -213,8 +214,8 @@ public Result queryUpstreamRelation(@Parameter(hidden = true) @RequestAttribute(
*/
@Operation(summary = "queryDownstreamRelation", description = "QUERY_DOWNSTREAM_RELATION_NOTES")
@Parameters({
- @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true, schema =@Schema( implementation = long.class)),
- @Parameter(name = "taskCode", description = "TASK_CODE", required = true, schema =@Schema( implementation = long.class))
+ @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true, schema = @Schema(implementation = long.class)),
+ @Parameter(name = "taskCode", description = "TASK_CODE", required = true, schema = @Schema(implementation = long.class))
})
@GetMapping(value = "/{taskCode}/downstream")
@ResponseStatus(HttpStatus.OK)
@@ -238,10 +239,10 @@ public Result queryDownstreamRelation(@Parameter(hidden = true) @RequestAttribut
*/
@Operation(summary = "deleteEdge", description = "DELETE_EDGE_NOTES")
@Parameters({
- @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true, schema =@Schema( implementation = long.class)),
- @Parameter(name = "processDefinitionCode", description = "PROCESS_DEFINITION_CODE", required = true, schema =@Schema( implementation = long.class)),
- @Parameter(name = "preTaskCode", description = "PRE_TASK_CODE", required = true, schema =@Schema( implementation = long.class)),
- @Parameter(name = "postTaskCode", description = "POST_TASK_CODE", required = true, schema =@Schema( implementation = long.class))
+ @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true, schema = @Schema(implementation = long.class)),
+ @Parameter(name = "processDefinitionCode", description = "PROCESS_DEFINITION_CODE", required = true, schema = @Schema(implementation = long.class)),
+ @Parameter(name = "preTaskCode", description = "PRE_TASK_CODE", required = true, schema = @Schema(implementation = long.class)),
+ @Parameter(name = "postTaskCode", description = "POST_TASK_CODE", required = true, schema = @Schema(implementation = long.class))
})
@DeleteMapping(value = "/{processDefinitionCode}/{preTaskCode}/{postTaskCode}")
@ResponseStatus(HttpStatus.OK)
diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ProcessTaskRelationV2Controller.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ProcessTaskRelationV2Controller.java
index 512cdab05f7f..d20cec00ec5e 100644
--- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ProcessTaskRelationV2Controller.java
+++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ProcessTaskRelationV2Controller.java
@@ -21,11 +21,6 @@
import static org.apache.dolphinscheduler.api.enums.Status.DELETE_TASK_PROCESS_RELATION_ERROR;
import static org.apache.dolphinscheduler.api.enums.Status.UPDATE_UPSTREAM_TASK_PROCESS_RELATION_ERROR;
-import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.Parameter;
-import io.swagger.v3.oas.annotations.Parameters;
-import io.swagger.v3.oas.annotations.media.Schema;
-import io.swagger.v3.oas.annotations.tags.Tag;
import org.apache.dolphinscheduler.api.aspect.AccessLogAnnotation;
import org.apache.dolphinscheduler.api.dto.taskRelation.TaskRelationCreateRequest;
import org.apache.dolphinscheduler.api.dto.taskRelation.TaskRelationDeleteRequest;
@@ -51,6 +46,12 @@
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Parameters;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.tags.Tag;
+
/**
* process task relation controller
*/
@@ -90,7 +91,7 @@ public Result createTaskRelation(@Parameter(hidden = true)
*/
@Operation(summary = "delete", description = "DELETE_PROCESS_TASK_RELATION_NOTES")
@Parameters({
- @Parameter(name = "code-pair", description = "TASK_DEFINITION_CODE", schema =@Schema( implementation = long.class, example = "123456,78901", required = true))
+ @Parameter(name = "code-pair", description = "TASK_DEFINITION_CODE", schema = @Schema(implementation = long.class, example = "123456,78901", required = true))
})
@DeleteMapping(value = "/{code-pair}")
@ResponseStatus(HttpStatus.OK)
@@ -114,7 +115,7 @@ public Result deleteTaskRelation(@Parameter(hidden = true) @RequestAttribute(val
*/
@Operation(summary = "update", description = "UPDATE_PROCESS_TASK_RELATION_NOTES")
@Parameters({
- @Parameter(name = "code", description = "DOWMSTREAM_TASK_DEFINITION_CODE", schema =@Schema( implementation = long.class, example = "123456", required = true))
+ @Parameter(name = "code", description = "DOWMSTREAM_TASK_DEFINITION_CODE", schema = @Schema(implementation = long.class, example = "123456", required = true))
})
@PutMapping(value = "/{code}")
@ResponseStatus(HttpStatus.OK)
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 9acdee155857..236f3e802a34 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
@@ -27,11 +27,6 @@
import static org.apache.dolphinscheduler.api.enums.Status.QUERY_UNAUTHORIZED_PROJECT_ERROR;
import static org.apache.dolphinscheduler.api.enums.Status.UPDATE_PROJECT_ERROR;
-import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.Parameter;
-import io.swagger.v3.oas.annotations.Parameters;
-import io.swagger.v3.oas.annotations.media.Schema;
-import io.swagger.v3.oas.annotations.tags.Tag;
import org.apache.dolphinscheduler.api.aspect.AccessLogAnnotation;
import org.apache.dolphinscheduler.api.exceptions.ApiException;
import org.apache.dolphinscheduler.api.service.ProjectService;
@@ -55,6 +50,12 @@
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Parameters;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.tags.Tag;
+
/**
* project controller
*/
@@ -78,8 +79,8 @@ public class ProjectController extends BaseController {
*/
@Operation(summary = "create", description = "CREATE_PROJECT_NOTES")
@Parameters({
- @Parameter(name = "projectName", description = "PROJECT_NAME", schema =@Schema( implementation = String.class)),
- @Parameter(name = "description", description = "PROJECT_DESC", schema =@Schema( implementation = String.class))
+ @Parameter(name = "projectName", description = "PROJECT_NAME", schema = @Schema(implementation = String.class)),
+ @Parameter(name = "description", description = "PROJECT_DESC", schema = @Schema(implementation = String.class))
})
@PostMapping()
@ResponseStatus(HttpStatus.CREATED)
@@ -102,10 +103,10 @@ public Result createProject(@Parameter(hidden = true) @RequestAttribute(value =
*/
@Operation(summary = "update", description = "UPDATE_PROJECT_NOTES")
@Parameters({
- @Parameter(name = "code", description = "PROJECT_CODE", schema =@Schema( implementation = long.class, example = "123456")),
- @Parameter(name = "projectName", description = "PROJECT_NAME", schema =@Schema( implementation = String.class)),
- @Parameter(name = "description", description = "PROJECT_DESC", schema =@Schema( implementation = String.class)),
- @Parameter(name = "userName", description = "USER_NAME", schema =@Schema( implementation = String.class)),
+ @Parameter(name = "code", description = "PROJECT_CODE", schema = @Schema(implementation = long.class, example = "123456")),
+ @Parameter(name = "projectName", description = "PROJECT_NAME", schema = @Schema(implementation = String.class)),
+ @Parameter(name = "description", description = "PROJECT_DESC", schema = @Schema(implementation = String.class)),
+ @Parameter(name = "userName", description = "USER_NAME", schema = @Schema(implementation = String.class)),
})
@PutMapping(value = "/{code}")
@ResponseStatus(HttpStatus.OK)
@@ -128,7 +129,7 @@ public Result updateProject(@Parameter(hidden = true) @RequestAttribute(value =
*/
@Operation(summary = "queryProjectByCode", description = "QUERY_PROJECT_BY_ID_NOTES")
@Parameters({
- @Parameter(name = "code", description = "PROJECT_CODE", schema =@Schema( implementation = long.class, example = "123456"))
+ @Parameter(name = "code", description = "PROJECT_CODE", schema = @Schema(implementation = long.class, example = "123456"))
})
@GetMapping(value = "/{code}")
@ResponseStatus(HttpStatus.OK)
@@ -150,9 +151,9 @@ public Result queryProjectByCode(@Parameter(hidden = true) @RequestAttribute(val
*/
@Operation(summary = "queryProjectListPaging", description = "QUERY_PROJECT_LIST_PAGING_NOTES")
@Parameters({
- @Parameter(name = "searchVal", description = "SEARCH_VAL", schema =@Schema( implementation = String.class)),
- @Parameter(name = "pageSize", description = "PAGE_SIZE", required = true, schema =@Schema( implementation = int.class, example = "10")),
- @Parameter(name = "pageNo", description = "PAGE_NO", required = true, schema =@Schema( implementation = int.class, example = "1"))
+ @Parameter(name = "searchVal", description = "SEARCH_VAL", schema = @Schema(implementation = String.class)),
+ @Parameter(name = "pageSize", description = "PAGE_SIZE", required = true, schema = @Schema(implementation = int.class, example = "10")),
+ @Parameter(name = "pageNo", description = "PAGE_NO", required = true, schema = @Schema(implementation = int.class, example = "1"))
})
@GetMapping()
@ResponseStatus(HttpStatus.OK)
@@ -182,7 +183,7 @@ public Result queryProjectListPaging(@Parameter(hidden = true) @RequestAttribute
*/
@Operation(summary = "delete", description = "DELETE_PROJECT_BY_ID_NOTES")
@Parameters({
- @Parameter(name = "code", description = "PROJECT_CODE", schema =@Schema( implementation = long.class, example = "123456"))
+ @Parameter(name = "code", description = "PROJECT_CODE", schema = @Schema(implementation = long.class, example = "123456"))
})
@DeleteMapping(value = "/{code}")
@ResponseStatus(HttpStatus.OK)
@@ -202,7 +203,7 @@ public Result deleteProject(@Parameter(hidden = true) @RequestAttribute(value =
*/
@Operation(summary = "queryUnauthorizedProject", description = "QUERY_UNAUTHORIZED_PROJECT_NOTES")
@Parameters({
- @Parameter(name = "userId", description = "USER_ID", schema =@Schema( implementation = int.class, example = "100"))
+ @Parameter(name = "userId", description = "USER_ID", schema = @Schema(implementation = int.class, example = "100"))
})
@GetMapping(value = "/unauth-project")
@ResponseStatus(HttpStatus.OK)
@@ -222,7 +223,7 @@ public Result queryUnauthorizedProject(@Parameter(hidden = true) @RequestAttribu
*/
@Operation(summary = "queryAuthorizedProject", description = "QUERY_AUTHORIZED_PROJECT_NOTES")
@Parameters({
- @Parameter(name = "userId", description = "USER_ID", schema =@Schema( implementation = int.class, example = "100"))
+ @Parameter(name = "userId", description = "USER_ID", schema = @Schema(implementation = int.class, example = "100"))
})
@GetMapping(value = "/authed-project")
@ResponseStatus(HttpStatus.OK)
@@ -242,7 +243,7 @@ public Result queryAuthorizedProject(@Parameter(hidden = true) @RequestAttribute
*/
@Operation(summary = "queryAuthorizedUser", description = "QUERY_AUTHORIZED_USER_NOTES")
@Parameters({
- @Parameter(name = "projectCode", description = "PROJECT_CODE", schema =@Schema( implementation = long.class, example = "100"))
+ @Parameter(name = "projectCode", description = "PROJECT_CODE", schema = @Schema(implementation = 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 610be8208c77..6d445bdd6e0a 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
@@ -27,11 +27,6 @@
import static org.apache.dolphinscheduler.api.enums.Status.QUERY_UNAUTHORIZED_PROJECT_ERROR;
import static org.apache.dolphinscheduler.api.enums.Status.UPDATE_PROJECT_ERROR;
-import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.Parameter;
-import io.swagger.v3.oas.annotations.Parameters;
-import io.swagger.v3.oas.annotations.media.Schema;
-import io.swagger.v3.oas.annotations.tags.Tag;
import org.apache.dolphinscheduler.api.aspect.AccessLogAnnotation;
import org.apache.dolphinscheduler.api.dto.project.ProjectCreateRequest;
import org.apache.dolphinscheduler.api.dto.project.ProjectCreateResponse;
@@ -64,6 +59,12 @@
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Parameters;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.tags.Tag;
+
/**
* project controller
*/
@@ -124,7 +125,7 @@ public ProjectUpdateResponse updateProject(@Parameter(hidden = true) @RequestAtt
*/
@Operation(summary = "queryProjectByCode", description = "QUERY_PROJECT_BY_ID_NOTES")
@Parameters({
- @Parameter(name = "code", description = "PROJECT_CODE", schema =@Schema( implementation = long.class, example = "123456", required = true))
+ @Parameter(name = "code", description = "PROJECT_CODE", schema = @Schema(implementation = long.class, example = "123456", required = true))
})
@GetMapping(value = "/{code}")
@ResponseStatus(HttpStatus.OK)
@@ -145,9 +146,9 @@ public ProjectQueryResponse queryProjectByCode(@Parameter(hidden = true) @Reques
*/
@Operation(summary = "queryProjectListPaging", description = "QUERY_PROJECT_LIST_PAGING_NOTES")
@Parameters({
- @Parameter(name = "searchVal", description = "SEARCH_VAL", schema =@Schema( implementation = String.class, example = "test")),
- @Parameter(name = "pageSize", description = "PAGE_SIZE", required = true, schema =@Schema( implementation = int.class, example = "10")),
- @Parameter(name = "pageNo", description = "PAGE_NO", required = true, schema =@Schema( implementation = int.class, example = "1"))
+ @Parameter(name = "searchVal", description = "SEARCH_VAL", schema = @Schema(implementation = String.class, example = "test")),
+ @Parameter(name = "pageSize", description = "PAGE_SIZE", required = true, schema = @Schema(implementation = int.class, example = "10")),
+ @Parameter(name = "pageNo", description = "PAGE_NO", required = true, schema = @Schema(implementation = int.class, example = "1"))
})
@GetMapping(consumes = {"application/json"})
@ResponseStatus(HttpStatus.OK)
@@ -174,7 +175,7 @@ public ProjectListPagingResponse queryProjectListPaging(@Parameter(hidden = true
*/
@Operation(summary = "delete", description = "DELETE_PROJECT_BY_ID_NOTES")
@Parameters({
- @Parameter(name = "code", description = "PROJECT_CODE", schema =@Schema( implementation = long.class, example = "123456", required = true))
+ @Parameter(name = "code", description = "PROJECT_CODE", schema = @Schema(implementation = long.class, example = "123456", required = true))
})
@DeleteMapping(value = "/{code}")
@ResponseStatus(HttpStatus.OK)
@@ -195,7 +196,7 @@ public ProjectDeleteResponse deleteProject(@Parameter(hidden = true) @RequestAtt
*/
@Operation(summary = "queryUnauthorizedProject", description = "QUERY_UNAUTHORIZED_PROJECT_NOTES")
@Parameters({
- @Parameter(name = "userId", description = "USER_ID", schema =@Schema( implementation = int.class, example = "100", required = true))
+ @Parameter(name = "userId", description = "USER_ID", schema = @Schema(implementation = int.class, example = "100", required = true))
})
@GetMapping(value = "/unauth-project")
@ResponseStatus(HttpStatus.OK)
@@ -216,7 +217,7 @@ public ProjectListResponse queryUnauthorizedProject(@Parameter(hidden = true) @R
*/
@Operation(summary = "queryAuthorizedProject", description = "QUERY_AUTHORIZED_PROJECT_NOTES")
@Parameters({
- @Parameter(name = "userId", description = "USER_ID", schema =@Schema( implementation = int.class, example = "100", required = true))
+ @Parameter(name = "userId", description = "USER_ID", schema = @Schema(implementation = int.class, example = "100", required = true))
})
@GetMapping(value = "/authed-project")
@ResponseStatus(HttpStatus.OK)
@@ -237,7 +238,7 @@ public ProjectListResponse queryAuthorizedProject(@Parameter(hidden = true) @Req
*/
@Operation(summary = "queryAuthorizedUser", description = "QUERY_AUTHORIZED_USER_NOTES")
@Parameters({
- @Parameter(name = "projectCode", description = "PROJECT_CODE", schema =@Schema( implementation = long.class, example = "100", required = true))
+ @Parameter(name = "projectCode", description = "PROJECT_CODE", schema = @Schema(implementation = long.class, example = "100", required = true))
})
@GetMapping(value = "/authed-user")
@ResponseStatus(HttpStatus.OK)
@@ -257,7 +258,7 @@ public UserListResponse queryAuthorizedUser(@Parameter(hidden = true) @RequestAt
*/
@Operation(summary = "queryProjectCreatedAndAuthorizedByUser", description = "QUERY_AUTHORIZED_AND_USER_CREATED_PROJECT_NOTES")
@Parameters({
- @Parameter(name = "loginUser", description = "LOGIN_USER", schema =@Schema( implementation = Object.class, example = "\"{id:100}\"", required = true))
+ @Parameter(name = "loginUser", description = "LOGIN_USER", schema = @Schema(implementation = Object.class, example = "\"{id:100}\"", required = true))
})
@GetMapping(value = "/created-and-authed")
@ResponseStatus(HttpStatus.OK)
@@ -276,7 +277,7 @@ public ProjectListResponse queryProjectCreatedAndAuthorizedByUser(@Parameter(hid
*/
@Operation(summary = "queryAllProjectList", description = "QUERY_ALL_PROJECT_LIST_NOTES")
@Parameters({
- @Parameter(name = "loginUser", description = "LOGIN_USER", schema =@Schema( implementation = Object.class, example = "\"{id:100}\"", required = true))
+ @Parameter(name = "loginUser", description = "LOGIN_USER", schema = @Schema(implementation = 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 241ff219544e..130669466160 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
@@ -22,11 +22,6 @@
import static org.apache.dolphinscheduler.api.enums.Status.UPDATE_QUEUE_ERROR;
import static org.apache.dolphinscheduler.api.enums.Status.VERIFY_QUEUE_ERROR;
-import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.Parameter;
-import io.swagger.v3.oas.annotations.Parameters;
-import io.swagger.v3.oas.annotations.media.Schema;
-import io.swagger.v3.oas.annotations.tags.Tag;
import org.apache.dolphinscheduler.api.aspect.AccessLogAnnotation;
import org.apache.dolphinscheduler.api.exceptions.ApiException;
import org.apache.dolphinscheduler.api.service.QueueService;
@@ -47,6 +42,12 @@
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Parameters;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.tags.Tag;
+
/**
* queue controller
*/
@@ -84,9 +85,9 @@ public Result queryList(@Parameter(hidden = true) @RequestAttribute(value = Cons
*/
@Operation(summary = "queryQueueListPaging", description = "QUERY_QUEUE_LIST_PAGING_NOTES")
@Parameters({
- @Parameter(name = "searchVal", description = "SEARCH_VAL", schema =@Schema( implementation = String.class)),
- @Parameter(name = "pageNo", description = "PAGE_NO", required = true, schema =@Schema( implementation = int.class, example = "1")),
- @Parameter(name = "pageSize", description = "PAGE_SIZE", required = true, schema =@Schema( implementation = int.class, example = "20"))
+ @Parameter(name = "searchVal", description = "SEARCH_VAL", schema = @Schema(implementation = String.class)),
+ @Parameter(name = "pageNo", description = "PAGE_NO", required = true, schema = @Schema(implementation = int.class, example = "1")),
+ @Parameter(name = "pageSize", description = "PAGE_SIZE", required = true, schema = @Schema(implementation = int.class, example = "20"))
})
@GetMapping()
@ResponseStatus(HttpStatus.OK)
@@ -116,8 +117,8 @@ public Result queryQueueListPaging(@Parameter(hidden = true) @RequestAttribute(v
*/
@Operation(summary = "createQueue", description = "CREATE_QUEUE_NOTES")
@Parameters({
- @Parameter(name = "queue", description = "YARN_QUEUE_NAME", required = true, schema =@Schema( implementation = String.class)),
- @Parameter(name = "queueName", description = "QUEUE_NAME", required = true, schema =@Schema( implementation = String.class))
+ @Parameter(name = "queue", description = "YARN_QUEUE_NAME", required = true, schema = @Schema(implementation = String.class)),
+ @Parameter(name = "queueName", description = "QUEUE_NAME", required = true, schema = @Schema(implementation = String.class))
})
@PostMapping()
@ResponseStatus(HttpStatus.CREATED)
@@ -140,9 +141,9 @@ public Result createQueue(@Parameter(hidden = true) @RequestAttribute(value = Co
*/
@Operation(summary = "updateQueue", description = "UPDATE_QUEUE_NOTES")
@Parameters({
- @Parameter(name = "id", description = "QUEUE_ID", required = true, schema =@Schema( implementation = int.class, example = "100")),
- @Parameter(name = "queue", description = "YARN_QUEUE_NAME", required = true, schema =@Schema( implementation = String.class)),
- @Parameter(name = "queueName", description = "QUEUE_NAME", required = true, schema =@Schema( implementation = String.class))
+ @Parameter(name = "id", description = "QUEUE_ID", required = true, schema = @Schema(implementation = int.class, example = "100")),
+ @Parameter(name = "queue", description = "YARN_QUEUE_NAME", required = true, schema = @Schema(implementation = String.class)),
+ @Parameter(name = "queueName", description = "QUEUE_NAME", required = true, schema = @Schema(implementation = String.class))
})
@PutMapping(value = "/{id}")
@ResponseStatus(HttpStatus.CREATED)
@@ -165,8 +166,8 @@ public Result updateQueue(@Parameter(hidden = true) @RequestAttribute(value = Co
*/
@Operation(summary = "verifyQueue", description = "VERIFY_QUEUE_NOTES")
@Parameters({
- @Parameter(name = "queue", description = "YARN_QUEUE_NAME", required = true, schema =@Schema( implementation = String.class)),
- @Parameter(name = "queueName", description = "QUEUE_NAME", required = true, schema =@Schema( implementation = String.class))
+ @Parameter(name = "queue", description = "YARN_QUEUE_NAME", required = true, schema = @Schema(implementation = String.class)),
+ @Parameter(name = "queueName", description = "QUEUE_NAME", required = true, schema = @Schema(implementation = String.class))
})
@PostMapping(value = "/verify")
@ResponseStatus(HttpStatus.OK)
diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/QueueV2Controller.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/QueueV2Controller.java
index 2d5cde2028c9..ce9864ed5b75 100644
--- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/QueueV2Controller.java
+++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/QueueV2Controller.java
@@ -22,11 +22,6 @@
import static org.apache.dolphinscheduler.api.enums.Status.UPDATE_QUEUE_ERROR;
import static org.apache.dolphinscheduler.api.enums.Status.VERIFY_QUEUE_ERROR;
-import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.Parameter;
-import io.swagger.v3.oas.annotations.Parameters;
-import io.swagger.v3.oas.annotations.media.Schema;
-import io.swagger.v3.oas.annotations.tags.Tag;
import org.apache.dolphinscheduler.api.aspect.AccessLogAnnotation;
import org.apache.dolphinscheduler.api.dto.queue.QueueCreateRequest;
import org.apache.dolphinscheduler.api.dto.queue.QueueCreateResponse;
@@ -41,8 +36,8 @@
import org.apache.dolphinscheduler.api.service.QueueService;
import org.apache.dolphinscheduler.api.utils.Result;
import org.apache.dolphinscheduler.common.Constants;
-import org.apache.dolphinscheduler.plugin.task.api.utils.ParameterUtils;
import org.apache.dolphinscheduler.dao.entity.User;
+import org.apache.dolphinscheduler.plugin.task.api.utils.ParameterUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
@@ -56,6 +51,12 @@
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Parameters;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.tags.Tag;
+
/**
* queue controller
*/
@@ -92,9 +93,9 @@ public QueueListResponse queryList(@Parameter(hidden = true) @RequestAttribute(v
*/
@Operation(summary = "queryQueueListPaging", description = "QUERY_QUEUE_LIST_PAGING_NOTES")
@Parameters({
- @Parameter(name = "searchVal", description = "SEARCH_VAL", schema =@Schema( implementation = String.class)),
- @Parameter(name = "pageNo", description = "PAGE_NO", required = true, schema =@Schema( implementation = int.class, example = "1")),
- @Parameter(name = "pageSize", description = "PAGE_SIZE", required = true, schema =@Schema( implementation = int.class, example = "20"))
+ @Parameter(name = "searchVal", description = "SEARCH_VAL", schema = @Schema(implementation = String.class)),
+ @Parameter(name = "pageNo", description = "PAGE_NO", required = true, schema = @Schema(implementation = int.class, example = "1")),
+ @Parameter(name = "pageSize", description = "PAGE_SIZE", required = true, schema = @Schema(implementation = int.class, example = "20"))
})
@GetMapping()
@ResponseStatus(HttpStatus.OK)
@@ -142,14 +143,15 @@ public QueueCreateResponse createQueue(@Parameter(hidden = true) @RequestAttribu
*/
@Operation(summary = "updateQueue", description = "UPDATE_QUEUE_NOTES")
@Parameters({
- @Parameter(name = "id", description = "QUEUE_ID", required = true, schema =@Schema( implementation = int.class, example = "100"))
+ @Parameter(name = "id", description = "QUEUE_ID", required = true, schema = @Schema(implementation = int.class, example = "100"))
})
@PutMapping(value = "/{id}", consumes = {"application/json"})
@ResponseStatus(HttpStatus.CREATED)
@ApiException(UPDATE_QUEUE_ERROR)
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
public QueueUpdateResponse updateQueue(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
- @PathVariable(value = "id") int id, @RequestBody QueueUpdateRequest queueUpdateRequest) {
+ @PathVariable(value = "id") int id,
+ @RequestBody QueueUpdateRequest queueUpdateRequest) {
Result result = queueService.updateQueue(loginUser, id, queueUpdateRequest.getQueue(),
queueUpdateRequest.getQueueName());
return new QueueUpdateResponse(result);
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 aabfca069387..d00dbfe33028 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
@@ -41,11 +41,6 @@
import static org.apache.dolphinscheduler.api.enums.Status.VIEW_RESOURCE_FILE_ON_LINE_ERROR;
import static org.apache.dolphinscheduler.api.enums.Status.VIEW_UDF_FUNCTION_ERROR;
-import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.Parameter;
-import io.swagger.v3.oas.annotations.Parameters;
-import io.swagger.v3.oas.annotations.media.Schema;
-import io.swagger.v3.oas.annotations.tags.Tag;
import org.apache.dolphinscheduler.api.aspect.AccessLogAnnotation;
import org.apache.dolphinscheduler.api.exceptions.ApiException;
import org.apache.dolphinscheduler.api.service.ResourcesService;
@@ -82,6 +77,12 @@
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Parameters;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.tags.Tag;
+
/**
* resources controller
*/
@@ -108,11 +109,11 @@ public class ResourcesController extends BaseController {
*/
@Operation(summary = "createDirectory", description = "CREATE_RESOURCE_NOTES")
@Parameters({
- @Parameter(name = "type", description = "RESOURCE_TYPE", required = true, schema =@Schema( implementation = ResourceType.class)),
- @Parameter(name = "name", description = "RESOURCE_NAME", required = true, schema =@Schema( implementation = String.class)),
- @Parameter(name = "description", description = "RESOURCE_DESC", schema =@Schema( implementation = String.class)),
- @Parameter(name = "pid", description = "RESOURCE_PID", required = true, schema =@Schema( implementation = int.class, example = "10")),
- @Parameter(name = "currentDir", description = "RESOURCE_CURRENT_DIR", required = true, schema =@Schema( implementation = String.class))
+ @Parameter(name = "type", description = "RESOURCE_TYPE", required = true, schema = @Schema(implementation = ResourceType.class)),
+ @Parameter(name = "name", description = "RESOURCE_NAME", required = true, schema = @Schema(implementation = String.class)),
+ @Parameter(name = "description", description = "RESOURCE_DESC", schema = @Schema(implementation = String.class)),
+ @Parameter(name = "pid", description = "RESOURCE_PID", required = true, schema = @Schema(implementation = int.class, example = "10")),
+ @Parameter(name = "currentDir", description = "RESOURCE_CURRENT_DIR", required = true, schema = @Schema(implementation = String.class))
})
@PostMapping(value = "/directory")
@ApiException(CREATE_RESOURCE_ERROR)
@@ -134,12 +135,12 @@ public Result createDirectory(@Parameter(hidden = true) @RequestAttribut
*/
@Operation(summary = "createResource", description = "CREATE_RESOURCE_NOTES")
@Parameters({
- @Parameter(name = "type", description = "RESOURCE_TYPE", required = true, schema =@Schema( implementation = ResourceType.class)),
- @Parameter(name = "name", description = "RESOURCE_NAME", required = true, schema =@Schema( implementation = String.class)),
- @Parameter(name = "description", description = "RESOURCE_DESC", schema =@Schema( implementation = String.class)),
- @Parameter(name = "file", description = "RESOURCE_FILE", required = true, schema =@Schema( implementation = MultipartFile.class)),
- @Parameter(name = "pid", description = "RESOURCE_PID", required = true, schema =@Schema( implementation = int.class, example = "10")),
- @Parameter(name = "currentDir", description = "RESOURCE_CURRENT_DIR", required = true, schema =@Schema( implementation = String.class))
+ @Parameter(name = "type", description = "RESOURCE_TYPE", required = true, schema = @Schema(implementation = ResourceType.class)),
+ @Parameter(name = "name", description = "RESOURCE_NAME", required = true, schema = @Schema(implementation = String.class)),
+ @Parameter(name = "description", description = "RESOURCE_DESC", schema = @Schema(implementation = String.class)),
+ @Parameter(name = "file", description = "RESOURCE_FILE", required = true, schema = @Schema(implementation = MultipartFile.class)),
+ @Parameter(name = "pid", description = "RESOURCE_PID", required = true, schema = @Schema(implementation = int.class, example = "10")),
+ @Parameter(name = "currentDir", description = "RESOURCE_CURRENT_DIR", required = true, schema = @Schema(implementation = String.class))
})
@PostMapping()
@ApiException(CREATE_RESOURCE_ERROR)
@@ -168,11 +169,11 @@ public Result createResource(@Parameter(hidden = true) @RequestAttribute
*/
@Operation(summary = "updateResource", description = "UPDATE_RESOURCE_NOTES")
@Parameters({
- @Parameter(name = "id", description = "RESOURCE_ID", required = true, schema =@Schema( implementation = int.class, example = "100")),
- @Parameter(name = "type", description = "RESOURCE_TYPE", required = true, schema =@Schema( implementation = ResourceType.class)),
- @Parameter(name = "name", description = "RESOURCE_NAME", required = true, schema =@Schema( implementation = String.class)),
- @Parameter(name = "description", description = "RESOURCE_DESC", schema =@Schema( implementation = String.class)),
- @Parameter(name = "file", description = "RESOURCE_FILE", required = true, schema =@Schema( implementation = MultipartFile.class))
+ @Parameter(name = "id", description = "RESOURCE_ID", required = true, schema = @Schema(implementation = int.class, example = "100")),
+ @Parameter(name = "type", description = "RESOURCE_TYPE", required = true, schema = @Schema(implementation = ResourceType.class)),
+ @Parameter(name = "name", description = "RESOURCE_NAME", required = true, schema = @Schema(implementation = String.class)),
+ @Parameter(name = "description", description = "RESOURCE_DESC", schema = @Schema(implementation = String.class)),
+ @Parameter(name = "file", description = "RESOURCE_FILE", required = true, schema = @Schema(implementation = MultipartFile.class))
})
@PutMapping(value = "/{id}")
@ApiException(UPDATE_RESOURCE_ERROR)
@@ -196,7 +197,7 @@ public Result updateResource(@Parameter(hidden = true) @RequestAttribute
*/
@Operation(summary = "queryResourceList", description = "QUERY_RESOURCE_LIST_NOTES")
@Parameters({
- @Parameter(name = "type", description = "RESOURCE_TYPE", required = true, schema =@Schema( implementation = ResourceType.class))
+ @Parameter(name = "type", description = "RESOURCE_TYPE", required = true, schema = @Schema(implementation = ResourceType.class))
})
@GetMapping(value = "/list")
@ResponseStatus(HttpStatus.OK)
@@ -220,11 +221,11 @@ public Result queryResourceList(@Parameter(hidden = true) @RequestAttrib
*/
@Operation(summary = "queryResourceListPaging", description = "QUERY_RESOURCE_LIST_PAGING_NOTES")
@Parameters({
- @Parameter(name = "type", description = "RESOURCE_TYPE", required = true, schema =@Schema( implementation = ResourceType.class)),
- @Parameter(name = "id", description = "RESOURCE_ID", required = true, schema =@Schema( implementation = int.class, example = "10")),
- @Parameter(name = "searchVal", description = "SEARCH_VAL", schema =@Schema( implementation = String.class)),
- @Parameter(name = "pageNo", description = "PAGE_NO", required = true, schema =@Schema( implementation = int.class, example = "1")),
- @Parameter(name = "pageSize", description = "PAGE_SIZE", required = true, schema =@Schema( implementation = int.class, example = "20"))
+ @Parameter(name = "type", description = "RESOURCE_TYPE", required = true, schema = @Schema(implementation = ResourceType.class)),
+ @Parameter(name = "id", description = "RESOURCE_ID", required = true, schema = @Schema(implementation = int.class, example = "10")),
+ @Parameter(name = "searchVal", description = "SEARCH_VAL", schema = @Schema(implementation = String.class)),
+ @Parameter(name = "pageNo", description = "PAGE_NO", required = true, schema = @Schema(implementation = int.class, example = "1")),
+ @Parameter(name = "pageSize", description = "PAGE_SIZE", required = true, schema = @Schema(implementation = int.class, example = "20"))
})
@GetMapping()
@ResponseStatus(HttpStatus.OK)
@@ -255,7 +256,7 @@ public Result queryResourceListPaging(@Parameter(hidden = true) @Request
*/
@Operation(summary = "deleteResource", description = "DELETE_RESOURCE_BY_ID_NOTES")
@Parameters({
- @Parameter(name = "id", description = "RESOURCE_ID", required = true, schema =@Schema( implementation = int.class, example = "100"))
+ @Parameter(name = "id", description = "RESOURCE_ID", required = true, schema = @Schema(implementation = int.class, example = "100"))
})
@DeleteMapping(value = "/{id}")
@ResponseStatus(HttpStatus.OK)
@@ -276,8 +277,8 @@ public Result deleteResource(@Parameter(hidden = true) @RequestAttribute
*/
@Operation(summary = "verifyResourceName", description = "VERIFY_RESOURCE_NAME_NOTES")
@Parameters({
- @Parameter(name = "type", description = "RESOURCE_TYPE", required = true, schema =@Schema( implementation = ResourceType.class)),
- @Parameter(name = "fullName", description = "RESOURCE_FULL_NAME", required = true, schema =@Schema( implementation = String.class))
+ @Parameter(name = "type", description = "RESOURCE_TYPE", required = true, schema = @Schema(implementation = ResourceType.class)),
+ @Parameter(name = "fullName", description = "RESOURCE_FULL_NAME", required = true, schema = @Schema(implementation = String.class))
})
@GetMapping(value = "/verify-name")
@ResponseStatus(HttpStatus.OK)
@@ -298,7 +299,7 @@ public Result verifyResourceName(@Parameter(hidden = true) @RequestAttri
*/
@Operation(summary = "queryResourceByProgramType", description = "QUERY_RESOURCE_LIST_NOTES")
@Parameters({
- @Parameter(name = "type", description = "RESOURCE_TYPE", required = true, schema =@Schema( implementation = ResourceType.class))
+ @Parameter(name = "type", description = "RESOURCE_TYPE", required = true, schema = @Schema(implementation = ResourceType.class))
})
@GetMapping(value = "/query-by-type")
@ResponseStatus(HttpStatus.OK)
@@ -321,9 +322,9 @@ public Result queryResourceJarList(@Parameter(hidden = true) @RequestAtt
*/
@Operation(summary = "queryResource", description = "QUERY_BY_RESOURCE_NAME")
@Parameters({
- @Parameter(name = "type", description = "RESOURCE_TYPE", required = true, schema =@Schema( implementation = ResourceType.class)),
- @Parameter(name = "fullName", description = "RESOURCE_FULL_NAME", required = true, schema =@Schema( implementation = String.class)),
- @Parameter(name = "id", description = "RESOURCE_ID", required = false, schema =@Schema( implementation = int.class, example = "10"))
+ @Parameter(name = "type", description = "RESOURCE_TYPE", required = true, schema = @Schema(implementation = ResourceType.class)),
+ @Parameter(name = "fullName", description = "RESOURCE_FULL_NAME", required = true, schema = @Schema(implementation = String.class)),
+ @Parameter(name = "id", description = "RESOURCE_ID", required = false, schema = @Schema(implementation = int.class, example = "10"))
})
@GetMapping(value = "/{id}")
@ResponseStatus(HttpStatus.OK)
@@ -348,9 +349,9 @@ public Result queryResource(@Parameter(hidden = true) @RequestAttribute(
*/
@Operation(summary = "viewResource", description = "VIEW_RESOURCE_BY_ID_NOTES")
@Parameters({
- @Parameter(name = "id", description = "RESOURCE_ID", required = true, schema =@Schema( implementation = int.class, example = "100")),
- @Parameter(name = "skipLineNum", description = "SKIP_LINE_NUM", required = true, schema =@Schema( implementation = int.class, example = "100")),
- @Parameter(name = "limit", description = "LIMIT", required = true, schema =@Schema( implementation = int.class, example = "100"))
+ @Parameter(name = "id", description = "RESOURCE_ID", required = true, schema = @Schema(implementation = int.class, example = "100")),
+ @Parameter(name = "skipLineNum", description = "SKIP_LINE_NUM", required = true, schema = @Schema(implementation = int.class, example = "100")),
+ @Parameter(name = "limit", description = "LIMIT", required = true, schema = @Schema(implementation = int.class, example = "100"))
})
@GetMapping(value = "/{id}/view")
@ApiException(VIEW_RESOURCE_FILE_ON_LINE_ERROR)
@@ -369,13 +370,13 @@ public Result viewResource(@Parameter(hidden = true) @RequestAttribute(value = C
*/
@Operation(summary = "onlineCreateResource", description = "ONLINE_CREATE_RESOURCE_NOTES")
@Parameters({
- @Parameter(name = "type", description = "RESOURCE_TYPE", required = true, schema =@Schema( implementation = ResourceType.class)),
- @Parameter(name = "fileName", description = "RESOURCE_NAME", required = true, schema =@Schema( implementation = String.class)),
- @Parameter(name = "suffix", description = "SUFFIX", required = true, schema =@Schema( implementation = String.class)),
- @Parameter(name = "description", description = "RESOURCE_DESC", schema =@Schema( implementation = String.class)),
- @Parameter(name = "content", description = "CONTENT", required = true, schema =@Schema( implementation = String.class)),
- @Parameter(name = "pid", description = "RESOURCE_PID", required = true, schema =@Schema( implementation = int.class, example = "10")),
- @Parameter(name = "currentDir", description = "RESOURCE_CURRENTDIR", required = true, schema =@Schema( implementation = String.class))
+ @Parameter(name = "type", description = "RESOURCE_TYPE", required = true, schema = @Schema(implementation = ResourceType.class)),
+ @Parameter(name = "fileName", description = "RESOURCE_NAME", required = true, schema = @Schema(implementation = String.class)),
+ @Parameter(name = "suffix", description = "SUFFIX", required = true, schema = @Schema(implementation = String.class)),
+ @Parameter(name = "description", description = "RESOURCE_DESC", schema = @Schema(implementation = String.class)),
+ @Parameter(name = "content", description = "CONTENT", required = true, schema = @Schema(implementation = String.class)),
+ @Parameter(name = "pid", description = "RESOURCE_PID", required = true, schema = @Schema(implementation = int.class, example = "10")),
+ @Parameter(name = "currentDir", description = "RESOURCE_CURRENTDIR", required = true, schema = @Schema(implementation = String.class))
})
@PostMapping(value = "/online-create")
@ApiException(CREATE_RESOURCE_FILE_ON_LINE_ERROR)
@@ -406,8 +407,8 @@ public Result onlineCreateResource(@Parameter(hidden = true) @RequestAttribute(v
*/
@Operation(summary = "updateResourceContent", description = "UPDATE_RESOURCE_NOTES")
@Parameters({
- @Parameter(name = "id", description = "RESOURCE_ID", required = true, schema =@Schema( implementation = int.class, example = "100")),
- @Parameter(name = "content", description = "CONTENT", required = true, schema =@Schema( implementation = String.class))
+ @Parameter(name = "id", description = "RESOURCE_ID", required = true, schema = @Schema(implementation = int.class, example = "100")),
+ @Parameter(name = "content", description = "CONTENT", required = true, schema = @Schema(implementation = String.class))
})
@PutMapping(value = "/{id}/update-content")
@ApiException(EDIT_RESOURCE_FILE_ON_LINE_ERROR)
@@ -431,7 +432,7 @@ public Result updateResourceContent(@Parameter(hidden = true) @RequestAttribute(
*/
@Operation(summary = "downloadResource", description = "DOWNLOAD_RESOURCE_NOTES")
@Parameters({
- @Parameter(name = "id", description = "RESOURCE_ID", required = true, schema =@Schema( implementation = int.class, example = "100"))
+ @Parameter(name = "id", description = "RESOURCE_ID", required = true, schema = @Schema(implementation = int.class, example = "100"))
})
@GetMapping(value = "/{id}/download")
@ResponseBody
@@ -464,13 +465,13 @@ public ResponseEntity downloadResource(@Parameter(hidden = true) @RequestAttribu
*/
@Operation(summary = "createUdfFunc", description = "CREATE_UDF_FUNCTION_NOTES")
@Parameters({
- @Parameter(name = "type", description = "UDF_TYPE", required = true, schema =@Schema( implementation = UdfType.class)),
- @Parameter(name = "funcName", description = "FUNC_NAME", required = true, schema =@Schema( implementation = String.class)),
- @Parameter(name = "className", description = "CLASS_NAME", required = true, schema =@Schema( implementation = String.class)),
- @Parameter(name = "argTypes", description = "ARG_TYPES", schema =@Schema( implementation = String.class)),
- @Parameter(name = "database", description = "DATABASE_NAME", schema =@Schema( implementation = String.class)),
- @Parameter(name = "description", description = "UDF_DESC", schema =@Schema( implementation = String.class)),
- @Parameter(name = "resourceId", description = "RESOURCE_ID", required = true, schema =@Schema( implementation = int.class, example = "100"))
+ @Parameter(name = "type", description = "UDF_TYPE", required = true, schema = @Schema(implementation = UdfType.class)),
+ @Parameter(name = "funcName", description = "FUNC_NAME", required = true, schema = @Schema(implementation = String.class)),
+ @Parameter(name = "className", description = "CLASS_NAME", required = true, schema = @Schema(implementation = String.class)),
+ @Parameter(name = "argTypes", description = "ARG_TYPES", schema = @Schema(implementation = String.class)),
+ @Parameter(name = "database", description = "DATABASE_NAME", schema = @Schema(implementation = String.class)),
+ @Parameter(name = "description", description = "UDF_DESC", schema = @Schema(implementation = String.class)),
+ @Parameter(name = "resourceId", description = "RESOURCE_ID", required = true, schema = @Schema(implementation = int.class, example = "100"))
})
@PostMapping(value = "/{resourceId}/udf-func")
@@ -499,7 +500,7 @@ public Result createUdfFunc(@Parameter(hidden = true) @RequestAttribute(value =
*/
@Operation(summary = "viewUIUdfFunction", description = "VIEW_UDF_FUNCTION_NOTES")
@Parameters({
- @Parameter(name = "id", description = "RESOURCE_ID", required = true, schema =@Schema( implementation = int.class, example = "100"))
+ @Parameter(name = "id", description = "RESOURCE_ID", required = true, schema = @Schema(implementation = int.class, example = "100"))
})
@GetMapping(value = "/{id}/udf-func")
@@ -527,14 +528,14 @@ public Result viewUIUdfFunction(@Parameter(hidden = true) @RequestAttribute(valu
*/
@Operation(summary = "updateUdfFunc", description = "UPDATE_UDF_FUNCTION_NOTES")
@Parameters({
- @Parameter(name = "id", description = "UDF_ID", required = true, schema =@Schema( implementation = int.class)),
- @Parameter(name = "type", description = "UDF_TYPE", required = true, schema =@Schema( implementation = UdfType.class)),
- @Parameter(name = "funcName", description = "FUNC_NAME", required = true, schema =@Schema( implementation = String.class)),
- @Parameter(name = "className", description = "CLASS_NAME", required = true, schema =@Schema( implementation = String.class)),
- @Parameter(name = "argTypes", description = "ARG_TYPES", schema =@Schema( implementation = String.class)),
- @Parameter(name = "database", description = "DATABASE_NAME", schema =@Schema( implementation = String.class)),
- @Parameter(name = "description", description = "UDF_DESC", schema =@Schema( implementation = String.class)),
- @Parameter(name = "resourceId", description = "RESOURCE_ID", required = true, schema =@Schema( implementation = int.class, example = "100"))
+ @Parameter(name = "id", description = "UDF_ID", required = true, schema = @Schema(implementation = int.class)),
+ @Parameter(name = "type", description = "UDF_TYPE", required = true, schema = @Schema(implementation = UdfType.class)),
+ @Parameter(name = "funcName", description = "FUNC_NAME", required = true, schema = @Schema(implementation = String.class)),
+ @Parameter(name = "className", description = "CLASS_NAME", required = true, schema = @Schema(implementation = String.class)),
+ @Parameter(name = "argTypes", description = "ARG_TYPES", schema = @Schema(implementation = String.class)),
+ @Parameter(name = "database", description = "DATABASE_NAME", schema = @Schema(implementation = String.class)),
+ @Parameter(name = "description", description = "UDF_DESC", schema = @Schema(implementation = String.class)),
+ @Parameter(name = "resourceId", description = "RESOURCE_ID", required = true, schema = @Schema(implementation = int.class, example = "100"))
})
@PutMapping(value = "/{resourceId}/udf-func/{id}")
@@ -564,9 +565,9 @@ public Result updateUdfFunc(@Parameter(hidden = true) @RequestAttribute(value =
*/
@Operation(summary = "queryUdfFuncListPaging", description = "QUERY_UDF_FUNCTION_LIST_PAGING_NOTES")
@Parameters({
- @Parameter(name = "searchVal", description = "SEARCH_VAL", schema =@Schema( implementation = String.class)),
- @Parameter(name = "pageNo", description = "PAGE_NO", required = true, schema =@Schema( implementation = int.class, example = "1")),
- @Parameter(name = "pageSize", description = "PAGE_SIZE", required = true, schema =@Schema( implementation = int.class, example = "20"))
+ @Parameter(name = "searchVal", description = "SEARCH_VAL", schema = @Schema(implementation = String.class)),
+ @Parameter(name = "pageNo", description = "PAGE_NO", required = true, schema = @Schema(implementation = int.class, example = "1")),
+ @Parameter(name = "pageSize", description = "PAGE_SIZE", required = true, schema = @Schema(implementation = int.class, example = "20"))
})
@GetMapping(value = "/udf-func")
@ResponseStatus(HttpStatus.OK)
@@ -592,7 +593,7 @@ public Result queryUdfFuncListPaging(@Parameter(hidden = true) @RequestA
*/
@Operation(summary = "queryUdfFuncList", description = "QUERY_UDF_FUNC_LIST_NOTES")
@Parameters({
- @Parameter(name = "type", description = "UDF_TYPE", required = true, schema =@Schema( implementation = UdfType.class))
+ @Parameter(name = "type", description = "UDF_TYPE", required = true, schema = @Schema(implementation = UdfType.class))
})
@GetMapping(value = "/udf-func/list")
@ResponseStatus(HttpStatus.OK)
@@ -612,7 +613,7 @@ public Result queryUdfFuncList(@Parameter(hidden = true) @RequestAttribu
*/
@Operation(summary = "verifyUdfFuncName", description = "VERIFY_UDF_FUNCTION_NAME_NOTES")
@Parameters({
- @Parameter(name = "name", description = "FUNC_NAME", required = true, schema =@Schema( implementation = String.class))
+ @Parameter(name = "name", description = "FUNC_NAME", required = true, schema = @Schema(implementation = String.class))
})
@GetMapping(value = "/udf-func/verify-name")
@@ -633,7 +634,7 @@ public Result verifyUdfFuncName(@Parameter(hidden = true) @RequestAttribute(valu
*/
@Operation(summary = "deleteUdfFunc", description = "DELETE_UDF_FUNCTION_NOTES")
@Parameters({
- @Parameter(name = "id", description = "UDF_FUNC_ID", required = true, schema =@Schema( implementation = int.class, example = "100"))
+ @Parameter(name = "id", description = "UDF_FUNC_ID", required = true, schema = @Schema(implementation = int.class, example = "100"))
})
@DeleteMapping(value = "/udf-func/{id}")
@ResponseStatus(HttpStatus.OK)
@@ -653,7 +654,7 @@ public Result deleteUdfFunc(@Parameter(hidden = true) @RequestAttribute(value =
*/
@Operation(summary = "authorizedFile", description = "AUTHORIZED_FILE_NOTES")
@Parameters({
- @Parameter(name = "userId", description = "USER_ID", required = true, schema =@Schema( implementation = int.class, example = "100"))
+ @Parameter(name = "userId", description = "USER_ID", required = true, schema = @Schema(implementation = int.class, example = "100"))
})
@GetMapping(value = "/authed-file")
@ResponseStatus(HttpStatus.CREATED)
@@ -674,7 +675,7 @@ public Result authorizedFile(@Parameter(hidden = true) @RequestAttribute(value =
*/
@Operation(summary = "authorizeResourceTree", description = "AUTHORIZE_RESOURCE_TREE_NOTES")
@Parameters({
- @Parameter(name = "userId", description = "USER_ID", required = true, schema =@Schema( implementation = int.class, example = "100"))
+ @Parameter(name = "userId", description = "USER_ID", required = true, schema = @Schema(implementation = int.class, example = "100"))
})
@GetMapping(value = "/authed-resource-tree")
@ResponseStatus(HttpStatus.CREATED)
@@ -695,7 +696,7 @@ public Result authorizeResourceTree(@Parameter(hidden = true) @RequestAttribute(
*/
@Operation(summary = "unauthUDFFunc", description = "UNAUTHORIZED_UDF_FUNC_NOTES")
@Parameters({
- @Parameter(name = "userId", description = "USER_ID", required = true, schema =@Schema( implementation = int.class, example = "100"))
+ @Parameter(name = "userId", description = "USER_ID", required = true, schema = @Schema(implementation = int.class, example = "100"))
})
@GetMapping(value = "/unauth-udf-func")
@ResponseStatus(HttpStatus.CREATED)
@@ -717,7 +718,7 @@ public Result unauthUDFFunc(@Parameter(hidden = true) @RequestAttribute(value =
*/
@Operation(summary = "authUDFFunc", description = "AUTHORIZED_UDF_FUNC_NOTES")
@Parameters({
- @Parameter(name = "userId", description = "USER_ID", required = true, schema =@Schema( implementation = int.class, example = "100"))
+ @Parameter(name = "userId", description = "USER_ID", required = true, schema = @Schema(implementation = int.class, example = "100"))
})
@GetMapping(value = "/authed-udf-func")
@ResponseStatus(HttpStatus.CREATED)
@@ -738,7 +739,7 @@ public Result authorizedUDFFunction(@Parameter(hidden = true) @RequestAttribute(
*/
@Operation(summary = "queryResourceById", description = "QUERY_BY_RESOURCE_NAME")
@Parameters({
- @Parameter(name = "id", description = "RESOURCE_ID", required = true, schema =@Schema( implementation = int.class, example = "10"))
+ @Parameter(name = "id", description = "RESOURCE_ID", required = true, schema = @Schema(implementation = int.class, example = "10"))
})
@GetMapping(value = "/{id}/query")
@ResponseStatus(HttpStatus.OK)
diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ScheduleV2Controller.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ScheduleV2Controller.java
index 056579612bc0..87dd6658d4de 100644
--- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ScheduleV2Controller.java
+++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ScheduleV2Controller.java
@@ -23,11 +23,6 @@
import static org.apache.dolphinscheduler.api.enums.Status.QUERY_SCHEDULE_LIST_PAGING_ERROR;
import static org.apache.dolphinscheduler.api.enums.Status.UPDATE_SCHEDULE_ERROR;
-import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.Parameter;
-import io.swagger.v3.oas.annotations.Parameters;
-import io.swagger.v3.oas.annotations.media.Schema;
-import io.swagger.v3.oas.annotations.tags.Tag;
import org.apache.dolphinscheduler.api.aspect.AccessLogAnnotation;
import org.apache.dolphinscheduler.api.dto.schedule.ScheduleCreateRequest;
import org.apache.dolphinscheduler.api.dto.schedule.ScheduleFilterRequest;
@@ -53,6 +48,12 @@
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Parameters;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.tags.Tag;
+
/**
* schedule controller
*/
@@ -90,7 +91,7 @@ public Result createSchedule(@Parameter(hidden = true) @RequestAttribu
*/
@Operation(summary = "delete", description = "DELETE_SCHEDULE_NOTES")
@Parameters({
- @Parameter(name = "id", description = "SCHEDULE_ID", schema =@Schema( implementation = long.class, example = "123456", required = true))
+ @Parameter(name = "id", description = "SCHEDULE_ID", schema = @Schema(implementation = long.class, example = "123456", required = true))
})
@DeleteMapping(value = "/{id}")
@ResponseStatus(HttpStatus.OK)
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 364b0e31ded7..f20609594583 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
@@ -27,11 +27,6 @@
import static org.apache.dolphinscheduler.api.enums.Status.UPDATE_SCHEDULE_ERROR;
import static org.apache.dolphinscheduler.common.Constants.SESSION_USER;
-import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.Parameter;
-import io.swagger.v3.oas.annotations.Parameters;
-import io.swagger.v3.oas.annotations.media.Schema;
-import io.swagger.v3.oas.annotations.tags.Tag;
import org.apache.dolphinscheduler.api.aspect.AccessLogAnnotation;
import org.apache.dolphinscheduler.api.enums.Status;
import org.apache.dolphinscheduler.api.exceptions.ApiException;
@@ -59,6 +54,12 @@
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Parameters;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.tags.Tag;
+
/**
* scheduler controller
*/
@@ -91,14 +92,14 @@ public class SchedulerController extends BaseController {
*/
@Operation(summary = "createSchedule", description = "CREATE_SCHEDULE_NOTES")
@Parameters({
- @Parameter(name = "processDefinitionCode", description = "PROCESS_DEFINITION_CODE", required = true, schema =@Schema( implementation = long.class, example = "100")),
- @Parameter(name = "schedule", description = "SCHEDULE", schema =@Schema( implementation = 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 * * ? *'}")),
- @Parameter(name = "warningType", description = "WARNING_TYPE", schema =@Schema( implementation = WarningType.class)),
- @Parameter(name = "warningGroupId", description = "WARNING_GROUP_ID", schema =@Schema( implementation = int.class, example = "100")),
- @Parameter(name = "failureStrategy", description = "FAILURE_STRATEGY", schema =@Schema( implementation = FailureStrategy.class)),
- @Parameter(name = "workerGroupId", description = "WORKER_GROUP_ID", schema =@Schema( implementation = int.class, example = "100")),
- @Parameter(name = "environmentCode", description = "ENVIRONMENT_CODE", schema =@Schema( implementation = long.class)),
- @Parameter(name = "processInstancePriority", description = "PROCESS_INSTANCE_PRIORITY", schema =@Schema( implementation = Priority.class)),
+ @Parameter(name = "processDefinitionCode", description = "PROCESS_DEFINITION_CODE", required = true, schema = @Schema(implementation = long.class, example = "100")),
+ @Parameter(name = "schedule", description = "SCHEDULE", schema = @Schema(implementation = 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 * * ? *'}")),
+ @Parameter(name = "warningType", description = "WARNING_TYPE", schema = @Schema(implementation = WarningType.class)),
+ @Parameter(name = "warningGroupId", description = "WARNING_GROUP_ID", schema = @Schema(implementation = int.class, example = "100")),
+ @Parameter(name = "failureStrategy", description = "FAILURE_STRATEGY", schema = @Schema(implementation = FailureStrategy.class)),
+ @Parameter(name = "workerGroupId", description = "WORKER_GROUP_ID", schema = @Schema(implementation = int.class, example = "100")),
+ @Parameter(name = "environmentCode", description = "ENVIRONMENT_CODE", schema = @Schema(implementation = long.class)),
+ @Parameter(name = "processInstancePriority", description = "PROCESS_INSTANCE_PRIORITY", schema = @Schema(implementation = Priority.class)),
})
@PostMapping()
@ResponseStatus(HttpStatus.CREATED)
@@ -137,14 +138,14 @@ public Result createSchedule(@Parameter(hidden = true) @RequestAttribute(value =
*/
@Operation(summary = "updateSchedule", description = "UPDATE_SCHEDULE_NOTES")
@Parameters({
- @Parameter(name = "id", description = "SCHEDULE_ID", required = true, schema =@Schema( implementation = int.class, example = "100")),
- @Parameter(name = "schedule", description = "SCHEDULE", schema =@Schema( implementation = String.class, example = "{'startTime':'2019-06-10 00:00:00','endTime':'2019-06-13 00:00:00','crontab':'0 0 3/6 * * ? *'}")),
- @Parameter(name = "warningType", description = "WARNING_TYPE", schema =@Schema( implementation = WarningType.class)),
- @Parameter(name = "warningGroupId", description = "WARNING_GROUP_ID", schema =@Schema( implementation = int.class, example = "100")),
- @Parameter(name = "failureStrategy", description = "FAILURE_STRATEGY", schema =@Schema( implementation = FailureStrategy.class)),
- @Parameter(name = "workerGroup", description = "WORKER_GROUP", schema =@Schema( implementation = String.class, example = "default")),
- @Parameter(name = "processInstancePriority", description = "PROCESS_INSTANCE_PRIORITY", schema =@Schema( implementation = Priority.class)),
- @Parameter(name = "environmentCode", description = "ENVIRONMENT_CODE", schema =@Schema( implementation = long.class)),
+ @Parameter(name = "id", description = "SCHEDULE_ID", required = true, schema = @Schema(implementation = int.class, example = "100")),
+ @Parameter(name = "schedule", description = "SCHEDULE", schema = @Schema(implementation = String.class, example = "{'startTime':'2019-06-10 00:00:00','endTime':'2019-06-13 00:00:00','crontab':'0 0 3/6 * * ? *'}")),
+ @Parameter(name = "warningType", description = "WARNING_TYPE", schema = @Schema(implementation = WarningType.class)),
+ @Parameter(name = "warningGroupId", description = "WARNING_GROUP_ID", schema = @Schema(implementation = int.class, example = "100")),
+ @Parameter(name = "failureStrategy", description = "FAILURE_STRATEGY", schema = @Schema(implementation = FailureStrategy.class)),
+ @Parameter(name = "workerGroup", description = "WORKER_GROUP", schema = @Schema(implementation = String.class, example = "default")),
+ @Parameter(name = "processInstancePriority", description = "PROCESS_INSTANCE_PRIORITY", schema = @Schema(implementation = Priority.class)),
+ @Parameter(name = "environmentCode", description = "ENVIRONMENT_CODE", schema = @Schema(implementation = long.class)),
})
@PutMapping("/{id}")
@ResponseStatus(HttpStatus.OK)
@@ -176,7 +177,7 @@ public Result updateSchedule(@Parameter(hidden = true) @RequestAttribute(value =
*/
@Operation(summary = "online", description = "ONLINE_SCHEDULE_NOTES")
@Parameters({
- @Parameter(name = "id", description = "SCHEDULE_ID", required = true, schema =@Schema( implementation = int.class, example = "100"))
+ @Parameter(name = "id", description = "SCHEDULE_ID", required = true, schema = @Schema(implementation = int.class, example = "100"))
})
@PostMapping("/{id}/online")
@ApiException(PUBLISH_SCHEDULE_ONLINE_ERROR)
@@ -198,7 +199,7 @@ public Result publishScheduleOnline(@Parameter(hidden = true) @RequestAttribute(
*/
@Operation(summary = "offline", description = "OFFLINE_SCHEDULE_NOTES")
@Parameters({
- @Parameter(name = "id", description = "SCHEDULE_ID", required = true, schema =@Schema( implementation = int.class, example = "100"))
+ @Parameter(name = "id", description = "SCHEDULE_ID", required = true, schema = @Schema(implementation = int.class, example = "100"))
})
@PostMapping("/{id}/offline")
@ApiException(OFFLINE_SCHEDULE_ERROR)
@@ -225,10 +226,10 @@ public Result offlineSchedule(@Parameter(hidden = true) @RequestAttribute(value
*/
@Operation(summary = "queryScheduleListPaging", description = "QUERY_SCHEDULE_LIST_PAGING_NOTES")
@Parameters({
- @Parameter(name = "processDefinitionId", description = "PROCESS_DEFINITION_ID", required = true, schema =@Schema( implementation = int.class, example = "100")),
- @Parameter(name = "searchVal", description = "SEARCH_VAL", schema =@Schema( implementation = String.class)),
- @Parameter(name = "pageNo", description = "PAGE_NO", schema =@Schema( implementation = int.class, example = "1")),
- @Parameter(name = "pageSize", description = "PAGE_SIZE", schema =@Schema( implementation = int.class, example = "20"))
+ @Parameter(name = "processDefinitionId", description = "PROCESS_DEFINITION_ID", required = true, schema = @Schema(implementation = int.class, example = "100")),
+ @Parameter(name = "searchVal", description = "SEARCH_VAL", schema = @Schema(implementation = String.class)),
+ @Parameter(name = "pageNo", description = "PAGE_NO", schema = @Schema(implementation = int.class, example = "1")),
+ @Parameter(name = "pageSize", description = "PAGE_SIZE", schema = @Schema(implementation = int.class, example = "20"))
})
@GetMapping()
@ApiException(QUERY_SCHEDULE_LIST_PAGING_ERROR)
@@ -260,7 +261,7 @@ public Result queryScheduleListPaging(@Parameter(hidden = true) @RequestAttribut
*/
@Operation(summary = "deleteScheduleById", description = "DELETE_SCHEDULE_NOTES")
@Parameters({
- @Parameter(name = "id", description = "SCHEDULE_ID", required = true, schema =@Schema( implementation = int.class, example = "100"))
+ @Parameter(name = "id", description = "SCHEDULE_ID", required = true, schema = @Schema(implementation = int.class, example = "100"))
})
@DeleteMapping(value = "/{id}")
@ResponseStatus(HttpStatus.OK)
@@ -299,7 +300,7 @@ public Result queryScheduleList(@Parameter(hidden = true) @RequestAttribute(valu
*/
@Operation(summary = "previewSchedule", description = "PREVIEW_SCHEDULE_NOTES")
@Parameters({
- @Parameter(name = "schedule", description = "SCHEDULE", schema =@Schema( implementation = String.class, example = "{'startTime':'2019-06-10 00:00:00','endTime':'2019-06-13 00:00:00','crontab':'0 0 3/6 * * ? *'}")),
+ @Parameter(name = "schedule", description = "SCHEDULE", schema = @Schema(implementation = 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)
@@ -327,14 +328,14 @@ public Result previewSchedule(@Parameter(hidden = true) @RequestAttribute(value
*/
@Operation(summary = "updateScheduleByProcessDefinitionCode", description = "UPDATE_SCHEDULE_BY_PROCESS_DEFINITION_CODE_NOTES")
@Parameters({
- @Parameter(name = "processDefinitionCode", description = "PROCESS_DEFINITION_CODE", required = true, schema =@Schema( implementation = long.class, example = "12345678")),
- @Parameter(name = "schedule", description = "SCHEDULE", schema =@Schema( implementation = String.class, example = "{'startTime':'2019-06-10 00:00:00','endTime':'2019-06-13 00:00:00','crontab':'0 0 3/6 * * ? *'}")),
- @Parameter(name = "warningType", description = "WARNING_TYPE", schema =@Schema( implementation = WarningType.class)),
- @Parameter(name = "warningGroupId", description = "WARNING_GROUP_ID", schema =@Schema( implementation = int.class, example = "100")),
- @Parameter(name = "failureStrategy", description = "FAILURE_STRATEGY", schema =@Schema( implementation = FailureStrategy.class)),
- @Parameter(name = "workerGroup", description = "WORKER_GROUP", schema =@Schema( implementation = String.class, example = "default")),
- @Parameter(name = "processInstancePriority", description = "PROCESS_INSTANCE_PRIORITY", schema =@Schema( implementation = Priority.class)),
- @Parameter(name = "environmentCode", description = "ENVIRONMENT_CODE", schema =@Schema( implementation = long.class)),
+ @Parameter(name = "processDefinitionCode", description = "PROCESS_DEFINITION_CODE", required = true, schema = @Schema(implementation = long.class, example = "12345678")),
+ @Parameter(name = "schedule", description = "SCHEDULE", schema = @Schema(implementation = String.class, example = "{'startTime':'2019-06-10 00:00:00','endTime':'2019-06-13 00:00:00','crontab':'0 0 3/6 * * ? *'}")),
+ @Parameter(name = "warningType", description = "WARNING_TYPE", schema = @Schema(implementation = WarningType.class)),
+ @Parameter(name = "warningGroupId", description = "WARNING_GROUP_ID", schema = @Schema(implementation = int.class, example = "100")),
+ @Parameter(name = "failureStrategy", description = "FAILURE_STRATEGY", schema = @Schema(implementation = FailureStrategy.class)),
+ @Parameter(name = "workerGroup", description = "WORKER_GROUP", schema = @Schema(implementation = String.class, example = "default")),
+ @Parameter(name = "processInstancePriority", description = "PROCESS_INSTANCE_PRIORITY", schema = @Schema(implementation = Priority.class)),
+ @Parameter(name = "environmentCode", description = "ENVIRONMENT_CODE", schema = @Schema(implementation = long.class)),
})
@PutMapping("/update/{code}")
@ResponseStatus(HttpStatus.OK)
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 a77e4cb626e3..44f6fb99492b 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
@@ -28,11 +28,6 @@
import static org.apache.dolphinscheduler.api.enums.Status.SWITCH_TASK_DEFINITION_VERSION_ERROR;
import static org.apache.dolphinscheduler.api.enums.Status.UPDATE_TASK_DEFINITION_ERROR;
-import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.Parameter;
-import io.swagger.v3.oas.annotations.Parameters;
-import io.swagger.v3.oas.annotations.media.Schema;
-import io.swagger.v3.oas.annotations.tags.Tag;
import org.apache.dolphinscheduler.api.aspect.AccessLogAnnotation;
import org.apache.dolphinscheduler.api.enums.Status;
import org.apache.dolphinscheduler.api.exceptions.ApiException;
@@ -61,6 +56,12 @@
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Parameters;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.tags.Tag;
+
/**
* task definition controller
*/
@@ -82,8 +83,8 @@ public class TaskDefinitionController extends BaseController {
*/
@Operation(summary = "save", description = "CREATE_TASK_DEFINITION_NOTES")
@Parameters({
- @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true, schema =@Schema( implementation = long.class)),
- @Parameter(name = "taskDefinitionJson", description = "TASK_DEFINITION_JSON", required = true, schema =@Schema( implementation = String.class))
+ @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true, schema = @Schema(implementation = long.class)),
+ @Parameter(name = "taskDefinitionJson", description = "TASK_DEFINITION_JSON", required = true, schema = @Schema(implementation = String.class))
})
@PostMapping()
@ResponseStatus(HttpStatus.CREATED)
@@ -109,10 +110,10 @@ public Result createTaskDefinition(@Parameter(hidden = true) @RequestAttribute(v
*/
@Operation(summary = "saveSingle", description = "CREATE_SINGLE_TASK_DEFINITION_NOTES")
@Parameters({
- @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true, schema =@Schema( implementation = long.class)),
- @Parameter(name = "processDefinitionCode", description = "PROCESS_DEFINITION_CODE", required = true, schema =@Schema( implementation = long.class)),
- @Parameter(name = "taskDefinitionJsonObj", description = "TASK_DEFINITION_JSON", required = true, schema =@Schema( implementation = String.class)),
- @Parameter(name = "upstreamCodes", description = "UPSTREAM_CODES", required = false, schema =@Schema( implementation = String.class))
+ @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true, schema = @Schema(implementation = long.class)),
+ @Parameter(name = "processDefinitionCode", description = "PROCESS_DEFINITION_CODE", required = true, schema = @Schema(implementation = long.class)),
+ @Parameter(name = "taskDefinitionJsonObj", description = "TASK_DEFINITION_JSON", required = true, schema = @Schema(implementation = String.class)),
+ @Parameter(name = "upstreamCodes", description = "UPSTREAM_CODES", required = false, schema = @Schema(implementation = String.class))
})
@PostMapping("/save-single")
@ResponseStatus(HttpStatus.CREATED)
@@ -139,9 +140,9 @@ public Result createTaskBindsWorkFlow(@Parameter(hidden = true) @RequestAttribut
*/
@Operation(summary = "update", description = "UPDATE_TASK_DEFINITION_NOTES")
@Parameters({
- @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true, schema =@Schema( implementation = long.class)),
- @Parameter(name = "code", description = "TASK_DEFINITION_CODE", required = true, schema =@Schema( implementation = long.class, example = "1")),
- @Parameter(name = "taskDefinitionJsonObj", description = "TASK_DEFINITION_JSON", required = true, schema =@Schema( implementation = String.class))
+ @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true, schema = @Schema(implementation = long.class)),
+ @Parameter(name = "code", description = "TASK_DEFINITION_CODE", required = true, schema = @Schema(implementation = long.class, example = "1")),
+ @Parameter(name = "taskDefinitionJsonObj", description = "TASK_DEFINITION_JSON", required = true, schema = @Schema(implementation = String.class))
})
@PutMapping(value = "/{code}")
@ResponseStatus(HttpStatus.OK)
@@ -168,10 +169,10 @@ public Result updateTaskDefinition(@Parameter(hidden = true) @RequestAttribute(v
*/
@Operation(summary = "updateWithUpstream", description = "UPDATE_TASK_DEFINITION_NOTES")
@Parameters({
- @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true, schema =@Schema( implementation = long.class)),
- @Parameter(name = "code", description = "TASK_DEFINITION_CODE", required = true, schema =@Schema( implementation = long.class, example = "1")),
- @Parameter(name = "taskDefinitionJsonObj", description = "TASK_DEFINITION_JSON", required = true, schema =@Schema( implementation = String.class)),
- @Parameter(name = "upstreamCodes", description = "UPSTREAM_CODES", required = false, schema =@Schema( implementation = String.class))
+ @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true, schema = @Schema(implementation = long.class)),
+ @Parameter(name = "code", description = "TASK_DEFINITION_CODE", required = true, schema = @Schema(implementation = long.class, example = "1")),
+ @Parameter(name = "taskDefinitionJsonObj", description = "TASK_DEFINITION_JSON", required = true, schema = @Schema(implementation = String.class)),
+ @Parameter(name = "upstreamCodes", description = "UPSTREAM_CODES", required = false, schema = @Schema(implementation = String.class))
})
@PutMapping(value = "/{code}/with-upstream")
@ResponseStatus(HttpStatus.OK)
@@ -200,9 +201,9 @@ public Result updateTaskWithUpstream(@Parameter(hidden = true) @RequestAttribute
*/
@Operation(summary = "queryVersions", description = "QUERY_TASK_DEFINITION_VERSIONS_NOTES")
@Parameters({
- @Parameter(name = "code", description = "TASK_DEFINITION_CODE", required = true, schema =@Schema( implementation = long.class, example = "1")),
- @Parameter(name = "pageNo", description = "PAGE_NO", required = true, schema =@Schema( implementation = int.class, example = "1")),
- @Parameter(name = "pageSize", description = "PAGE_SIZE", required = true, schema =@Schema( implementation = int.class, example = "10"))
+ @Parameter(name = "code", description = "TASK_DEFINITION_CODE", required = true, schema = @Schema(implementation = long.class, example = "1")),
+ @Parameter(name = "pageNo", description = "PAGE_NO", required = true, schema = @Schema(implementation = int.class, example = "1")),
+ @Parameter(name = "pageSize", description = "PAGE_SIZE", required = true, schema = @Schema(implementation = int.class, example = "10"))
})
@GetMapping(value = "/{code}/versions")
@ResponseStatus(HttpStatus.OK)
@@ -231,8 +232,8 @@ public Result queryTaskDefinitionVersions(@Parameter(hidden = true) @RequestAttr
*/
@Operation(summary = "switchVersion", description = "SWITCH_TASK_DEFINITION_VERSION_NOTES")
@Parameters({
- @Parameter(name = "code", description = "TASK_DEFINITION_CODE", required = true, schema =@Schema( implementation = long.class, example = "1")),
- @Parameter(name = "version", description = "VERSION", required = true, schema =@Schema( implementation = int.class, example = "100"))
+ @Parameter(name = "code", description = "TASK_DEFINITION_CODE", required = true, schema = @Schema(implementation = long.class, example = "1")),
+ @Parameter(name = "version", description = "VERSION", required = true, schema = @Schema(implementation = int.class, example = "100"))
})
@GetMapping(value = "/{code}/versions/{version}")
@ResponseStatus(HttpStatus.OK)
@@ -257,8 +258,8 @@ public Result switchTaskDefinitionVersion(@Parameter(hidden = true) @RequestAttr
*/
@Operation(summary = "deleteVersion", description = "DELETE_TASK_DEFINITION_VERSION_NOTES")
@Parameters({
- @Parameter(name = "code", description = "TASK_DEFINITION_CODE", required = true, schema =@Schema( implementation = long.class, example = "1")),
- @Parameter(name = "version", description = "VERSION", required = true, schema =@Schema( implementation = int.class, example = "100"))
+ @Parameter(name = "code", description = "TASK_DEFINITION_CODE", required = true, schema = @Schema(implementation = long.class, example = "1")),
+ @Parameter(name = "version", description = "VERSION", required = true, schema = @Schema(implementation = int.class, example = "100"))
})
@DeleteMapping(value = "/{code}/versions/{version}")
@ResponseStatus(HttpStatus.OK)
@@ -283,7 +284,7 @@ public Result deleteTaskDefinitionVersion(@Parameter(hidden = true) @RequestAttr
*/
@Operation(summary = "deleteTaskDefinition", description = "DELETE_TASK_DEFINITION_BY_CODE_NOTES")
@Parameters({
- @Parameter(name = "code", description = "TASK_DEFINITION_CODE", required = true, schema =@Schema( implementation = long.class, example = "1"))
+ @Parameter(name = "code", description = "TASK_DEFINITION_CODE", required = true, schema = @Schema(implementation = long.class, example = "1"))
})
@DeleteMapping(value = "/{code}")
@ResponseStatus(HttpStatus.OK)
@@ -306,7 +307,7 @@ public Result deleteTaskDefinitionByCode(@Parameter(hidden = true) @RequestAttri
*/
@Operation(summary = "queryTaskDefinitionByCode", description = "QUERY_TASK_DEFINITION_DETAIL_NOTES")
@Parameters({
- @Parameter(name = "code", description = "TASK_DEFINITION_CODE", required = true, schema =@Schema( implementation = long.class, example = "1"))
+ @Parameter(name = "code", description = "TASK_DEFINITION_CODE", required = true, schema = @Schema(implementation = long.class, example = "1"))
})
@GetMapping(value = "/{code}")
@ResponseStatus(HttpStatus.OK)
@@ -334,13 +335,13 @@ public Result queryTaskDefinitionDetail(@Parameter(hidden = true) @RequestAttrib
*/
@Operation(summary = "queryTaskDefinitionListPaging", description = "QUERY_TASK_DEFINITION_LIST_PAGING_NOTES")
@Parameters({
- @Parameter(name = "projectCode", description = "PROJECT_CODE", required = false, schema =@Schema( implementation = long.class)),
- @Parameter(name = "searchWorkflowName", description = "SEARCH_WORKFLOW_NAME", required = false, schema =@Schema( implementation = String.class)),
- @Parameter(name = "searchTaskName", description = "SEARCH_TASK_NAME", required = false, schema =@Schema( implementation = String.class)),
- @Parameter(name = "taskType", description = "TASK_TYPE", required = false, schema =@Schema( implementation = String.class, example = "SHELL")),
- @Parameter(name = "taskExecuteType", description = "TASK_EXECUTE_TYPE", required = false, schema =@Schema( implementation = TaskExecuteType.class, example = "STREAM")),
- @Parameter(name = "pageNo", description = "PAGE_NO", required = true, schema =@Schema( implementation = int.class, example = "1")),
- @Parameter(name = "pageSize", description = "PAGE_SIZE", required = true, schema =@Schema( implementation = int.class, example = "10"))
+ @Parameter(name = "projectCode", description = "PROJECT_CODE", required = false, schema = @Schema(implementation = long.class)),
+ @Parameter(name = "searchWorkflowName", description = "SEARCH_WORKFLOW_NAME", required = false, schema = @Schema(implementation = String.class)),
+ @Parameter(name = "searchTaskName", description = "SEARCH_TASK_NAME", required = false, schema = @Schema(implementation = String.class)),
+ @Parameter(name = "taskType", description = "TASK_TYPE", required = false, schema = @Schema(implementation = String.class, example = "SHELL")),
+ @Parameter(name = "taskExecuteType", description = "TASK_EXECUTE_TYPE", required = false, schema = @Schema(implementation = TaskExecuteType.class, example = "STREAM")),
+ @Parameter(name = "pageNo", description = "PAGE_NO", required = true, schema = @Schema(implementation = int.class, example = "1")),
+ @Parameter(name = "pageSize", description = "PAGE_SIZE", required = true, schema = @Schema(implementation = int.class, example = "10"))
})
@GetMapping()
@ResponseStatus(HttpStatus.OK)
@@ -373,7 +374,7 @@ public Result queryTaskDefinitionListPaging(@Parameter(hidden = true) @RequestAt
*/
@Operation(summary = "genTaskCodeList", description = "GEN_TASK_CODE_LIST_NOTES")
@Parameters({
- @Parameter(name = "genNum", description = "GEN_NUM", required = true, schema =@Schema( implementation = int.class, example = "1"))
+ @Parameter(name = "genNum", description = "GEN_NUM", required = true, schema = @Schema(implementation = int.class, example = "1"))
})
@GetMapping(value = "/gen-task-codes")
@ResponseStatus(HttpStatus.OK)
@@ -396,9 +397,9 @@ public Result genTaskCodeList(@Parameter(hidden = true) @RequestAttribute(value
*/
@Operation(summary = "releaseTaskDefinition", description = "RELEASE_TASK_DEFINITION_NOTES")
@Parameters({
- @Parameter(name = "projectCode", description = "PROCESS_DEFINITION_NAME", required = true, schema =@Schema( implementation = long.class)),
- @Parameter(name = "code", description = "TASK_DEFINITION_CODE", required = true, schema =@Schema( implementation = long.class, example = "123456789")),
- @Parameter(name = "releaseState", description = "RELEASE_PROCESS_DEFINITION_NOTES", required = true, schema =@Schema( implementation = ReleaseState.class))
+ @Parameter(name = "projectCode", description = "PROCESS_DEFINITION_NAME", required = true, schema = @Schema(implementation = long.class)),
+ @Parameter(name = "code", description = "TASK_DEFINITION_CODE", required = true, schema = @Schema(implementation = long.class, example = "123456789")),
+ @Parameter(name = "releaseState", description = "RELEASE_PROCESS_DEFINITION_NOTES", required = true, schema = @Schema(implementation = ReleaseState.class))
})
@PostMapping(value = "/{code}/release")
@ResponseStatus(HttpStatus.OK)
diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/TaskDefinitionV2Controller.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/TaskDefinitionV2Controller.java
index 61c3168a6543..71bbf5aef992 100644
--- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/TaskDefinitionV2Controller.java
+++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/TaskDefinitionV2Controller.java
@@ -23,11 +23,6 @@
import static org.apache.dolphinscheduler.api.enums.Status.QUERY_PROCESS_DEFINITION_LIST;
import static org.apache.dolphinscheduler.api.enums.Status.UPDATE_TASK_DEFINITION_ERROR;
-import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.Parameter;
-import io.swagger.v3.oas.annotations.Parameters;
-import io.swagger.v3.oas.annotations.media.Schema;
-import io.swagger.v3.oas.annotations.tags.Tag;
import org.apache.dolphinscheduler.api.aspect.AccessLogAnnotation;
import org.apache.dolphinscheduler.api.dto.task.TaskCreateRequest;
import org.apache.dolphinscheduler.api.dto.task.TaskFilterRequest;
@@ -53,6 +48,12 @@
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Parameters;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.tags.Tag;
+
/**
* task definition controller
*/
@@ -90,7 +91,7 @@ public Result createTaskDefinition(@Parameter(hidden = true) @Re
*/
@Operation(summary = "delete", description = "DELETE_TASK_DEFINITION_VERSION_NOTES")
@Parameters({
- @Parameter(name = "code", description = "TASK_DEFINITION_CODE", schema =@Schema( implementation = long.class, example = "123456", required = true))
+ @Parameter(name = "code", description = "TASK_DEFINITION_CODE", schema = @Schema(implementation = long.class, example = "123456", required = true))
})
@DeleteMapping(value = "/{code}")
@ResponseStatus(HttpStatus.OK)
@@ -112,7 +113,7 @@ public Result deleteTaskDefinition(@Parameter(hidden = true) @RequestAttribute(v
*/
@Operation(summary = "update", description = "UPDATE_TASK_DEFINITION_NOTES")
@Parameters({
- @Parameter(name = "code", description = "TASK_DEFINITION_CODE", schema =@Schema( implementation = long.class, example = "123456", required = true))
+ @Parameter(name = "code", description = "TASK_DEFINITION_CODE", schema = @Schema(implementation = long.class, example = "123456", required = true))
})
@PutMapping(value = "/{code}")
@ResponseStatus(HttpStatus.OK)
@@ -135,7 +136,7 @@ public Result updateTaskDefinition(@Parameter(hidden = true) @Re
*/
@Operation(summary = "get", description = "GET_TASK_DEFINITION_NOTES")
@Parameters({
- @Parameter(name = "code", description = "TASK_DEFINITION_CODE", schema =@Schema( implementation = long.class, example = "123456", required = true))
+ @Parameter(name = "code", description = "TASK_DEFINITION_CODE", schema = @Schema(implementation = long.class, example = "123456", required = true))
})
@GetMapping(value = "/{code}")
@ResponseStatus(HttpStatus.OK)
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 7603c46779df..a1067968afcc 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
@@ -24,11 +24,6 @@
import static org.apache.dolphinscheduler.api.enums.Status.START_TASK_GROUP_ERROR;
import static org.apache.dolphinscheduler.api.enums.Status.UPDATE_TASK_GROUP_ERROR;
-import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.Parameter;
-import io.swagger.v3.oas.annotations.Parameters;
-import io.swagger.v3.oas.annotations.media.Schema;
-import io.swagger.v3.oas.annotations.tags.Tag;
import org.apache.dolphinscheduler.api.aspect.AccessLogAnnotation;
import org.apache.dolphinscheduler.api.exceptions.ApiException;
import org.apache.dolphinscheduler.api.service.TaskGroupQueueService;
@@ -49,6 +44,12 @@
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Parameters;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.tags.Tag;
+
/**
* task group controller
*/
@@ -72,10 +73,10 @@ public class TaskGroupController extends BaseController {
*/
@Operation(summary = "create", description = "CREATE_TASK_GROUP_NOTE")
@Parameters({
- @Parameter(name = "name", description = "NAME", schema =@Schema( implementation = String.class)),
- @Parameter(name = "projectCode", description = "PROJECT_CODE", schema =@Schema( implementation = long.class)),
- @Parameter(name = "description", description = "DESCRIPTION", schema =@Schema( implementation = String.class)),
- @Parameter(name = "groupSize", description = "GROUPSIZE", schema =@Schema( implementation = int.class)),
+ @Parameter(name = "name", description = "NAME", schema = @Schema(implementation = String.class)),
+ @Parameter(name = "projectCode", description = "PROJECT_CODE", schema = @Schema(implementation = long.class)),
+ @Parameter(name = "description", description = "DESCRIPTION", schema = @Schema(implementation = String.class)),
+ @Parameter(name = "groupSize", description = "GROUPSIZE", schema = @Schema(implementation = int.class)),
})
@PostMapping(value = "/create")
@@ -104,10 +105,10 @@ public Result createTaskGroup(@Parameter(hidden = true) @RequestAttribute(value
*/
@Operation(summary = "update", description = "UPDATE_TASK_GROUP_NOTE")
@Parameters({
- @Parameter(name = "id", description = "id", schema =@Schema( implementation = int.class)),
- @Parameter(name = "name", description = "NAME", schema =@Schema( implementation = String.class)),
- @Parameter(name = "description", description = "DESCRIPTION", schema =@Schema( implementation = String.class)),
- @Parameter(name = "groupSize", description = "GROUPSIZE", schema =@Schema( implementation = int.class)),
+ @Parameter(name = "id", description = "id", schema = @Schema(implementation = int.class)),
+ @Parameter(name = "name", description = "NAME", schema = @Schema(implementation = String.class)),
+ @Parameter(name = "description", description = "DESCRIPTION", schema = @Schema(implementation = String.class)),
+ @Parameter(name = "groupSize", description = "GROUPSIZE", schema = @Schema(implementation = int.class)),
})
@PostMapping(value = "/update")
@@ -133,9 +134,9 @@ public Result updateTaskGroup(@Parameter(hidden = true) @RequestAttribute(value
*/
@Operation(summary = "list-paging", description = "QUERY_ALL_TASK_GROUP_NOTES")
@Parameters({
- @Parameter(name = "pageNo", description = "PAGE_NO", required = true, schema =@Schema( implementation = int.class, example = "1")),
- @Parameter(name = "name", description = "NAME", required = false, schema =@Schema( implementation = String.class)),
- @Parameter(name = "pageSize", description = "PAGE_SIZE", required = true, schema =@Schema( implementation = int.class, example = "20"))
+ @Parameter(name = "pageNo", description = "PAGE_NO", required = true, schema = @Schema(implementation = int.class, example = "1")),
+ @Parameter(name = "name", description = "NAME", required = false, schema = @Schema(implementation = String.class)),
+ @Parameter(name = "pageSize", description = "PAGE_SIZE", required = true, schema = @Schema(implementation = int.class, example = "20"))
})
@GetMapping(value = "/list-paging")
@ResponseStatus(HttpStatus.OK)
@@ -161,9 +162,9 @@ public Result queryAllTaskGroup(@Parameter(hidden = true) @RequestAttribute(valu
*/
@Operation(summary = "queryTaskGroupByStatus", description = "QUERY_TASK_GROUP_LIST_BY_STATUS_NOTES")
@Parameters({
- @Parameter(name = "pageNo", description = "PAGE_NO", required = true, schema =@Schema( implementation = int.class, example = "1")),
- @Parameter(name = "pageSize", description = "PAGE_SIZE", required = true, schema =@Schema( implementation = int.class, example = "20")),
- @Parameter(name = "status", description = "status", required = true, schema =@Schema( implementation = int.class))
+ @Parameter(name = "pageNo", description = "PAGE_NO", required = true, schema = @Schema(implementation = int.class, example = "1")),
+ @Parameter(name = "pageSize", description = "PAGE_SIZE", required = true, schema = @Schema(implementation = int.class, example = "20")),
+ @Parameter(name = "status", description = "status", required = true, schema = @Schema(implementation = int.class))
})
@GetMapping(value = "/query-list-by-status")
@ResponseStatus(HttpStatus.OK)
@@ -188,9 +189,9 @@ public Result queryTaskGroupByStatus(@Parameter(hidden = true) @RequestAttribute
*/
@Operation(summary = "queryTaskGroupByName", description = "QUERY_TASK_GROUP_LIST_BY_PROJECT_ID_NOTES")
@Parameters({
- @Parameter(name = "pageNo", description = "PAGE_NO", required = true, schema =@Schema( implementation = int.class, example = "1")),
- @Parameter(name = "pageSize", description = "PAGE_SIZE", required = true, schema =@Schema( implementation = int.class, example = "20")),
- @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true, schema =@Schema( implementation = String.class))
+ @Parameter(name = "pageNo", description = "PAGE_NO", required = true, schema = @Schema(implementation = int.class, example = "1")),
+ @Parameter(name = "pageSize", description = "PAGE_SIZE", required = true, schema = @Schema(implementation = int.class, example = "20")),
+ @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true, schema = @Schema(implementation = String.class))
})
@GetMapping(value = "/query-list-by-projectCode")
@ResponseStatus(HttpStatus.OK)
@@ -214,7 +215,7 @@ public Result queryTaskGroupByCode(@Parameter(hidden = true) @RequestAttribute(v
*/
@Operation(summary = "closeTaskGroup", description = "CLOSE_TASK_GROUP_NOTES")
@Parameters({
- @Parameter(name = "id", description = "ID", required = true, schema =@Schema( implementation = int.class))
+ @Parameter(name = "id", description = "ID", required = true, schema = @Schema(implementation = int.class))
})
@PostMapping(value = "/close-task-group")
@ResponseStatus(HttpStatus.CREATED)
@@ -236,7 +237,7 @@ public Result closeTaskGroup(@Parameter(hidden = true) @RequestAttribute(value =
*/
@Operation(summary = "startTaskGroup", description = "START_TASK_GROUP_NOTES")
@Parameters({
- @Parameter(name = "id", description = "ID", required = true, schema =@Schema( implementation = int.class))
+ @Parameter(name = "id", description = "ID", required = true, schema = @Schema(implementation = int.class))
})
@PostMapping(value = "/start-task-group")
@ResponseStatus(HttpStatus.CREATED)
@@ -257,7 +258,7 @@ public Result startTaskGroup(@Parameter(hidden = true) @RequestAttribute(value =
*/
@Operation(summary = "forceStart", description = "WAKE_TASK_COMPULSIVELY_NOTES")
@Parameters({
- @Parameter(name = "queueId", description = "TASK_GROUP_QUEUEID", required = true, schema =@Schema( implementation = int.class))
+ @Parameter(name = "queueId", description = "TASK_GROUP_QUEUEID", required = true, schema = @Schema(implementation = int.class))
})
@PostMapping(value = "/forceStart")
@ResponseStatus(HttpStatus.CREATED)
@@ -278,8 +279,8 @@ public Result forceStart(@Parameter(hidden = true) @RequestAttribute(value = Con
*/
@Operation(summary = "modifyPriority", description = "WAKE_TASK_COMPULSIVELY_NOTES")
@Parameters({
- @Parameter(name = "queueId", description = "TASK_GROUP_QUEUEID", required = true, schema =@Schema( implementation = int.class)),
- @Parameter(name = "priority", description = "TASK_GROUP_QUEUE_PRIORITY", required = true, schema =@Schema( implementation = int.class))
+ @Parameter(name = "queueId", description = "TASK_GROUP_QUEUEID", required = true, schema = @Schema(implementation = int.class)),
+ @Parameter(name = "priority", description = "TASK_GROUP_QUEUE_PRIORITY", required = true, schema = @Schema(implementation = int.class))
})
@PostMapping(value = "/modifyPriority")
@ResponseStatus(HttpStatus.CREATED)
@@ -309,12 +310,12 @@ public Result modifyPriority(@Parameter(hidden = true) @RequestAttribute(value =
*/
@Operation(summary = "queryTasksByGroupId", description = "QUERY_ALL_TASKS_NOTES")
@Parameters({
- @Parameter(name = "groupId", description = "GROUP_ID", required = false, schema =@Schema( implementation = int.class, example = "1", defaultValue = "-1")),
- @Parameter(name = "taskInstanceName", description = "TASK_INSTANCE_NAME", required = false, schema =@Schema( implementation = String.class, example = "taskName")),
- @Parameter(name = "processInstanceName", description = "PROCESS_INSTANCE_NAME", required = false, schema =@Schema( implementation = String.class, example = "processName")),
- @Parameter(name = "status", description = "STATUS", required = false, schema =@Schema( implementation = int.class, example = "1")),
- @Parameter(name = "pageNo", description = "PAGE_NO", required = true, schema =@Schema( implementation = int.class, example = "1")),
- @Parameter(name = "pageSize", description = "PAGE_SIZE", required = true, schema =@Schema( implementation = int.class, example = "20"))
+ @Parameter(name = "groupId", description = "GROUP_ID", required = false, schema = @Schema(implementation = int.class, example = "1", defaultValue = "-1")),
+ @Parameter(name = "taskInstanceName", description = "TASK_INSTANCE_NAME", required = false, schema = @Schema(implementation = String.class, example = "taskName")),
+ @Parameter(name = "processInstanceName", description = "PROCESS_INSTANCE_NAME", required = false, schema = @Schema(implementation = String.class, example = "processName")),
+ @Parameter(name = "status", description = "STATUS", required = false, schema = @Schema(implementation = int.class, example = "1")),
+ @Parameter(name = "pageNo", description = "PAGE_NO", required = true, schema = @Schema(implementation = int.class, example = "1")),
+ @Parameter(name = "pageSize", description = "PAGE_SIZE", required = true, schema = @Schema(implementation = int.class, example = "20"))
})
@GetMapping(value = "/query-list-by-group-id")
@ResponseStatus(HttpStatus.OK)
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 698d47422814..f8c61a89be41 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
@@ -22,11 +22,6 @@
import static org.apache.dolphinscheduler.api.enums.Status.TASK_SAVEPOINT_ERROR;
import static org.apache.dolphinscheduler.api.enums.Status.TASK_STOP_ERROR;
-import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.Parameter;
-import io.swagger.v3.oas.annotations.Parameters;
-import io.swagger.v3.oas.annotations.media.Schema;
-import io.swagger.v3.oas.annotations.tags.Tag;
import org.apache.dolphinscheduler.api.aspect.AccessLogAnnotation;
import org.apache.dolphinscheduler.api.exceptions.ApiException;
import org.apache.dolphinscheduler.api.service.TaskInstanceService;
@@ -50,6 +45,12 @@
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Parameters;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.tags.Tag;
+
/**
* task instance controller
*/
@@ -80,18 +81,18 @@ public class TaskInstanceController extends BaseController {
*/
@Operation(summary = "queryTaskListPaging", description = "QUERY_TASK_INSTANCE_LIST_PAGING_NOTES")
@Parameters({
- @Parameter(name = "processInstanceId", description = "PROCESS_INSTANCE_ID", required = false, schema =@Schema( implementation = int.class, example = "100")),
- @Parameter(name = "processInstanceName", description = "PROCESS_INSTANCE_NAME", required = false, schema =@Schema( implementation = String.class)),
- @Parameter(name = "searchVal", description = "SEARCH_VAL", schema =@Schema( implementation = String.class)),
- @Parameter(name = "taskName", description = "TASK_NAME", schema =@Schema( implementation = String.class)),
- @Parameter(name = "executorName", description = "EXECUTOR_NAME", schema =@Schema( implementation = String.class)),
- @Parameter(name = "stateType", description = "EXECUTION_STATUS", schema =@Schema( implementation = TaskExecutionStatus.class)),
- @Parameter(name = "host", description = "HOST", schema =@Schema( implementation = String.class)),
- @Parameter(name = "startDate", description = "START_DATE", schema =@Schema( implementation = String.class)),
- @Parameter(name = "endDate", description = "END_DATE", schema =@Schema( implementation = String.class)),
- @Parameter(name = "taskExecuteType", description = "TASK_EXECUTE_TYPE", required = false, schema =@Schema( implementation = TaskExecuteType.class, example = "STREAM")),
- @Parameter(name = "pageNo", description = "PAGE_NO", required = true, schema =@Schema( implementation = int.class, example = "1")),
- @Parameter(name = "pageSize", description = "PAGE_SIZE", required = true, schema =@Schema( implementation = int.class, example = "20")),
+ @Parameter(name = "processInstanceId", description = "PROCESS_INSTANCE_ID", required = false, schema = @Schema(implementation = int.class, example = "100")),
+ @Parameter(name = "processInstanceName", description = "PROCESS_INSTANCE_NAME", required = false, schema = @Schema(implementation = String.class)),
+ @Parameter(name = "searchVal", description = "SEARCH_VAL", schema = @Schema(implementation = String.class)),
+ @Parameter(name = "taskName", description = "TASK_NAME", schema = @Schema(implementation = String.class)),
+ @Parameter(name = "executorName", description = "EXECUTOR_NAME", schema = @Schema(implementation = String.class)),
+ @Parameter(name = "stateType", description = "EXECUTION_STATUS", schema = @Schema(implementation = TaskExecutionStatus.class)),
+ @Parameter(name = "host", description = "HOST", schema = @Schema(implementation = String.class)),
+ @Parameter(name = "startDate", description = "START_DATE", schema = @Schema(implementation = String.class)),
+ @Parameter(name = "endDate", description = "END_DATE", schema = @Schema(implementation = String.class)),
+ @Parameter(name = "taskExecuteType", description = "TASK_EXECUTE_TYPE", required = false, schema = @Schema(implementation = TaskExecuteType.class, example = "STREAM")),
+ @Parameter(name = "pageNo", description = "PAGE_NO", required = true, schema = @Schema(implementation = int.class, example = "1")),
+ @Parameter(name = "pageSize", description = "PAGE_SIZE", required = true, schema = @Schema(implementation = int.class, example = "20")),
})
@GetMapping()
@ResponseStatus(HttpStatus.OK)
@@ -134,7 +135,7 @@ public Result queryTaskListPaging(@Parameter(hidden = true) @RequestAttribute(va
*/
@Operation(summary = "force-success", description = "FORCE_TASK_SUCCESS")
@Parameters({
- @Parameter(name = "id", description = "TASK_INSTANCE_ID", required = true, schema =@Schema( implementation = int.class, example = "12"))
+ @Parameter(name = "id", description = "TASK_INSTANCE_ID", required = true, schema = @Schema(implementation = int.class, example = "12"))
})
@PostMapping(value = "/{id}/force-success")
@ResponseStatus(HttpStatus.OK)
@@ -157,7 +158,7 @@ public Result forceTaskSuccess(@Parameter(hidden = true) @RequestAttribu
*/
@Operation(summary = "savepoint", description = "TASK_SAVEPOINT")
@Parameters({
- @Parameter(name = "id", description = "TASK_INSTANCE_ID", required = true, schema =@Schema( implementation = int.class, example = "12"))
+ @Parameter(name = "id", description = "TASK_INSTANCE_ID", required = true, schema = @Schema(implementation = int.class, example = "12"))
})
@PostMapping(value = "/{id}/savepoint")
@ResponseStatus(HttpStatus.OK)
@@ -179,7 +180,7 @@ public Result taskSavePoint(@Parameter(hidden = true) @RequestAttribute(
*/
@Operation(summary = "stop", description = "TASK_STOP")
@Parameters({
- @Parameter(name = "id", description = "TASK_INSTANCE_ID", required = true, schema =@Schema( implementation = int.class, example = "12"))
+ @Parameter(name = "id", description = "TASK_INSTANCE_ID", required = true, schema = @Schema(implementation = int.class, example = "12"))
})
@PostMapping(value = "/{id}/stop")
@ResponseStatus(HttpStatus.OK)
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 2a087efd76d8..1fd5206cfe30 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
@@ -24,11 +24,6 @@
import static org.apache.dolphinscheduler.api.enums.Status.UPDATE_TENANT_ERROR;
import static org.apache.dolphinscheduler.api.enums.Status.VERIFY_OS_TENANT_CODE_ERROR;
-import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.Parameter;
-import io.swagger.v3.oas.annotations.Parameters;
-import io.swagger.v3.oas.annotations.media.Schema;
-import io.swagger.v3.oas.annotations.tags.Tag;
import org.apache.dolphinscheduler.api.aspect.AccessLogAnnotation;
import org.apache.dolphinscheduler.api.exceptions.ApiException;
import org.apache.dolphinscheduler.api.service.TenantService;
@@ -52,6 +47,12 @@
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Parameters;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.tags.Tag;
+
/**
* tenant controller
*/
@@ -74,9 +75,9 @@ public class TenantController extends BaseController {
*/
@Operation(summary = "createTenant", description = "CREATE_TENANT_NOTES")
@Parameters({
- @Parameter(name = "tenantCode", description = "TENANT_CODE", required = true, schema =@Schema( implementation = String.class)),
- @Parameter(name = "queueId", description = "QUEUE_ID", required = true, schema =@Schema( implementation = int.class, example = "100")),
- @Parameter(name = "description", description = "TENANT_DESC", schema =@Schema( implementation = String.class))
+ @Parameter(name = "tenantCode", description = "TENANT_CODE", required = true, schema = @Schema(implementation = String.class)),
+ @Parameter(name = "queueId", description = "QUEUE_ID", required = true, schema = @Schema(implementation = int.class, example = "100")),
+ @Parameter(name = "description", description = "TENANT_DESC", schema = @Schema(implementation = String.class))
})
@PostMapping()
@ResponseStatus(HttpStatus.CREATED)
@@ -102,9 +103,9 @@ public Result createTenant(@Parameter(hidden = true) @RequestAttribute(value = C
*/
@Operation(summary = "queryTenantlistPaging", description = "QUERY_TENANT_LIST_PAGING_NOTES")
@Parameters({
- @Parameter(name = "searchVal", description = "SEARCH_VAL", schema =@Schema( implementation = String.class)),
- @Parameter(name = "pageNo", description = "PAGE_NO", required = true, schema =@Schema( implementation = int.class, example = "1")),
- @Parameter(name = "pageSize", description = "PAGE_SIZE", required = true, schema =@Schema( implementation = int.class, example = "20"))
+ @Parameter(name = "searchVal", description = "SEARCH_VAL", schema = @Schema(implementation = String.class)),
+ @Parameter(name = "pageNo", description = "PAGE_NO", required = true, schema = @Schema(implementation = int.class, example = "1")),
+ @Parameter(name = "pageSize", description = "PAGE_SIZE", required = true, schema = @Schema(implementation = int.class, example = "20"))
})
@GetMapping()
@ResponseStatus(HttpStatus.OK)
@@ -152,10 +153,10 @@ public Result queryTenantlist(@Parameter(hidden = true) @RequestAttribute(value
*/
@Operation(summary = "updateTenant", description = "UPDATE_TENANT_NOTES")
@Parameters({
- @Parameter(name = "id", description = "TENANT_ID", required = true, schema =@Schema( implementation = int.class, example = "100")),
- @Parameter(name = "tenantCode", description = "TENANT_CODE", required = true, schema =@Schema( implementation = String.class)),
- @Parameter(name = "queueId", description = "QUEUE_ID", required = true, schema =@Schema( implementation = int.class, example = "100")),
- @Parameter(name = "description", description = "TENANT_DESC", schema =@Schema( implementation = String.class))
+ @Parameter(name = "id", description = "TENANT_ID", required = true, schema = @Schema(implementation = int.class, example = "100")),
+ @Parameter(name = "tenantCode", description = "TENANT_CODE", required = true, schema = @Schema(implementation = String.class)),
+ @Parameter(name = "queueId", description = "QUEUE_ID", required = true, schema = @Schema(implementation = int.class, example = "100")),
+ @Parameter(name = "description", description = "TENANT_DESC", schema = @Schema(implementation = String.class))
})
@PutMapping(value = "/{id}")
@ResponseStatus(HttpStatus.OK)
@@ -180,7 +181,7 @@ public Result updateTenant(@Parameter(hidden = true) @RequestAttribute(value = C
*/
@Operation(summary = "deleteTenantById", description = "DELETE_TENANT_NOTES")
@Parameters({
- @Parameter(name = "id", description = "TENANT_ID", required = true, schema =@Schema( implementation = int.class, example = "100"))
+ @Parameter(name = "id", description = "TENANT_ID", required = true, schema = @Schema(implementation = int.class, example = "100"))
})
@DeleteMapping(value = "/{id}")
@ResponseStatus(HttpStatus.OK)
@@ -201,7 +202,7 @@ public Result deleteTenantById(@Parameter(hidden = true) @RequestAttribute(value
*/
@Operation(summary = "verifyTenantCode", description = "VERIFY_TENANT_CODE_NOTES")
@Parameters({
- @Parameter(name = "tenantCode", description = "TENANT_CODE", required = true, schema =@Schema( implementation = String.class))
+ @Parameter(name = "tenantCode", description = "TENANT_CODE", required = true, schema = @Schema(implementation = 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 24e6731de9d2..8b6dd9d161ea 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
@@ -19,11 +19,6 @@
import static org.apache.dolphinscheduler.api.enums.Status.QUERY_PLUGINS_ERROR;
-import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.Parameter;
-import io.swagger.v3.oas.annotations.Parameters;
-import io.swagger.v3.oas.annotations.media.Schema;
-import io.swagger.v3.oas.annotations.tags.Tag;
import org.apache.dolphinscheduler.api.aspect.AccessLogAnnotation;
import org.apache.dolphinscheduler.api.exceptions.ApiException;
import org.apache.dolphinscheduler.api.service.UiPluginService;
@@ -44,6 +39,12 @@
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Parameters;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.tags.Tag;
+
/**
* ui plugin controller
* Some plugins (such as alert plugin) need to provide UI interfaces to users.
@@ -60,7 +61,7 @@ public class UiPluginController extends BaseController {
@Operation(summary = "queryUiPluginsByType", description = "QUERY_UI_PLUGINS_BY_TYPE")
@Parameters({
- @Parameter(name = "pluginType", description = "pluginType", required = true, schema =@Schema( implementation = PluginType.class)),
+ @Parameter(name = "pluginType", description = "pluginType", required = true, schema = @Schema(implementation = PluginType.class)),
})
@GetMapping(value = "/query-by-type")
@ResponseStatus(HttpStatus.CREATED)
@@ -75,7 +76,7 @@ public Result queryUiPluginsByType(@Parameter(hidden = true) @RequestAttribute(v
@Operation(summary = "queryUiPluginDetailById", description = "QUERY_UI_PLUGIN_DETAIL_BY_ID")
@Parameters({
- @Parameter(name = "id", description = "PLUGIN_ID", required = true, schema =@Schema( implementation = int.class, example = "100")),
+ @Parameter(name = "id", description = "PLUGIN_ID", required = true, schema = @Schema(implementation = 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 0200993c989d..206c6438456f 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
@@ -33,11 +33,6 @@
import static org.apache.dolphinscheduler.api.enums.Status.USER_LIST_ERROR;
import static org.apache.dolphinscheduler.api.enums.Status.VERIFY_USERNAME_ERROR;
-import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.Parameter;
-import io.swagger.v3.oas.annotations.Parameters;
-import io.swagger.v3.oas.annotations.media.Schema;
-import io.swagger.v3.oas.annotations.tags.Tag;
import org.apache.dolphinscheduler.api.aspect.AccessLogAnnotation;
import org.apache.dolphinscheduler.api.enums.Status;
import org.apache.dolphinscheduler.api.exceptions.ApiException;
@@ -64,6 +59,12 @@
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Parameters;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.tags.Tag;
+
/**
* users controller
*/
@@ -91,13 +92,13 @@ public class UsersController extends BaseController {
*/
@Operation(summary = "createUser", description = "CREATE_USER_NOTES")
@Parameters({
- @Parameter(name = "userName", description = "USER_NAME", required = true, schema =@Schema( implementation = String.class)),
- @Parameter(name = "userPassword", description = "USER_PASSWORD", required = true, schema =@Schema( implementation = String.class)),
- @Parameter(name = "tenantId", description = "TENANT_ID", required = true, schema =@Schema( implementation = int.class, example = "100")),
- @Parameter(name = "queue", description = "QUEUE", schema =@Schema( implementation = String.class)),
- @Parameter(name = "email", description = "EMAIL", required = true, schema =@Schema( implementation = String.class)),
- @Parameter(name = "phone", description = "PHONE", schema =@Schema( implementation = String.class)),
- @Parameter(name = "state", description = "STATE", schema =@Schema( implementation = int.class, example = "1"))
+ @Parameter(name = "userName", description = "USER_NAME", required = true, schema = @Schema(implementation = String.class)),
+ @Parameter(name = "userPassword", description = "USER_PASSWORD", required = true, schema = @Schema(implementation = String.class)),
+ @Parameter(name = "tenantId", description = "TENANT_ID", required = true, schema = @Schema(implementation = int.class, example = "100")),
+ @Parameter(name = "queue", description = "QUEUE", schema = @Schema(implementation = String.class)),
+ @Parameter(name = "email", description = "EMAIL", required = true, schema = @Schema(implementation = String.class)),
+ @Parameter(name = "phone", description = "PHONE", schema = @Schema(implementation = String.class)),
+ @Parameter(name = "state", description = "STATE", schema = @Schema(implementation = int.class, example = "1"))
})
@PostMapping(value = "/create")
@ResponseStatus(HttpStatus.CREATED)
@@ -127,9 +128,9 @@ public Result createUser(@Parameter(hidden = true) @RequestAttribute(value = Con
*/
@Operation(summary = "queryUserList", description = "QUERY_USER_LIST_NOTES")
@Parameters({
- @Parameter(name = "pageNo", description = "PAGE_NO", required = true, schema =@Schema( implementation = int.class, example = "1")),
- @Parameter(name = "pageSize", description = "PAGE_SIZE", required = true, schema =@Schema( implementation = int.class, example = "10")),
- @Parameter(name = "searchVal", description = "SEARCH_VAL", schema =@Schema( implementation = String.class))
+ @Parameter(name = "pageNo", description = "PAGE_NO", required = true, schema = @Schema(implementation = int.class, example = "1")),
+ @Parameter(name = "pageSize", description = "PAGE_SIZE", required = true, schema = @Schema(implementation = int.class, example = "10")),
+ @Parameter(name = "searchVal", description = "SEARCH_VAL", schema = @Schema(implementation = String.class))
})
@GetMapping(value = "/list-paging")
@ResponseStatus(HttpStatus.OK)
@@ -164,14 +165,14 @@ public Result queryUserList(@Parameter(hidden = true) @RequestAttribute(value =
*/
@Operation(summary = "updateUser", description = "UPDATE_USER_NOTES")
@Parameters({
- @Parameter(name = "id", description = "USER_ID", required = true, schema =@Schema( implementation = int.class, example = "100")),
- @Parameter(name = "userName", description = "USER_NAME", required = true, schema =@Schema( implementation = String.class)),
- @Parameter(name = "userPassword", description = "USER_PASSWORD", required = true, schema =@Schema( implementation = String.class)),
- @Parameter(name = "tenantId", description = "TENANT_ID", required = true, schema =@Schema( implementation = int.class, example = "100")),
- @Parameter(name = "queue", description = "QUEUE", schema =@Schema( implementation = String.class)),
- @Parameter(name = "email", description = "EMAIL", required = true, schema =@Schema( implementation = String.class)),
- @Parameter(name = "phone", description = "PHONE", schema =@Schema( implementation = String.class)),
- @Parameter(name = "state", description = "STATE", schema =@Schema( implementation = int.class, example = "1"))
+ @Parameter(name = "id", description = "USER_ID", required = true, schema = @Schema(implementation = int.class, example = "100")),
+ @Parameter(name = "userName", description = "USER_NAME", required = true, schema = @Schema(implementation = String.class)),
+ @Parameter(name = "userPassword", description = "USER_PASSWORD", required = true, schema = @Schema(implementation = String.class)),
+ @Parameter(name = "tenantId", description = "TENANT_ID", required = true, schema = @Schema(implementation = int.class, example = "100")),
+ @Parameter(name = "queue", description = "QUEUE", schema = @Schema(implementation = String.class)),
+ @Parameter(name = "email", description = "EMAIL", required = true, schema = @Schema(implementation = String.class)),
+ @Parameter(name = "phone", description = "PHONE", schema = @Schema(implementation = String.class)),
+ @Parameter(name = "state", description = "STATE", schema = @Schema(implementation = int.class, example = "1"))
})
@PostMapping(value = "/update")
@ResponseStatus(HttpStatus.OK)
@@ -201,7 +202,7 @@ public Result updateUser(@Parameter(hidden = true) @RequestAttribute(value = Con
*/
@Operation(summary = "delUserById", description = "DELETE_USER_BY_ID_NOTES")
@Parameters({
- @Parameter(name = "id", description = "USER_ID", required = true, schema =@Schema( implementation = int.class, example = "100"))
+ @Parameter(name = "id", description = "USER_ID", required = true, schema = @Schema(implementation = int.class, example = "100"))
})
@PostMapping(value = "/delete")
@ResponseStatus(HttpStatus.OK)
@@ -223,8 +224,8 @@ public Result delUserById(@Parameter(hidden = true) @RequestAttribute(value = Co
*/
@Operation(summary = "grantProject", description = "GRANT_PROJECT_NOTES")
@Parameters({
- @Parameter(name = "userId", description = "USER_ID", required = true, schema =@Schema( implementation = int.class, example = "100")),
- @Parameter(name = "projectIds", description = "PROJECT_IDS", required = true, schema =@Schema( implementation = String.class))
+ @Parameter(name = "userId", description = "USER_ID", required = true, schema = @Schema(implementation = int.class, example = "100")),
+ @Parameter(name = "projectIds", description = "PROJECT_IDS", required = true, schema = @Schema(implementation = String.class))
})
@PostMapping(value = "/grant-project")
@ResponseStatus(HttpStatus.OK)
@@ -247,8 +248,8 @@ public Result grantProject(@Parameter(hidden = true) @RequestAttribute(value = C
*/
@Operation(summary = "grantProjectByCode", description = "GRANT_PROJECT_BY_CODE_NOTES")
@Parameters({
- @Parameter(name = "userId", description = "USER_ID", required = true, schema =@Schema( implementation = int.class, example = "100")),
- @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true, schema =@Schema( implementation = long.class))
+ @Parameter(name = "userId", description = "USER_ID", required = true, schema = @Schema(implementation = int.class, example = "100")),
+ @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true, schema = @Schema(implementation = long.class))
})
@PostMapping(value = "/grant-project-by-code")
@ResponseStatus(HttpStatus.OK)
@@ -271,8 +272,8 @@ public Result grantProjectByCode(@Parameter(hidden = true) @RequestAttribute(val
*/
@Operation(summary = "revokeProject", description = "REVOKE_PROJECT_NOTES")
@Parameters({
- @Parameter(name = "userId", description = "USER_ID", required = true, schema =@Schema( implementation = int.class, example = "100")),
- @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true, schema =@Schema( implementation = long.class, example = "100"))
+ @Parameter(name = "userId", description = "USER_ID", required = true, schema = @Schema(implementation = int.class, example = "100")),
+ @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true, schema = @Schema(implementation = long.class, example = "100"))
})
@PostMapping(value = "/revoke-project")
@ResponseStatus(HttpStatus.OK)
@@ -295,8 +296,8 @@ public Result revokeProject(@Parameter(hidden = true) @RequestAttribute(value =
*/
@Operation(summary = "grantResource", description = "GRANT_RESOURCE_NOTES")
@Parameters({
- @Parameter(name = "userId", description = "USER_ID", required = true, schema =@Schema( implementation = int.class, example = "100")),
- @Parameter(name = "resourceIds", description = "RESOURCE_IDS", required = true, schema =@Schema( implementation = String.class))
+ @Parameter(name = "userId", description = "USER_ID", required = true, schema = @Schema(implementation = int.class, example = "100")),
+ @Parameter(name = "resourceIds", description = "RESOURCE_IDS", required = true, schema = @Schema(implementation = String.class))
})
@PostMapping(value = "/grant-file")
@ResponseStatus(HttpStatus.OK)
@@ -319,8 +320,8 @@ public Result grantResource(@Parameter(hidden = true) @RequestAttribute(value =
*/
@Operation(summary = "grantUDFFunc", description = "GRANT_UDF_FUNC_NOTES")
@Parameters({
- @Parameter(name = "userId", description = "USER_ID", required = true, schema =@Schema( implementation = int.class, example = "100")),
- @Parameter(name = "udfIds", description = "UDF_IDS", required = true, schema =@Schema( implementation = String.class))
+ @Parameter(name = "userId", description = "USER_ID", required = true, schema = @Schema(implementation = int.class, example = "100")),
+ @Parameter(name = "udfIds", description = "UDF_IDS", required = true, schema = @Schema(implementation = String.class))
})
@PostMapping(value = "/grant-udf-func")
@ResponseStatus(HttpStatus.OK)
@@ -343,8 +344,8 @@ public Result grantUDFFunc(@Parameter(hidden = true) @RequestAttribute(value = C
*/
@Operation(summary = "grantNamespace", description = "GRANT_NAMESPACE_NOTES")
@Parameters({
- @Parameter(name = "userId", description = "USER_ID", required = true, schema =@Schema( implementation = int.class, example = "100")),
- @Parameter(name = "namespaceIds", description = "NAMESPACE_IDS", required = true, schema =@Schema( implementation = String.class))
+ @Parameter(name = "userId", description = "USER_ID", required = true, schema = @Schema(implementation = int.class, example = "100")),
+ @Parameter(name = "namespaceIds", description = "NAMESPACE_IDS", required = true, schema = @Schema(implementation = String.class))
})
@PostMapping(value = "/grant-namespace")
@ResponseStatus(HttpStatus.OK)
@@ -367,8 +368,8 @@ public Result grantNamespace(@Parameter(hidden = true) @RequestAttribute(value =
*/
@Operation(summary = "grantDataSource", description = "GRANT_DATASOURCE_NOTES")
@Parameters({
- @Parameter(name = "userId", description = "USER_ID", required = true, schema =@Schema( implementation = int.class, example = "100")),
- @Parameter(name = "datasourceIds", description = "DATASOURCE_IDS", required = true, schema =@Schema( implementation = String.class))
+ @Parameter(name = "userId", description = "USER_ID", required = true, schema = @Schema(implementation = int.class, example = "100")),
+ @Parameter(name = "datasourceIds", description = "DATASOURCE_IDS", required = true, schema = @Schema(implementation = String.class))
})
@PostMapping(value = "/grant-datasource")
@ResponseStatus(HttpStatus.OK)
@@ -437,7 +438,7 @@ public Result listAll(@RequestAttribute(value = Constants.SESSION_USER) User log
*/
@Operation(summary = "verifyUserName", description = "VERIFY_USER_NAME_NOTES")
@Parameters({
- @Parameter(name = "userName", description = "USER_NAME", required = true, schema =@Schema( implementation = String.class))
+ @Parameter(name = "userName", description = "USER_NAME", required = true, schema = @Schema(implementation = String.class))
})
@GetMapping(value = "/verify-user-name")
@ResponseStatus(HttpStatus.OK)
@@ -457,7 +458,7 @@ public Result verifyUserName(@Parameter(hidden = true) @RequestAttribute(value =
*/
@Operation(summary = "unauthorizedUser", description = "UNAUTHORIZED_USER_NOTES")
@Parameters({
- @Parameter(name = "alertgroupId", description = "ALERT_GROUP_ID", required = true, schema =@Schema( implementation = String.class))
+ @Parameter(name = "alertgroupId", description = "ALERT_GROUP_ID", required = true, schema = @Schema(implementation = String.class))
})
@GetMapping(value = "/unauth-user")
@ResponseStatus(HttpStatus.OK)
@@ -478,7 +479,7 @@ public Result unauthorizedUser(@Parameter(hidden = true) @RequestAttribute(value
*/
@Operation(summary = "authorizedUser", description = "AUTHORIZED_USER_NOTES")
@Parameters({
- @Parameter(name = "alertgroupId", description = "ALERT_GROUP_ID", required = true, schema =@Schema( implementation = String.class))
+ @Parameter(name = "alertgroupId", description = "ALERT_GROUP_ID", required = true, schema = @Schema(implementation = String.class))
})
@GetMapping(value = "/authed-user")
@ResponseStatus(HttpStatus.OK)
@@ -505,10 +506,10 @@ public Result authorizedUser(@Parameter(hidden = true) @RequestAttribute(value =
*/
@Operation(summary = "registerUser", description = "REGISTER_USER_NOTES")
@Parameters({
- @Parameter(name = "userName", description = "USER_NAME", required = true, schema =@Schema( implementation = String.class)),
- @Parameter(name = "userPassword", description = "USER_PASSWORD", required = true, schema =@Schema( implementation = String.class)),
- @Parameter(name = "repeatPassword", description = "REPEAT_PASSWORD", required = true, schema =@Schema( implementation = String.class)),
- @Parameter(name = "email", description = "EMAIL", required = true, schema =@Schema( implementation = String.class)),
+ @Parameter(name = "userName", description = "USER_NAME", required = true, schema = @Schema(implementation = String.class)),
+ @Parameter(name = "userPassword", description = "USER_PASSWORD", required = true, schema = @Schema(implementation = String.class)),
+ @Parameter(name = "repeatPassword", description = "REPEAT_PASSWORD", required = true, schema = @Schema(implementation = String.class)),
+ @Parameter(name = "email", description = "EMAIL", required = true, schema = @Schema(implementation = String.class)),
})
@PostMapping("/register")
@ResponseStatus(HttpStatus.OK)
@@ -533,7 +534,7 @@ public Result registerUser(@RequestParam(value = "userName") String user
*/
@Operation(summary = "activateUser", description = "ACTIVATE_USER_NOTES")
@Parameters({
- @Parameter(name = "userName", description = "USER_NAME", schema =@Schema( implementation = String.class)),
+ @Parameter(name = "userName", description = "USER_NAME", schema = @Schema(implementation = String.class)),
})
@PostMapping("/activate")
@ResponseStatus(HttpStatus.OK)
@@ -553,7 +554,7 @@ public Result activateUser(@Parameter(hidden = true) @RequestAttribute(v
*/
@Operation(summary = "batchActivateUser", description = "BATCH_ACTIVATE_USER_NOTES")
@Parameters({
- @Parameter(name = "userNames", description = "USER_NAMES", required = true, schema =@Schema( implementation = List.class)),
+ @Parameter(name = "userNames", description = "USER_NAMES", required = true, schema = @Schema(implementation = List.class)),
})
@PostMapping("/batch/activate")
@ResponseStatus(HttpStatus.OK)
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 e3c836278464..e3ab8bb1e795 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
@@ -21,11 +21,6 @@
import static org.apache.dolphinscheduler.api.enums.Status.TASK_WITH_DEPENDENT_ERROR;
import static org.apache.dolphinscheduler.common.Constants.SESSION_USER;
-import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.Parameter;
-import io.swagger.v3.oas.annotations.Parameters;
-import io.swagger.v3.oas.annotations.media.Schema;
-import io.swagger.v3.oas.annotations.tags.Tag;
import org.apache.dolphinscheduler.api.aspect.AccessLogAnnotation;
import org.apache.dolphinscheduler.api.enums.Status;
import org.apache.dolphinscheduler.api.exceptions.ApiException;
@@ -54,6 +49,12 @@
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Parameters;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.tags.Tag;
+
/**
* work flow lineage controller
*/
@@ -126,9 +127,9 @@ public Result