Skip to content
Merged

1808 #1811

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,9 @@ const ConnectionDialog = ({
() =>
connectionDefinition && connectionDefinition.authorizations
? [
...(connectionDefinition.authorizationRequired === false ? [{label: 'None', value: 'none'}] : []),
...(connectionDefinition.authorizationRequired === false
? [{label: 'None', value: undefined}]
: []),
...connectionDefinition.authorizations.map((authorization) => ({
label: authorization?.title as string,
value: authorization.name as string,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ export const AuthorizationType = {
BearerToken: 'BEARER_TOKEN',
Custom: 'CUSTOM',
DigestAuth: 'DIGEST_AUTH',
None: 'NONE',
Oauth2AuthorizationCode: 'OAUTH2_AUTHORIZATION_CODE',
Oauth2AuthorizationCodePkce: 'OAUTH2_AUTHORIZATION_CODE_PKCE',
Oauth2ClientCredentials: 'OAUTH2_CLIENT_CREDENTIALS',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,11 +161,6 @@ enum AuthorizationType {
*/
DIGEST_AUTH,

/**
* TODO Do we still need this type
*/
NONE,

/**
*
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ private static ApplyFunction getDefaultApply(AuthorizationType type) {
Authorization.AUTHORIZATION,
List.of(
Authorization.BEARER + " " + MapUtils.getString(connectionParameters, Authorization.TOKEN))));
case CUSTOM, NONE -> (Parameters connectionParameters, Context context) -> null;
case CUSTOM -> (Parameters connectionParameters, Context context) -> null;
case OAUTH2_AUTHORIZATION_CODE, OAUTH2_AUTHORIZATION_CODE_PKCE, OAUTH2_CLIENT_CREDENTIALS,
OAUTH2_IMPLICIT_CODE, OAUTH2_RESOURCE_OWNER_PASSWORD -> (
Parameters connectionParameters, Context context) -> ApplyResponse.ofHeaders(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,7 @@ public static boolean isApplicable(String value) {
for (Authorization.AuthorizationType authorizationType : Authorization.AuthorizationType.values()) {
String name = authorizationType.getName();

if ((authorizationType != Authorization.AuthorizationType.NONE) &&
Objects.equals(value.toLowerCase(), name.toLowerCase())) {

if (Objects.equals(value.toLowerCase(), name.toLowerCase())) {
return true;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ public void testCreateHTTPClient() {
new HashMap<>(), new HashMap<>(), Http.allowUnauthorizedCerts(true)
.build(),
"componentName", 1, "componentOperationName",
new ComponentConnection("componentName", 1, -1, Map.of(), Authorization.AuthorizationType.NONE.name()),
new ComponentConnection("componentName", 1, -1, Map.of(), null),
Mockito.mock(Context.class));

assertTrue(httpClient.authenticator()
Expand All @@ -235,7 +235,7 @@ public void testCreateHTTPClient() {

httpClientExecutor.createHttpClient(
headers, new HashMap<>(), configuration, "componentName", 1, "componentOperationName",
new ComponentConnection("componentName", 1, -1, Map.of(), Authorization.AuthorizationType.NONE.name()),
new ComponentConnection("componentName", 1, -1, Map.of(), null),
Mockito.mock(Context.class));

assertEquals(Map.of(Authorization.API_TOKEN, List.of("token_value")), headers);
Expand All @@ -256,7 +256,7 @@ public void testCreateHTTPClient() {

httpClientExecutor.createHttpClient(
new HashMap<>(), queryParameters, configuration, "componentName", 1, "componentOperationName",
new ComponentConnection("componentName", 1, -1, Map.of(), Authorization.AuthorizationType.NONE.name()),
new ComponentConnection("componentName", 1, -1, Map.of(), null),
Mockito.mock(Context.class));

assertEquals(Map.of(Authorization.API_TOKEN, List.of("token_value")), queryParameters);
Expand All @@ -274,7 +274,7 @@ public void testCreateHTTPClient() {

httpClientExecutor.createHttpClient(
headers, new HashMap<>(), configuration, "componentName", 1, "componentOperationName",
new ComponentConnection("componentName", 1, -1, Map.of(), Authorization.AuthorizationType.NONE.name()),
new ComponentConnection("componentName", 1, -1, Map.of(), null),
Mockito.mock(Context.class));

assertEquals(
Expand All @@ -297,7 +297,7 @@ public void testCreateHTTPClient() {

httpClientExecutor.createHttpClient(
headers, new HashMap<>(), configuration, "componentName", 1, "componentOperationName",
new ComponentConnection("componentName", 1, -1, Map.of(), Authorization.AuthorizationType.NONE.name()),
new ComponentConnection("componentName", 1, -1, Map.of(), null),
Mockito.mock(Context.class));

assertEquals(Map.of("Authorization", List.of("Bearer token")), headers);
Expand All @@ -317,7 +317,7 @@ public void testCreateHTTPClient() {

httpClientExecutor.createHttpClient(
headers, new HashMap<>(), configuration, "componentName", 1, "componentOperationName",
new ComponentConnection("componentName", 1, -1, Map.of(), Authorization.AuthorizationType.NONE.name()),
new ComponentConnection("componentName", 1, -1, Map.of(), null),
Mockito.mock(Context.class));

assertEquals(
Expand All @@ -339,7 +339,7 @@ public void testCreateHTTPClient() {

httpClientExecutor.createHttpClient(
headers, new HashMap<>(), configuration, "componentName", 1, "componentOperationName",
new ComponentConnection("componentName", 1, -1, Map.of(), Authorization.AuthorizationType.NONE.name()),
new ComponentConnection("componentName", 1, -1, Map.of(), null),
Mockito.mock(Context.class));

assertEquals(Map.of("Authorization", List.of("Bearer access_token")), headers);
Expand All @@ -350,7 +350,7 @@ public void testCreateHTTPClient() {
new HashMap<>(), new HashMap<>(), Http.followRedirect(true)
.build(),
"componentName", 1, "componentOperationName",
new ComponentConnection("componentName", 1, -1, Map.of(), Authorization.AuthorizationType.NONE.name()),
new ComponentConnection("componentName", 1, -1, Map.of(), null),
Mockito.mock(Context.class));

assertNotNull(httpClient.followRedirects());
Expand All @@ -361,7 +361,7 @@ public void testCreateHTTPClient() {
new HashMap<>(), new HashMap<>(), Http.followAllRedirects(true)
.build(),
"componentName", 1, "componentOperationName",
new ComponentConnection("componentName", 1, -1, Map.of(), Authorization.AuthorizationType.NONE.name()),
new ComponentConnection("componentName", 1, -1, Map.of(), null),
Mockito.mock(Context.class));

assertNotNull(httpClient.followRedirects());
Expand All @@ -372,7 +372,7 @@ public void testCreateHTTPClient() {
new HashMap<>(), new HashMap<>(), Http.proxy("10.11.12.13:30")
.build(),
"componentName", 1, "componentOperationName",
new ComponentConnection("componentName", 1, -1, Map.of(), Authorization.AuthorizationType.NONE.name()),
new ComponentConnection("componentName", 1, -1, Map.of(), null),
Mockito.mock(Context.class));

assertTrue(httpClient.proxy()
Expand All @@ -385,7 +385,7 @@ public void testCreateHTTPClient() {
.timeout(Duration.ofMillis(2000))
.build(),
"componentName", 1, "componentOperationName",
new ComponentConnection("componentName", 1, -1L, Map.of(), Authorization.AuthorizationType.NONE.name()),
new ComponentConnection("componentName", 1, -1L, Map.of(), null),
Mockito.mock(Context.class));

assertEquals(
Expand All @@ -398,7 +398,7 @@ public void testCreateHTTPRequest() {
HttpRequest httpRequest = httpClientExecutor.createHTTPRequest(
"http://localhost:8080", Http.RequestMethod.DELETE, Map.of("header1", List.of("value1")),
Map.of("param1", List.of("value1")), null, "componentName",
new ComponentConnection("componentName", 1, -1L, Map.of(), Authorization.AuthorizationType.NONE.name()),
new ComponentConnection("componentName", 1, -1L, Map.of(), null),
Mockito.mock(Context.class));

assertEquals(Http.RequestMethod.DELETE.name(), httpRequest.method());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,6 @@ private List<String> getRandomApplicableValues() {
List<String> names = new ArrayList<>();

for (Authorization.AuthorizationType value : values) {
if (value == Authorization.AuthorizationType.NONE) {
continue;
}

String name = value.getName();

if (RANDOM.nextBoolean()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
import java.util.Optional;
import jakarta.annotation.Generated;

@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-11-27T22:14:33.227249+01:00[Europe/Zagreb]", comments = "Generator version: 7.10.0")
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-11-30T08:22:07.952410+01:00[Europe/Zagreb]", comments = "Generator version: 7.10.0")
@Validated
@Tag(name = "action-definition", description = "The Platform Action Definition Internal API")
public interface ActionDefinitionApi {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
import java.util.Optional;
import jakarta.annotation.Generated;

@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-11-27T22:14:33.227249+01:00[Europe/Zagreb]", comments = "Generator version: 7.10.0")
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-11-30T08:22:07.952410+01:00[Europe/Zagreb]", comments = "Generator version: 7.10.0")
@Validated
@Tag(name = "component-definition", description = "The Platform Component Definition Internal API")
public interface ComponentDefinitionApi {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
import java.util.Optional;
import jakarta.annotation.Generated;

@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-11-27T22:14:33.227249+01:00[Europe/Zagreb]", comments = "Generator version: 7.10.0")
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-11-30T08:22:07.952410+01:00[Europe/Zagreb]", comments = "Generator version: 7.10.0")
@Validated
@Tag(name = "connection-definition", description = "The Platform Connection Definition Internal API")
public interface ConnectionDefinitionApi {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
import java.util.Optional;
import jakarta.annotation.Generated;

@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-11-27T22:14:33.227249+01:00[Europe/Zagreb]", comments = "Generator version: 7.10.0")
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-11-30T08:22:07.952410+01:00[Europe/Zagreb]", comments = "Generator version: 7.10.0")
@Validated
@Tag(name = "oauth2", description = "the oauth2 API")
public interface Oauth2Api {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
import java.util.Optional;
import jakarta.annotation.Generated;

@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-11-27T22:14:33.227249+01:00[Europe/Zagreb]", comments = "Generator version: 7.10.0")
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-11-30T08:22:07.952410+01:00[Europe/Zagreb]", comments = "Generator version: 7.10.0")
@Validated
@Tag(name = "task-dispatcher-definition", description = "The Platform Task Dispatcher Definition Internal API")
public interface TaskDispatcherDefinitionApi {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
import java.util.Optional;
import jakarta.annotation.Generated;

@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-11-27T22:14:33.227249+01:00[Europe/Zagreb]", comments = "Generator version: 7.10.0")
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-11-30T08:22:07.952410+01:00[Europe/Zagreb]", comments = "Generator version: 7.10.0")
@Validated
@Tag(name = "trigger-definition", description = "The Platform Trigger Definition Internal API")
public interface TriggerDefinitionApi {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
import java.util.Optional;
import jakarta.annotation.Generated;

@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-11-27T22:14:33.227249+01:00[Europe/Zagreb]", comments = "Generator version: 7.10.0")
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-11-30T08:22:07.952410+01:00[Europe/Zagreb]", comments = "Generator version: 7.10.0")
@Validated
@Tag(name = "workflow-node-description", description = "The Platform Workflow Node Description Internal API")
public interface WorkflowNodeDescriptionApi {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
import java.util.Optional;
import jakarta.annotation.Generated;

@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-11-27T22:14:33.227249+01:00[Europe/Zagreb]", comments = "Generator version: 7.10.0")
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-11-30T08:22:07.952410+01:00[Europe/Zagreb]", comments = "Generator version: 7.10.0")
@Validated
@Tag(name = "workflow-node-dynamic-properties", description = "The Platform Workflow Node Dynamic Properties Internal API")
public interface WorkflowNodeDynamicPropertiesApi {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
import java.util.Optional;
import jakarta.annotation.Generated;

@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-11-27T22:14:33.227249+01:00[Europe/Zagreb]", comments = "Generator version: 7.10.0")
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-11-30T08:22:07.952410+01:00[Europe/Zagreb]", comments = "Generator version: 7.10.0")
@Validated
@Tag(name = "workflow-node-option", description = "The Platform Workflow Node Option Internal API")
public interface WorkflowNodeOptionApi {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
import java.util.Optional;
import jakarta.annotation.Generated;

@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-11-27T22:14:33.227249+01:00[Europe/Zagreb]", comments = "Generator version: 7.10.0")
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-11-30T08:22:07.952410+01:00[Europe/Zagreb]", comments = "Generator version: 7.10.0")
@Validated
@Tag(name = "workflow-node-output", description = "The Platform Workflow Node Output Internal API")
public interface WorkflowNodeOutputApi {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
import java.util.Optional;
import jakarta.annotation.Generated;

@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-11-27T22:14:33.227249+01:00[Europe/Zagreb]", comments = "Generator version: 7.10.0")
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-11-30T08:22:07.952410+01:00[Europe/Zagreb]", comments = "Generator version: 7.10.0")
@Validated
@Tag(name = "workflow-node-parameter", description = "The Platform Workflow Node Parameter Internal API")
public interface WorkflowNodeParameterApi {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
import java.util.Optional;
import jakarta.annotation.Generated;

@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-11-27T22:14:33.227249+01:00[Europe/Zagreb]", comments = "Generator version: 7.10.0")
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-11-30T08:22:07.952410+01:00[Europe/Zagreb]", comments = "Generator version: 7.10.0")
@Validated
@Tag(name = "workflow-node-script", description = "The Platform Workflow Node Script Internal API")
public interface WorkflowNodeScriptApi {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
import java.util.Optional;
import jakarta.annotation.Generated;

@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-11-27T22:14:33.227249+01:00[Europe/Zagreb]", comments = "Generator version: 7.10.0")
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-11-30T08:22:07.952410+01:00[Europe/Zagreb]", comments = "Generator version: 7.10.0")
@Validated
@Tag(name = "workflow-node-test-output", description = "The Platform Workflow Node Test Output Internal API")
public interface WorkflowNodeTestOutputApi {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
import java.util.Optional;
import jakarta.annotation.Generated;

@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-11-27T22:14:33.227249+01:00[Europe/Zagreb]", comments = "Generator version: 7.10.0")
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-11-30T08:22:07.952410+01:00[Europe/Zagreb]", comments = "Generator version: 7.10.0")
@Validated
@Tag(name = "workflow-test-configuration", description = "The Platform Workflow Test Configuration Internal API")
public interface WorkflowTestConfigurationApi {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

@Schema(name = "ActionDefinitionBasic", description = "An action is a portion of reusable code that accomplish a specific task. When building a workflow, each action is represented as a task inside the workflow. The task 'type' property is defined as [component name]/v[component version]/[action name]. Action properties are used to set properties of the task inside the workflow.")
@JsonTypeName("ActionDefinitionBasic")
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-11-27T22:14:33.227249+01:00[Europe/Zagreb]", comments = "Generator version: 7.10.0")
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-11-30T08:22:07.952410+01:00[Europe/Zagreb]", comments = "Generator version: 7.10.0")
public class ActionDefinitionBasicModel {

private String description;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

@Schema(name = "ActionDefinition", description = "An action is a portion of reusable code that accomplish a specific task. When building a workflow, each action is represented as a task inside the workflow. The task 'type' property is defined as [component name]/v[component version]/[action name]. Action properties are used to set properties of the task inside the workflow.")
@JsonTypeName("ActionDefinition")
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-11-27T22:14:33.227249+01:00[Europe/Zagreb]", comments = "Generator version: 7.10.0")
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-11-30T08:22:07.952410+01:00[Europe/Zagreb]", comments = "Generator version: 7.10.0")
public class ActionDefinitionModel {

private String componentName;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

@Schema(name = "ArrayProperty", description = "An array property type.")

@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-11-27T22:14:33.227249+01:00[Europe/Zagreb]", comments = "Generator version: 7.10.0")
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-11-30T08:22:07.952410+01:00[Europe/Zagreb]", comments = "Generator version: 7.10.0")
public class ArrayPropertyModel extends ValuePropertyModel {

@Valid
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

@Schema(name = "Authorization", description = "Contains information required for a connection's authorization.")
@JsonTypeName("Authorization")
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-11-27T22:14:33.227249+01:00[Europe/Zagreb]", comments = "Generator version: 7.10.0")
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-11-30T08:22:07.952410+01:00[Europe/Zagreb]", comments = "Generator version: 7.10.0")
public class AuthorizationModel {

private String description;
Expand Down
Loading
Loading