diff --git a/app/integration/project-generator/src/test/java/io/syndesis/integration/project/generator/ProjectGeneratorTest.java b/app/integration/project-generator/src/test/java/io/syndesis/integration/project/generator/ProjectGeneratorTest.java index 64cf9112e73..cc6b9721712 100644 --- a/app/integration/project-generator/src/test/java/io/syndesis/integration/project/generator/ProjectGeneratorTest.java +++ b/app/integration/project-generator/src/test/java/io/syndesis/integration/project/generator/ProjectGeneratorTest.java @@ -15,12 +15,6 @@ */ package io.syndesis.integration.project.generator; -import static org.assertj.core.api.Assertions.assertThat; -import static org.assertj.core.api.Assertions.assertThatExceptionOfType; -import static org.assertj.core.api.Assertions.entry; -import static org.awaitility.Awaitility.await; -import static org.junit.Assert.assertEquals; - import java.io.BufferedOutputStream; import java.io.File; import java.io.FileOutputStream; @@ -42,20 +36,6 @@ import java.util.concurrent.TimeUnit; import java.util.stream.Stream; -import org.apache.commons.compress.archivers.tar.TarArchiveEntry; -import org.apache.commons.compress.archivers.tar.TarArchiveInputStream; -import org.apache.commons.io.IOUtils; -import org.apache.commons.lang3.StringUtils; -import org.json.JSONException; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.TemporaryFolder; -import org.junit.rules.TestName; -import org.junit.runner.RunWith; -import org.junit.runners.Parameterized; -import org.skyscreamer.jsonassert.JSONAssert; -import org.skyscreamer.jsonassert.JSONCompareMode; - import io.syndesis.common.model.DataShape; import io.syndesis.common.model.DataShapeKinds; import io.syndesis.common.model.Dependency; @@ -77,6 +57,25 @@ import io.syndesis.common.model.openapi.OpenApi; import io.syndesis.common.util.KeyGenerator; import io.syndesis.integration.api.IntegrationProjectGenerator; +import org.apache.commons.compress.archivers.tar.TarArchiveEntry; +import org.apache.commons.compress.archivers.tar.TarArchiveInputStream; +import org.apache.commons.io.IOUtils; +import org.apache.commons.lang3.StringUtils; +import org.json.JSONException; +import org.junit.Rule; +import org.junit.Test; +import org.junit.rules.TemporaryFolder; +import org.junit.rules.TestName; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.skyscreamer.jsonassert.JSONAssert; +import org.skyscreamer.jsonassert.JSONCompareMode; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThatExceptionOfType; +import static org.assertj.core.api.Assertions.entry; +import static org.awaitility.Awaitility.await; +import static org.junit.Assert.assertEquals; @SuppressWarnings({ "PMD.ExcessiveImports", "PMD.ExcessiveMethodLength" }) @RunWith(Parameterized.class) @@ -399,18 +398,96 @@ public void testGenerateApplicationPropertiesOldStyle() throws IOException { @Test - public void testGenerateApplicationWithRestDSL() throws Exception { + public void testGenerateApplicationWithOpenApiV2RestDSL() throws Exception { TestResourceManager resourceManager = new TestResourceManager(); // ****************** // OpenApi // ****************** - URL location = ProjectGeneratorTest.class.getResource("/petstore.json"); + URL location = ProjectGeneratorTest.class.getResource("/petstore-v2.json"); byte[] content = Files.readAllBytes(Paths.get(location.toURI())); resourceManager.put("petstore", new OpenApi.Builder().document(content).id("petstore").build()); + // ****************** + // Integration + // ****************** + + Step s1 = new Step.Builder() + .stepKind(StepKind.endpoint) + .action(new ConnectorAction.Builder() + .id(KeyGenerator.createKey()) + .descriptor(new ConnectorDescriptor.Builder() + .connectorId("new") + .componentScheme("direct") + .putConfiguredProperty("name", "start") + .build()) + .build()) + .connection(new Connection.Builder() + .connector( + new Connector.Builder() + .id("api-provider") + .addDependency(new Dependency.Builder() + .type(Dependency.Type.MAVEN) + .id("io.syndesis.connector:connector-api-provider:1.x.x") + .build()) + .build()) + .build()) + .build(); + Step s2 = new Step.Builder() + .stepKind(StepKind.endpoint) + .action(new ConnectorAction.Builder() + .id(KeyGenerator.createKey()) + .descriptor(new ConnectorDescriptor.Builder() + .connectorId("new") + .componentScheme("log") + .putConfiguredProperty("loggerName", "end") + .build()) + .build()) + .build(); + + Integration integration = new Integration.Builder() + .id("test-integration") + .name("Test Integration") + .description("This is a test integration!") + .addResource(new ResourceIdentifier.Builder() + .kind(Kind.OpenApi) + .id("petstore") + .build()) + .addFlow(new Flow.Builder() + .steps(Arrays.asList(s1, s2)) + .build()) + .build(); + + ProjectGeneratorConfiguration configuration = new ProjectGeneratorConfiguration(); + configuration.getTemplates().setOverridePath(this.basePath); + configuration.getTemplates().getAdditionalResources().addAll(this.additionalResources); + configuration.setSecretMaskingEnabled(true); + + Path runtimeDir = generate(integration, configuration, resourceManager); + + assertThat(runtimeDir.resolve("src/main/java/io/syndesis/example/Application.java")).exists(); + assertThat(runtimeDir.resolve("src/main/java/io/syndesis/example/RestRoute.java")).exists(); + assertThat(runtimeDir.resolve("src/main/java/io/syndesis/example/RestRouteConfiguration.java")).exists(); + + assertFileContents(configuration, runtimeDir.resolve("src/main/java/io/syndesis/example/RestRoute.java"), "RestRoute.java"); + assertFileContents(configuration, runtimeDir.resolve("src/main/java/io/syndesis/example/RestRouteConfiguration.java"), "RestRouteConfiguration.java"); + assertThat(errors).isEmpty(); + } + + @Test + public void testGenerateApplicationWithOpenApiV3RestDSL() throws Exception { + TestResourceManager resourceManager = new TestResourceManager(); + + // ****************** + // OpenApi + // ****************** + + URL location = ProjectGeneratorTest.class.getResource("/petstore-v3.json"); + byte[] content = Files.readAllBytes(Paths.get(location.toURI())); + + resourceManager.put("petstore", new OpenApi.Builder().document(content).id("petstore").build()); // ****************** // Integration diff --git a/app/integration/project-generator/src/test/resources/io/syndesis/integration/project/generator/testGenerateApplicationWithRestDSL/RestRoute.java b/app/integration/project-generator/src/test/resources/io/syndesis/integration/project/generator/testGenerateApplicationWithOpenApiV2RestDSL/RestRoute.java similarity index 100% rename from app/integration/project-generator/src/test/resources/io/syndesis/integration/project/generator/testGenerateApplicationWithRestDSL/RestRoute.java rename to app/integration/project-generator/src/test/resources/io/syndesis/integration/project/generator/testGenerateApplicationWithOpenApiV2RestDSL/RestRoute.java diff --git a/app/integration/project-generator/src/test/resources/io/syndesis/integration/project/generator/testGenerateApplicationWithRestDSL/RestRouteConfiguration.java b/app/integration/project-generator/src/test/resources/io/syndesis/integration/project/generator/testGenerateApplicationWithOpenApiV2RestDSL/RestRouteConfiguration.java similarity index 100% rename from app/integration/project-generator/src/test/resources/io/syndesis/integration/project/generator/testGenerateApplicationWithRestDSL/RestRouteConfiguration.java rename to app/integration/project-generator/src/test/resources/io/syndesis/integration/project/generator/testGenerateApplicationWithOpenApiV2RestDSL/RestRouteConfiguration.java diff --git a/app/integration/project-generator/src/test/resources/io/syndesis/integration/project/generator/testGenerateApplicationWithOpenApiV3RestDSL/RestRoute.java b/app/integration/project-generator/src/test/resources/io/syndesis/integration/project/generator/testGenerateApplicationWithOpenApiV3RestDSL/RestRoute.java new file mode 100644 index 00000000000..d4e9ce08620 --- /dev/null +++ b/app/integration/project-generator/src/test/resources/io/syndesis/integration/project/generator/testGenerateApplicationWithOpenApiV3RestDSL/RestRoute.java @@ -0,0 +1,277 @@ +package io.syndesis.example; + +import javax.annotation.Generated; +import org.apache.camel.builder.RouteBuilder; +import org.apache.camel.model.rest.CollectionFormat; +import org.apache.camel.model.rest.RestParamType; + +/** + * Generated from OpenApi specification by Camel REST DSL generator. + */ +@Generated("org.apache.camel.generator.openapi.AppendableGenerator") +public final class RestRoute extends RouteBuilder { + /** + * Defines Apache Camel routes using REST DSL fluent API. + */ + public void configure() { + rest("/v2") + .put("/pet") + .id("updatePet") + .consumes("application/json,application/xml") + .param() + .name("body") + .type(RestParamType.body) + .required(true) + .description("Pet object that needs to be added to the store") + .endParam() + .to("direct:updatePet") + .post("/pet") + .id("addPet") + .consumes("application/json,application/xml") + .param() + .name("body") + .type(RestParamType.body) + .required(true) + .description("Pet object that needs to be added to the store") + .endParam() + .to("direct:addPet") + .get("/pet/findByStatus") + .id("findPetsByStatus") + .description("Multiple status values can be provided with comma separated strings") + .produces("application/xml,application/json") + .param() + .name("status") + .type(RestParamType.query) + .dataType("array") + .collectionFormat(CollectionFormat.multi) + .arrayType("string") + .required(true) + .description("Status values that need to be considered for filter") + .endParam() + .to("direct:findPetsByStatus") + .get("/pet/findByTags") + .id("findPetsByTags") + .description("Muliple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.") + .produces("application/xml,application/json") + .param() + .name("tags") + .type(RestParamType.query) + .dataType("array") + .collectionFormat(CollectionFormat.multi) + .arrayType("string") + .required(true) + .description("Tags to filter by") + .endParam() + .to("direct:findPetsByTags") + .get("/pet/{petId}") + .id("getPetById") + .description("Returns a single pet") + .produces("application/xml,application/json") + .param() + .name("petId") + .type(RestParamType.path) + .dataType("integer") + .required(true) + .description("ID of pet to return") + .endParam() + .to("direct:getPetById") + .post("/pet/{petId}") + .id("updatePetWithForm") + .consumes("application/x-www-form-urlencoded") + .param() + .name("petId") + .type(RestParamType.path) + .dataType("integer") + .required(true) + .description("ID of pet that needs to be updated") + .endParam() + .param() + .name("name") + .type(RestParamType.formData) + .dataType("string") + .required(true) + .description("Updated name of the pet") + .endParam() + .param() + .name("status") + .type(RestParamType.formData) + .dataType("string") + .required(true) + .description("Updated status of the pet") + .endParam() + .to("direct:updatePetWithForm") + .delete("/pet/{petId}") + .id("deletePet") + .param() + .name("api_key") + .type(RestParamType.header) + .dataType("string") + .required(false) + .endParam() + .param() + .name("petId") + .type(RestParamType.path) + .dataType("integer") + .required(true) + .description("Pet id to delete") + .endParam() + .to("direct:deletePet") + .post("/pet/{petId}/uploadImage") + .id("uploadFile") + .consumes("multipart/form-data") + .produces("application/json") + .param() + .name("petId") + .type(RestParamType.path) + .dataType("integer") + .required(true) + .description("ID of pet to update") + .endParam() + .param() + .name("additionalMetadata") + .type(RestParamType.formData) + .dataType("string") + .required(true) + .description("Additional data to pass to server") + .endParam() + .param() + .name("file") + .type(RestParamType.formData) + .dataType("string") + .required(true) + .description("file to upload") + .endParam() + .to("direct:uploadFile") + .get("/store/inventory") + .id("getInventory") + .description("Returns a map of status codes to quantities") + .produces("application/json") + .to("direct:getInventory") + .post("/store/order") + .id("placeOrder") + .consumes("*/*") + .produces("application/xml,application/json") + .param() + .name("body") + .type(RestParamType.body) + .required(true) + .description("order placed for purchasing the pet") + .endParam() + .to("direct:placeOrder") + .get("/store/order/{orderId}") + .id("getOrderById") + .description("For valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions") + .produces("application/xml,application/json") + .param() + .name("orderId") + .type(RestParamType.path) + .dataType("integer") + .required(true) + .description("ID of pet that needs to be fetched") + .endParam() + .to("direct:getOrderById") + .delete("/store/order/{orderId}") + .id("deleteOrder") + .description("For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors") + .param() + .name("orderId") + .type(RestParamType.path) + .dataType("integer") + .required(true) + .description("ID of the order that needs to be deleted") + .endParam() + .to("direct:deleteOrder") + .post("/user") + .id("createUser") + .description("This can only be done by the logged in user.") + .consumes("*/*") + .param() + .name("body") + .type(RestParamType.body) + .required(true) + .description("Created user object") + .endParam() + .to("direct:createUser") + .post("/user/createWithArray") + .id("createUsersWithArrayInput") + .consumes("*/*") + .param() + .name("body") + .type(RestParamType.body) + .required(true) + .description("List of user object") + .endParam() + .to("direct:createUsersWithArrayInput") + .post("/user/createWithList") + .id("createUsersWithListInput") + .consumes("*/*") + .param() + .name("body") + .type(RestParamType.body) + .required(true) + .description("List of user object") + .endParam() + .to("direct:createUsersWithListInput") + .get("/user/login") + .id("loginUser") + .produces("application/xml,application/json") + .param() + .name("username") + .type(RestParamType.query) + .dataType("string") + .required(true) + .description("The user name for login") + .endParam() + .param() + .name("password") + .type(RestParamType.query) + .dataType("string") + .required(true) + .description("The password for login in clear text") + .endParam() + .to("direct:loginUser") + .get("/user/logout") + .id("logoutUser") + .to("direct:logoutUser") + .get("/user/{username}") + .id("getUserByName") + .produces("application/xml,application/json") + .param() + .name("username") + .type(RestParamType.path) + .dataType("string") + .required(true) + .description("The name that needs to be fetched. Use user1 for testing. ") + .endParam() + .to("direct:getUserByName") + .put("/user/{username}") + .id("updateUser") + .description("This can only be done by the logged in user.") + .consumes("*/*") + .param() + .name("username") + .type(RestParamType.path) + .dataType("string") + .required(true) + .description("name that need to be updated") + .endParam() + .param() + .name("body") + .type(RestParamType.body) + .required(true) + .description("Updated user object") + .endParam() + .to("direct:updateUser") + .delete("/user/{username}") + .id("deleteUser") + .description("This can only be done by the logged in user.") + .param() + .name("username") + .type(RestParamType.path) + .dataType("string") + .required(true) + .description("The name that needs to be deleted") + .endParam() + .to("direct:deleteUser"); + } +} diff --git a/app/integration/project-generator/src/test/resources/io/syndesis/integration/project/generator/testGenerateApplicationWithOpenApiV3RestDSL/RestRouteConfiguration.java b/app/integration/project-generator/src/test/resources/io/syndesis/integration/project/generator/testGenerateApplicationWithOpenApiV3RestDSL/RestRouteConfiguration.java new file mode 100644 index 00000000000..5b2da257212 --- /dev/null +++ b/app/integration/project-generator/src/test/resources/io/syndesis/integration/project/generator/testGenerateApplicationWithOpenApiV3RestDSL/RestRouteConfiguration.java @@ -0,0 +1,35 @@ +package io.syndesis.example; + +import org.apache.camel.Exchange; +import org.apache.camel.builder.RouteBuilder; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +@Configuration +public class RestRouteConfiguration { + + @Bean + public RouteBuilder specificationRoute() { + return new RouteBuilder() { + @Override + public void configure() throws Exception { + restConfiguration() + .contextPath("/") + .component("servlet") + .endpointProperty("headerFilterStrategy", "syndesisHeaderStrategy"); + + rest() + .get("/openapi.json") + .description("Returns the OpenAPI specification for this service") + .route() + .setHeader(Exchange.CONTENT_TYPE, constant("application/vnd.oai.openapi+json")) + .setBody(constant("resource:classpath:openapi.json")); + } + }; + } + + @Bean + public RouteBuilder restRoute() { + return new RestRoute(); + } +} diff --git a/app/integration/project-generator/src/test/resources/petstore.json b/app/integration/project-generator/src/test/resources/petstore-v2.json similarity index 100% rename from app/integration/project-generator/src/test/resources/petstore.json rename to app/integration/project-generator/src/test/resources/petstore-v2.json diff --git a/app/integration/project-generator/src/test/resources/petstore-v3.json b/app/integration/project-generator/src/test/resources/petstore-v3.json new file mode 100644 index 00000000000..4fe8871f037 --- /dev/null +++ b/app/integration/project-generator/src/test/resources/petstore-v3.json @@ -0,0 +1,1084 @@ +{ + "openapi": "3.0.2", + "info": { + "title": "Swagger Petstore", + "version": "1.0.0", + "description": "This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.", + "termsOfService": "http://swagger.io/terms/", + "contact": { + "email": "apiteam@swagger.io" + }, + "license": { + "name": "Apache 2.0", + "url": "http://www.apache.org/licenses/LICENSE-2.0.html" + } + }, + "servers": [ + { + "url": "http://petstore.swagger.io/v2" + } + ], + "paths": { + "/pet": { + "put": { + "requestBody": { + "description": "Pet object that needs to be added to the store", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Pet" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/Pet" + } + } + }, + "required": true + }, + "tags": [ + "pet" + ], + "responses": { + "400": { + "description": "Invalid ID supplied" + }, + "404": { + "description": "Pet not found" + }, + "405": { + "description": "Validation exception" + } + }, + "security": [ + { + "petstore_auth": [ + "write:pets", + "read:pets" + ] + } + ], + "operationId": "updatePet", + "summary": "Update an existing pet", + "description": "" + }, + "post": { + "requestBody": { + "description": "Pet object that needs to be added to the store", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Pet" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/Pet" + } + } + }, + "required": true + }, + "tags": [ + "pet" + ], + "responses": { + "405": { + "description": "Invalid input" + } + }, + "security": [ + { + "petstore_auth": [ + "write:pets", + "read:pets" + ] + } + ], + "operationId": "addPet", + "summary": "Add a new pet to the store", + "description": "" + } + }, + "/pet/findByStatus": { + "get": { + "tags": [ + "pet" + ], + "parameters": [ + { + "style": "form", + "explode": true, + "name": "status", + "description": "Status values that need to be considered for filter", + "schema": { + "type": "array", + "items": { + "default": "available", + "enum": [ + "available", + "pending", + "sold" + ], + "type": "string" + } + }, + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "content": { + "application/xml": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pet" + } + } + }, + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pet" + } + } + } + }, + "description": "successful operation" + }, + "400": { + "description": "Invalid status value" + } + }, + "security": [ + { + "petstore_auth": [ + "write:pets", + "read:pets" + ] + } + ], + "operationId": "findPetsByStatus", + "summary": "Finds Pets by status", + "description": "Multiple status values can be provided with comma separated strings" + } + }, + "/pet/findByTags": { + "get": { + "tags": [ + "pet" + ], + "parameters": [ + { + "style": "form", + "explode": true, + "name": "tags", + "description": "Tags to filter by", + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "content": { + "application/xml": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pet" + } + } + }, + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pet" + } + } + } + }, + "description": "successful operation" + }, + "400": { + "description": "Invalid tag value" + } + }, + "deprecated": true, + "security": [ + { + "petstore_auth": [ + "write:pets", + "read:pets" + ] + } + ], + "operationId": "findPetsByTags", + "summary": "Finds Pets by tags", + "description": "Muliple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing." + } + }, + "/pet/{petId}": { + "get": { + "tags": [ + "pet" + ], + "parameters": [ + { + "name": "petId", + "description": "ID of pet to return", + "schema": { + "format": "int64", + "type": "integer" + }, + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "content": { + "application/xml": { + "schema": { + "$ref": "#/components/schemas/Pet" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/Pet" + } + } + }, + "description": "successful operation" + }, + "400": { + "description": "Invalid ID supplied" + }, + "404": { + "description": "Pet not found" + } + }, + "security": [ + { + "api_key": [ + ] + } + ], + "operationId": "getPetById", + "summary": "Find pet by ID", + "description": "Returns a single pet" + }, + "post": { + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "Updated name of the pet", + "type": "string" + }, + "status": { + "description": "Updated status of the pet", + "type": "string" + } + } + } + } + }, + "required": true + }, + "tags": [ + "pet" + ], + "parameters": [ + { + "name": "petId", + "description": "ID of pet that needs to be updated", + "schema": { + "format": "int64", + "type": "integer" + }, + "in": "path", + "required": true + } + ], + "responses": { + "405": { + "description": "Invalid input" + } + }, + "security": [ + { + "petstore_auth": [ + "write:pets", + "read:pets" + ] + } + ], + "operationId": "updatePetWithForm", + "summary": "Updates a pet in the store with form data", + "description": "" + }, + "delete": { + "tags": [ + "pet" + ], + "parameters": [ + { + "name": "api_key", + "schema": { + "type": "string" + }, + "in": "header", + "required": false + }, + { + "name": "petId", + "description": "Pet id to delete", + "schema": { + "format": "int64", + "type": "integer" + }, + "in": "path", + "required": true + } + ], + "responses": { + "400": { + "description": "Invalid ID supplied" + }, + "404": { + "description": "Pet not found" + } + }, + "security": [ + { + "petstore_auth": [ + "write:pets", + "read:pets" + ] + } + ], + "operationId": "deletePet", + "summary": "Deletes a pet", + "description": "" + } + }, + "/pet/{petId}/uploadImage": { + "post": { + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "additionalMetadata": { + "description": "Additional data to pass to server", + "type": "string" + }, + "file": { + "format": "binary", + "description": "file to upload", + "type": "string" + } + } + } + } + }, + "required": true + }, + "tags": [ + "pet" + ], + "parameters": [ + { + "name": "petId", + "description": "ID of pet to update", + "schema": { + "format": "int64", + "type": "integer" + }, + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiResponse" + } + } + }, + "description": "successful operation" + } + }, + "security": [ + { + "petstore_auth": [ + "write:pets", + "read:pets" + ] + } + ], + "operationId": "uploadFile", + "summary": "uploads an image", + "description": "" + } + }, + "/store/inventory": { + "get": { + "tags": [ + "store" + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "format": "int32", + "type": "integer" + } + } + } + }, + "description": "successful operation" + } + }, + "security": [ + { + "api_key": [ + ] + } + ], + "operationId": "getInventory", + "summary": "Returns pet inventories by status", + "description": "Returns a map of status codes to quantities" + } + }, + "/store/order": { + "post": { + "requestBody": { + "description": "order placed for purchasing the pet", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/Order" + } + } + }, + "required": true + }, + "tags": [ + "store" + ], + "responses": { + "200": { + "content": { + "application/xml": { + "schema": { + "$ref": "#/components/schemas/Order" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/Order" + } + } + }, + "description": "successful operation" + }, + "400": { + "description": "Invalid Order" + } + }, + "operationId": "placeOrder", + "summary": "Place an order for a pet", + "description": "" + } + }, + "/store/order/{orderId}": { + "get": { + "tags": [ + "store" + ], + "parameters": [ + { + "name": "orderId", + "description": "ID of pet that needs to be fetched", + "schema": { + "format": "int64", + "maximum": 10, + "minimum": 1, + "type": "integer" + }, + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "content": { + "application/xml": { + "schema": { + "$ref": "#/components/schemas/Order" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/Order" + } + } + }, + "description": "successful operation" + }, + "400": { + "description": "Invalid ID supplied" + }, + "404": { + "description": "Order not found" + } + }, + "operationId": "getOrderById", + "summary": "Find purchase order by ID", + "description": "For valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions" + }, + "delete": { + "tags": [ + "store" + ], + "parameters": [ + { + "name": "orderId", + "description": "ID of the order that needs to be deleted", + "schema": { + "format": "int64", + "minimum": 1, + "type": "integer" + }, + "in": "path", + "required": true + } + ], + "responses": { + "400": { + "description": "Invalid ID supplied" + }, + "404": { + "description": "Order not found" + } + }, + "operationId": "deleteOrder", + "summary": "Delete purchase order by ID", + "description": "For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors" + } + }, + "/user": { + "post": { + "requestBody": { + "description": "Created user object", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/User" + } + } + }, + "required": true + }, + "tags": [ + "user" + ], + "responses": { + "default": { + "description": "successful operation" + } + }, + "operationId": "createUser", + "summary": "Create user", + "description": "This can only be done by the logged in user." + } + }, + "/user/createWithArray": { + "post": { + "requestBody": { + "description": "List of user object", + "content": { + "*/*": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/User" + } + } + } + }, + "required": true + }, + "tags": [ + "user" + ], + "responses": { + "default": { + "description": "successful operation" + } + }, + "operationId": "createUsersWithArrayInput", + "summary": "Creates list of users with given input array", + "description": "" + } + }, + "/user/createWithList": { + "post": { + "requestBody": { + "description": "List of user object", + "content": { + "*/*": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/User" + } + } + } + }, + "required": true + }, + "tags": [ + "user" + ], + "responses": { + "default": { + "description": "successful operation" + } + }, + "operationId": "createUsersWithListInput", + "summary": "Creates list of users with given input array", + "description": "" + } + }, + "/user/login": { + "get": { + "tags": [ + "user" + ], + "parameters": [ + { + "name": "username", + "description": "The user name for login", + "schema": { + "type": "string" + }, + "in": "query", + "required": true + }, + { + "name": "password", + "description": "The password for login in clear text", + "schema": { + "type": "string" + }, + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "headers": { + "X-Expires-After": { + "schema": { + "format": "date-time", + "type": "string" + }, + "description": "date in UTC when token expires" + }, + "X-Rate-Limit": { + "schema": { + "format": "int32", + "type": "integer" + }, + "description": "calls per hour allowed by the user" + } + }, + "content": { + "application/xml": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "type": "string" + } + } + }, + "description": "successful operation" + }, + "400": { + "description": "Invalid username/password supplied" + } + }, + "operationId": "loginUser", + "summary": "Logs user into the system", + "description": "" + } + }, + "/user/logout": { + "get": { + "tags": [ + "user" + ], + "responses": { + "default": { + "description": "successful operation" + } + }, + "operationId": "logoutUser", + "summary": "Logs out current logged in user session", + "description": "" + } + }, + "/user/{username}": { + "get": { + "tags": [ + "user" + ], + "parameters": [ + { + "name": "username", + "description": "The name that needs to be fetched. Use user1 for testing. ", + "schema": { + "type": "string" + }, + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "content": { + "application/xml": { + "schema": { + "$ref": "#/components/schemas/User" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/User" + } + } + }, + "description": "successful operation" + }, + "400": { + "description": "Invalid username supplied" + }, + "404": { + "description": "User not found" + } + }, + "operationId": "getUserByName", + "summary": "Get user by user name", + "description": "" + }, + "put": { + "requestBody": { + "description": "Updated user object", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/User" + } + } + }, + "required": true + }, + "tags": [ + "user" + ], + "parameters": [ + { + "name": "username", + "description": "name that need to be updated", + "schema": { + "type": "string" + }, + "in": "path", + "required": true + } + ], + "responses": { + "400": { + "description": "Invalid user supplied" + }, + "404": { + "description": "User not found" + } + }, + "operationId": "updateUser", + "summary": "Updated user", + "description": "This can only be done by the logged in user." + }, + "delete": { + "tags": [ + "user" + ], + "parameters": [ + { + "name": "username", + "description": "The name that needs to be deleted", + "schema": { + "type": "string" + }, + "in": "path", + "required": true + } + ], + "responses": { + "400": { + "description": "Invalid username supplied" + }, + "404": { + "description": "User not found" + } + }, + "operationId": "deleteUser", + "summary": "Delete user", + "description": "This can only be done by the logged in user." + } + } + }, + "components": { + "schemas": { + "ApiResponse": { + "type": "object", + "properties": { + "code": { + "format": "int32", + "type": "integer" + }, + "message": { + "type": "string" + }, + "type": { + "type": "string" + } + } + }, + "Category": { + "type": "object", + "properties": { + "id": { + "format": "int64", + "type": "integer" + }, + "name": { + "type": "string" + } + }, + "xml": { + "name": "Category" + } + }, + "Order": { + "type": "object", + "properties": { + "complete": { + "default": false, + "type": "boolean" + }, + "id": { + "format": "int64", + "type": "integer" + }, + "petId": { + "format": "int64", + "type": "integer" + }, + "quantity": { + "format": "int32", + "type": "integer" + }, + "shipDate": { + "format": "date-time", + "type": "string" + }, + "status": { + "description": "Order Status", + "enum": [ + "placed", + "approved", + "delivered" + ], + "type": "string" + } + }, + "xml": { + "name": "Order" + } + }, + "Pet": { + "required": [ + "name", + "photoUrls" + ], + "type": "object", + "properties": { + "category": { + "$ref": "#/components/schemas/Category" + }, + "id": { + "format": "int64", + "type": "integer" + }, + "name": { + "type": "string", + "example": "doggie" + }, + "photoUrls": { + "type": "array", + "items": { + "type": "string" + }, + "xml": { + "name": "photoUrl", + "wrapped": true + } + }, + "status": { + "description": "pet status in the store", + "enum": [ + "available", + "pending", + "sold" + ], + "type": "string" + }, + "tags": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Tag" + }, + "xml": { + "name": "tag", + "wrapped": true + } + } + }, + "xml": { + "name": "Pet" + } + }, + "Tag": { + "type": "object", + "properties": { + "id": { + "format": "int64", + "type": "integer" + }, + "name": { + "type": "string" + } + }, + "xml": { + "name": "Tag" + } + }, + "User": { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "firstName": { + "type": "string" + }, + "id": { + "format": "int64", + "type": "integer" + }, + "lastName": { + "type": "string" + }, + "password": { + "type": "string" + }, + "phone": { + "type": "string" + }, + "userStatus": { + "format": "int32", + "description": "User Status", + "type": "integer" + }, + "username": { + "type": "string" + } + }, + "xml": { + "name": "User" + } + } + }, + "securitySchemes": { + "api_key": { + "type": "apiKey", + "name": "api_key", + "in": "header" + }, + "petstore_auth": { + "flows": { + "implicit": { + "authorizationUrl": "http://petstore.swagger.io/oauth/dialog", + "scopes": { + "read:pets": "read your pets", + "write:pets": "modify pets in your account" + } + } + }, + "type": "oauth2" + } + } + }, + "tags": [ + { + "name": "pet", + "description": "Everything about your Pets", + "externalDocs": { + "description": "Find out more", + "url": "http://swagger.io" + } + }, + { + "name": "store", + "description": "Access to Petstore orders" + }, + { + "name": "user", + "description": "Operations about user", + "externalDocs": { + "description": "Find out more about our store", + "url": "http://swagger.io" + } + } + ], + "externalDocs": { + "description": "Find out more about Swagger", + "url": "http://swagger.io" + } +} diff --git a/app/server/api-generator/src/main/java/io/syndesis/server/api/generator/openapi/OpenApiValidationRules.java b/app/server/api-generator/src/main/java/io/syndesis/server/api/generator/openapi/OpenApiValidationRules.java index eb772370166..5105438708b 100644 --- a/app/server/api-generator/src/main/java/io/syndesis/server/api/generator/openapi/OpenApiValidationRules.java +++ b/app/server/api-generator/src/main/java/io/syndesis/server/api/generator/openapi/OpenApiValidationRules.java @@ -115,7 +115,7 @@ private OpenApiModelInfo validateAuthTypesIn(final OpenApiModelInfo modelInfo, f * Check if all operations contains valid authentication types for consumed * APIs. */ - private OpenApiModelInfo validateConsumedAuthTypes(final OpenApiModelInfo modelInfo) { + public OpenApiModelInfo validateConsumedAuthTypes(final OpenApiModelInfo modelInfo) { return validateAuthTypesIn(modelInfo, OpenApiSecurityScheme.namesAndAliases()); } diff --git a/app/server/api-generator/src/test/java/io/syndesis/server/api/generator/openapi/v2/Oas20ValidationRulesTest.java b/app/server/api-generator/src/test/java/io/syndesis/server/api/generator/openapi/v2/Oas20ValidationRulesTest.java index 3f6480c648a..4289949be05 100644 --- a/app/server/api-generator/src/test/java/io/syndesis/server/api/generator/openapi/v2/Oas20ValidationRulesTest.java +++ b/app/server/api-generator/src/test/java/io/syndesis/server/api/generator/openapi/v2/Oas20ValidationRulesTest.java @@ -57,8 +57,8 @@ public void shouldNotGenerateErrorWhenOperationsArePresent() { final OpenApiModelInfo info = new OpenApiModelInfo.Builder().model(openApiDoc).build(); final OpenApiModelInfo validated = RULES.validateOperationsGiven(info); - final List errors = validated.getErrors(); - assertThat(errors).isEmpty(); + assertThat(validated.getErrors()).isEmpty(); + assertThat(validated.getWarnings()).isEmpty(); } @Test @@ -79,13 +79,13 @@ public void shouldNotGenerateErrorForSupportedAuthType() { final OpenApiModelInfo info = new OpenApiModelInfo.Builder().model(openApiDoc).build(); - final OpenApiModelInfo validated = RULES.validateProvidedAuthTypes(info); - final List errors = validated.getErrors(); - assertThat(errors).isEmpty(); + final OpenApiModelInfo validated = RULES.validateConsumedAuthTypes(info); + assertThat(validated.getErrors()).isEmpty(); + assertThat(validated.getWarnings()).isEmpty(); } @Test - public void shouldGenerateErrorForUnsupportedAuthType() { + public void shouldGenerateWarningForUnsupportedAuthType() { final Oas20Document openApiDoc = new Oas20Document(); openApiDoc.securityDefinitions = openApiDoc.createSecurityDefinitions(); Oas20SecurityScheme secretAuth = openApiDoc.securityDefinitions.createSecurityScheme("secret_auth"); @@ -94,7 +94,12 @@ public void shouldGenerateErrorForUnsupportedAuthType() { final OpenApiModelInfo info = new OpenApiModelInfo.Builder().model(openApiDoc).build(); - final OpenApiModelInfo validated = RULES.validateProvidedAuthTypes(info); + OpenApiModelInfo validated = RULES.validateProvidedAuthTypes(info); + assertThat(validated.getErrors()).isEmpty(); + assertThat(validated.getWarnings()).containsOnly(new Violation.Builder().error("unsupported-auth").message("Authentication type secret is currently not supported").property("").build()); + + validated = RULES.validateConsumedAuthTypes(info); + assertThat(validated.getErrors()).isEmpty(); assertThat(validated.getWarnings()).containsOnly(new Violation.Builder().error("unsupported-auth").message("Authentication type secret is currently not supported").property("").build()); } diff --git a/app/server/api-generator/src/test/java/io/syndesis/server/api/generator/openapi/v3/Oas30ValidationRulesTest.java b/app/server/api-generator/src/test/java/io/syndesis/server/api/generator/openapi/v3/Oas30ValidationRulesTest.java index 209bc5fafef..aa5401b8889 100644 --- a/app/server/api-generator/src/test/java/io/syndesis/server/api/generator/openapi/v3/Oas30ValidationRulesTest.java +++ b/app/server/api-generator/src/test/java/io/syndesis/server/api/generator/openapi/v3/Oas30ValidationRulesTest.java @@ -59,8 +59,8 @@ public void shouldNotGenerateErrorWhenOperationsArePresent() { final OpenApiModelInfo info = new OpenApiModelInfo.Builder().model(openApiDoc).build(); final OpenApiModelInfo validated = RULES.validateOperationsGiven(info); - final List errors = validated.getErrors(); - assertThat(errors).isEmpty(); + assertThat(validated.getErrors()).isEmpty(); + assertThat(validated.getWarnings()).isEmpty(); } @Test @@ -81,13 +81,13 @@ public void shouldNotGenerateErrorForSupportedAuthType() { final OpenApiModelInfo info = new OpenApiModelInfo.Builder().model(openApiDoc).build(); - final OpenApiModelInfo validated = RULES.validateProvidedAuthTypes(info); - final List errors = validated.getErrors(); - assertThat(errors).isEmpty(); + final OpenApiModelInfo validated = RULES.validateConsumedAuthTypes(info); + assertThat(validated.getErrors()).isEmpty(); + assertThat(validated.getWarnings()).isEmpty(); } @Test - public void shouldGenerateErrorForUnsupportedAuthType() { + public void shouldGenerateWarningForUnsupportedAuthType() { final Oas30Document openApiDoc = new Oas30Document(); openApiDoc.components = openApiDoc.createComponents(); Oas30SecurityScheme secretAuth = openApiDoc.components.createSecurityScheme("secret_auth"); @@ -96,7 +96,12 @@ public void shouldGenerateErrorForUnsupportedAuthType() { final OpenApiModelInfo info = new OpenApiModelInfo.Builder().model(openApiDoc).build(); - final OpenApiModelInfo validated = RULES.validateProvidedAuthTypes(info); + OpenApiModelInfo validated = RULES.validateProvidedAuthTypes(info); + assertThat(validated.getErrors()).isEmpty(); + assertThat(validated.getWarnings()).containsOnly(new Violation.Builder().error("unsupported-auth").message("Authentication type secret is currently not supported").property("").build()); + + validated = RULES.validateConsumedAuthTypes(info); + assertThat(validated.getErrors()).isEmpty(); assertThat(validated.getWarnings()).containsOnly(new Violation.Builder().error("unsupported-auth").message("Authentication type secret is currently not supported").property("").build()); } diff --git a/app/test/integration-test/src/test/java/io/syndesis/test/itest/apiconnector/TodoApiClientV2_IT.java b/app/test/integration-test/src/test/java/io/syndesis/test/itest/apiconnector/TodoOpenApiV2Connector_IT.java similarity index 93% rename from app/test/integration-test/src/test/java/io/syndesis/test/itest/apiconnector/TodoApiClientV2_IT.java rename to app/test/integration-test/src/test/java/io/syndesis/test/itest/apiconnector/TodoOpenApiV2Connector_IT.java index 1efc7812edb..cd97d2ee728 100644 --- a/app/test/integration-test/src/test/java/io/syndesis/test/itest/apiconnector/TodoApiClientV2_IT.java +++ b/app/test/integration-test/src/test/java/io/syndesis/test/itest/apiconnector/TodoOpenApiV2Connector_IT.java @@ -39,8 +39,8 @@ /** * @author Christoph Deppisch */ -@ContextConfiguration(classes = TodoApiClientV2_IT.EndpointConfig.class) -public class TodoApiClientV2_IT extends SyndesisIntegrationTestSupport { +@ContextConfiguration(classes = TodoOpenApiV2Connector_IT.EndpointConfig.class) +public class TodoOpenApiV2Connector_IT extends SyndesisIntegrationTestSupport { private static final int TODO_SERVER_PORT = SocketUtils.findAvailableTcpPort(); static { @@ -51,7 +51,8 @@ public class TodoApiClientV2_IT extends SyndesisIntegrationTestSupport { private HttpServer todoApiServer; /** - * Integration uses api connector to send OpenAPI client requests to a REST endpoint. + * Integration uses api connector to send OpenAPI client requests to a REST endpoint. The client API connector was generated + * from OpenAPI 2.x specification. * * The integration invokes following sequence of client requests on the test server * POST /api adds a new task @@ -63,7 +64,7 @@ public class TodoApiClientV2_IT extends SyndesisIntegrationTestSupport { @ClassRule public static SyndesisIntegrationRuntimeContainer integrationContainer = new SyndesisIntegrationRuntimeContainer.Builder() .name("todo-api-client") - .fromExport(TodoApiClientV2_IT.class.getResource("TodoApiClientV2-export")) + .fromExport(TodoOpenApiV2Connector_IT.class.getResource("TodoOpenApiV2Connector-export")) .customize("$..configuredProperties.period", "5000") .customize("$..configuredProperties.host", String.format("http://%s:%s", GenericContainer.INTERNAL_HOST_HOSTNAME, TODO_SERVER_PORT)) diff --git a/app/test/integration-test/src/test/java/io/syndesis/test/itest/apiconnector/TodoApiClientV3_IT.java b/app/test/integration-test/src/test/java/io/syndesis/test/itest/apiconnector/TodoOpenApiV3Connector_IT.java similarity index 93% rename from app/test/integration-test/src/test/java/io/syndesis/test/itest/apiconnector/TodoApiClientV3_IT.java rename to app/test/integration-test/src/test/java/io/syndesis/test/itest/apiconnector/TodoOpenApiV3Connector_IT.java index 70cd3830689..05d96f12417 100644 --- a/app/test/integration-test/src/test/java/io/syndesis/test/itest/apiconnector/TodoApiClientV3_IT.java +++ b/app/test/integration-test/src/test/java/io/syndesis/test/itest/apiconnector/TodoOpenApiV3Connector_IT.java @@ -39,8 +39,8 @@ /** * @author Christoph Deppisch */ -@ContextConfiguration(classes = TodoApiClientV3_IT.EndpointConfig.class) -public class TodoApiClientV3_IT extends SyndesisIntegrationTestSupport { +@ContextConfiguration(classes = TodoOpenApiV3Connector_IT.EndpointConfig.class) +public class TodoOpenApiV3Connector_IT extends SyndesisIntegrationTestSupport { private static final int TODO_SERVER_PORT = SocketUtils.findAvailableTcpPort(); static { @@ -51,7 +51,8 @@ public class TodoApiClientV3_IT extends SyndesisIntegrationTestSupport { private HttpServer todoApiServer; /** - * Integration uses api connector to send OpenAPI client requests to a REST endpoint. + * Integration uses api connector to send OpenAPI client requests to a REST endpoint. The client API connector was generated + * from OpenAPI 3.x specification. * * The integration invokes following sequence of client requests on the test server * POST /api adds a new task @@ -63,7 +64,7 @@ public class TodoApiClientV3_IT extends SyndesisIntegrationTestSupport { @ClassRule public static SyndesisIntegrationRuntimeContainer integrationContainer = new SyndesisIntegrationRuntimeContainer.Builder() .name("todo-api-client") - .fromExport(TodoApiClientV3_IT.class.getResource("TodoApiClientV3-export")) + .fromExport(TodoOpenApiV3Connector_IT.class.getResource("TodoOpenApiV3Connector-export")) .customize("$..configuredProperties.period", "5000") .customize("$..configuredProperties.host", String.format("http://%s:%s", GenericContainer.INTERNAL_HOST_HOSTNAME, TODO_SERVER_PORT)) diff --git a/app/test/integration-test/src/test/java/io/syndesis/test/itest/apiprovider/TodoApi_IT.java b/app/test/integration-test/src/test/java/io/syndesis/test/itest/apiprovider/TodoApi_IT.java index ae2eed8ab9a..9dfe7f2c900 100644 --- a/app/test/integration-test/src/test/java/io/syndesis/test/itest/apiprovider/TodoApi_IT.java +++ b/app/test/integration-test/src/test/java/io/syndesis/test/itest/apiprovider/TodoApi_IT.java @@ -47,7 +47,7 @@ public class TodoApi_IT extends SyndesisIntegrationTestSupport { private static final String VND_OAI_OPENAPI_JSON = "application/vnd.oai.openapi+json"; @Autowired - private HttpClient todoListApiClient; + private HttpClient todoApiClient; @Autowired private DataSource sampleDb; @@ -79,11 +79,11 @@ public void testGetOpenApiSpec(@CitrusResource TestRunner runner) { .status(HttpStatus.OK) .url(String.format("http://localhost:%s/actuator/health", integrationContainer.getManagementPort())); - runner.http(action -> action.client(todoListApiClient) + runner.http(action -> action.client(todoApiClient) .send() .get("/openapi.json")); - runner.http(builder -> builder.client(todoListApiClient) + runner.http(builder -> builder.client(todoApiClient) .receive() .response(HttpStatus.OK) .contentType(VND_OAI_OPENAPI_JSON) @@ -96,11 +96,11 @@ public void testGetById(@CitrusResource TestRunner runner) { runner.sql(builder -> builder.dataSource(sampleDb) .statement("insert into todo (id, task, completed) values (9999, 'Walk the dog', 0)")); - runner.http(builder -> builder.client(todoListApiClient) + runner.http(builder -> builder.client(todoApiClient) .send() .get("/todo/9999")); - runner.http(builder -> builder.client(todoListApiClient) + runner.http(builder -> builder.client(todoApiClient) .receive() .response(HttpStatus.OK) .payload("{\"name\":\"Walk the dog\",\"done\":0}")); @@ -114,11 +114,11 @@ public void testGetAll(@CitrusResource TestRunner runner) { "insert into todo (task, completed) values ('Feed the dog', 0)", "insert into todo (task, completed) values ('Play with the dog', 0)"))); - runner.http(builder -> builder.client(todoListApiClient) + runner.http(builder -> builder.client(todoApiClient) .send() .get("/todos")); - runner.http(builder -> builder.client(todoListApiClient) + runner.http(builder -> builder.client(todoApiClient) .receive() .response(HttpStatus.OK) .payload("[{\"name\":\"Wash the dog\",\"done\":0}," + @@ -136,11 +136,11 @@ public void testGetOpen(@CitrusResource TestRunner runner) { "insert into todo (task, completed) values ('Play guitar', 1)", "insert into todo (task, completed) values ('Play with the dog', 0)"))); - runner.http(builder -> builder.client(todoListApiClient) + runner.http(builder -> builder.client(todoApiClient) .send() .get("/todos/open")); - runner.http(builder -> builder.client(todoListApiClient) + runner.http(builder -> builder.client(todoApiClient) .receive() .response(HttpStatus.OK) .payload("[{\"name\":\"Wash the dog\",\"done\":0}," + @@ -158,11 +158,11 @@ public void testGetDone(@CitrusResource TestRunner runner) { "insert into todo (task, completed) values ('Play guitar', 1)", "insert into todo (task, completed) values ('Play with the dog', 0)"))); - runner.http(builder -> builder.client(todoListApiClient) + runner.http(builder -> builder.client(todoApiClient) .send() .get("/todos/done")); - runner.http(builder -> builder.client(todoListApiClient) + runner.http(builder -> builder.client(todoApiClient) .receive() .response(HttpStatus.OK) .payload("[{\"name\":\"Play piano\",\"done\":1}," + @@ -172,7 +172,7 @@ public void testGetDone(@CitrusResource TestRunner runner) { @Configuration public static class EndpointConfig { @Bean - public HttpClient todoListApiClient() { + public HttpClient todoApiClient() { return CitrusEndpoints.http().client() .requestUrl(String.format("http://localhost:%s", integrationContainer.getServerPort())) .build(); diff --git a/app/test/integration-test/src/test/java/io/syndesis/test/itest/apiprovider/TodoOpenApiV3_IT.java b/app/test/integration-test/src/test/java/io/syndesis/test/itest/apiprovider/TodoOpenApiV3_IT.java new file mode 100644 index 00000000000..c67459eb3bc --- /dev/null +++ b/app/test/integration-test/src/test/java/io/syndesis/test/itest/apiprovider/TodoOpenApiV3_IT.java @@ -0,0 +1,216 @@ +/* + * Copyright (C) 2016 Red Hat, 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 + * + * 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 io.syndesis.test.itest.apiprovider; + +import javax.sql.DataSource; +import java.util.Arrays; + +import com.consol.citrus.annotations.CitrusResource; +import com.consol.citrus.annotations.CitrusTest; +import com.consol.citrus.dsl.endpoint.CitrusEndpoints; +import com.consol.citrus.dsl.runner.TestRunner; +import com.consol.citrus.dsl.runner.TestRunnerBeforeTestSupport; +import com.consol.citrus.http.client.HttpClient; +import io.syndesis.test.SyndesisTestEnvironment; +import io.syndesis.test.container.integration.SyndesisIntegrationRuntimeContainer; +import io.syndesis.test.itest.SyndesisIntegrationTestSupport; +import org.junit.ClassRule; +import org.junit.Test; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.core.io.ClassPathResource; +import org.springframework.http.HttpMethod; +import org.springframework.http.HttpStatus; +import org.springframework.test.context.ContextConfiguration; + +/** + * @author Christoph Deppisch + */ +@ContextConfiguration(classes = TodoOpenApiV3_IT.EndpointConfig.class) +public class TodoOpenApiV3_IT extends SyndesisIntegrationTestSupport { + + private static final String VND_OAI_OPENAPI_JSON = "application/vnd.oai.openapi+json"; + + @Autowired + private HttpClient todoApiClient; + + @Autowired + private DataSource sampleDb; + + /** + * Integration uses api provider to enable rest service operations for accessing tasks in the sample database. + * + * Available flows in api + * GET /api/{id} provides the task with the given id as Json object + * GET /api provides all available tasks as Json array (using collection support) + * GET /api/open provides all uncompleted tasks as Json array (using basic filter) + * GET /api/done provides all completed tasks as Json array (using basic filter) + */ + @ClassRule + public static SyndesisIntegrationRuntimeContainer integrationContainer = new SyndesisIntegrationRuntimeContainer.Builder() + .name("todo-api") + .fromExport(TodoOpenApiV3_IT.class.getResource("TodoOpenApiV3-export")) + .build() + .withNetwork(getSyndesisDb().getNetwork()) + .withExposedPorts(SyndesisTestEnvironment.getServerPort(), + SyndesisTestEnvironment.getManagementPort()); + + @Test + @CitrusTest + public void testHealthCheck(@CitrusResource TestRunner runner) { + runner.waitFor().http() + .method(HttpMethod.GET) + .seconds(10L) + .status(HttpStatus.OK) + .url(String.format("http://localhost:%s/actuator/health", integrationContainer.getManagementPort())); + } + + @Test + @CitrusTest + public void testGetOpenApiSpec(@CitrusResource TestRunner runner) { + runner.http(action -> action.client(todoApiClient) + .send() + .get("/openapi.json")); + + runner.http(builder -> builder.client(todoApiClient) + .receive() + .response(HttpStatus.OK) + .contentType(VND_OAI_OPENAPI_JSON) + .payload(new ClassPathResource("todo-openapi-v3.json", TodoOpenApiV3_IT.class))); + } + + @Test + @CitrusTest + public void testGetTask(@CitrusResource TestRunner runner) { + runner.variable("id", "citrus:randomNumber(4)"); + + runner.sql(builder -> builder.dataSource(sampleDb) + .statement("insert into todo (id, task, completed) values (${id}, 'Walk the dog', 0)")); + + runner.http(builder -> builder.client(todoApiClient) + .send() + .get("/api/${id}")); + + runner.http(builder -> builder.client(todoApiClient) + .receive() + .response(HttpStatus.OK) + .payload("{\"id\":${id},\"task\":\"Walk the dog\",\"completed\":0}")); + } + + @Test + @CitrusTest + public void testTaskNotFound(@CitrusResource TestRunner runner) { + runner.variable("id", "citrus:randomNumber(4)"); + + runner.http(builder -> builder.client(todoApiClient) + .send() + .get("/api/${id}")); + + runner.http(builder -> builder.client(todoApiClient) + .receive() + .response(HttpStatus.NOT_FOUND)); + } + + @Test + @CitrusTest + public void testUpdateTask(@CitrusResource TestRunner runner) { + runner.variable("id", "citrus:randomNumber(4)"); + + runner.sql(builder -> builder.dataSource(sampleDb) + .statement("insert into todo (id, task, completed) values (${id}, 'Walk the dog', 0)")); + + runner.http(builder -> builder.client(todoApiClient) + .send() + .put("/api/${id}") + .payload("{\"id\":${id},\"task\":\"WALK THE DOG\",\"completed\":1}")); + + runner.http(builder -> builder.client(todoApiClient) + .receive() + .response(HttpStatus.OK) + .payload("{\"id\":${id},\"task\":\"WALK THE DOG\",\"completed\":1}")); + + runner.query(builder -> builder.dataSource(sampleDb) + .statement("select task, completed from todo where id=${id}") + .validate("TASK", "WALK THE DOG") + .validate("COMPLETED", "1")); + } + + @Test + @CitrusTest + public void testDeleteTask(@CitrusResource TestRunner runner) { + runner.variable("id", "citrus:randomNumber(4)"); + + runner.sql(builder -> builder.dataSource(sampleDb) + .statement("insert into todo (id, task, completed) values (${id}, 'Walk the dog', 0)")); + + runner.http(builder -> builder.client(todoApiClient) + .send() + .delete("/api/${id}")); + + runner.http(builder -> builder.client(todoApiClient) + .receive() + .response(HttpStatus.NO_CONTENT)); + + runner.query(builder -> builder.dataSource(sampleDb) + .statement("select count(task) as TASKS_FOUND from todo where id=${id}") + .validate("TASKS_FOUND", "0")); + } + + @Test + @CitrusTest + public void testListTasks(@CitrusResource TestRunner runner) { + runner.sql(builder -> builder.dataSource(sampleDb) + .statements(Arrays.asList("insert into todo (task, completed) values ('Wash the dog', 0)", + "insert into todo (task, completed) values ('Feed the dog', 0)", + "insert into todo (task, completed) values ('Play with the dog', 0)"))); + + runner.http(builder -> builder.client(todoApiClient) + .send() + .get("/api")); + + runner.http(builder -> builder.client(todoApiClient) + .receive() + .response(HttpStatus.OK) + .payload("[" + + "{\"id\":\"@ignore@\",\"task\":\"Wash the dog\",\"completed\":0}," + + "{\"id\":\"@ignore@\",\"task\":\"Feed the dog\",\"completed\":0}," + + "{\"id\":\"@ignore@\",\"task\":\"Play with the dog\",\"completed\":0}" + + "]")); + } + + @Configuration + public static class EndpointConfig { + @Bean + public HttpClient todoApiClient() { + return CitrusEndpoints.http().client() + .requestUrl(String.format("http://localhost:%s", integrationContainer.getServerPort())) + .build(); + } + + @Bean + public TestRunnerBeforeTestSupport beforeTest(DataSource sampleDb) { + return new TestRunnerBeforeTestSupport() { + @Override + public void beforeTest(TestRunner runner) { + runner.sql(builder -> builder.dataSource(sampleDb) + .statement("delete from todo")); + } + }; + } + } +} diff --git a/app/test/integration-test/src/test/resources/io/syndesis/test/itest/apiconnector/TodoApiClientV2-export/model-info.json b/app/test/integration-test/src/test/resources/io/syndesis/test/itest/apiconnector/TodoOpenApiV2Connector-export/model-info.json similarity index 100% rename from app/test/integration-test/src/test/resources/io/syndesis/test/itest/apiconnector/TodoApiClientV2-export/model-info.json rename to app/test/integration-test/src/test/resources/io/syndesis/test/itest/apiconnector/TodoOpenApiV2Connector-export/model-info.json diff --git a/app/test/integration-test/src/test/resources/io/syndesis/test/itest/apiconnector/TodoApiClientV2-export/model.json b/app/test/integration-test/src/test/resources/io/syndesis/test/itest/apiconnector/TodoOpenApiV2Connector-export/model.json similarity index 100% rename from app/test/integration-test/src/test/resources/io/syndesis/test/itest/apiconnector/TodoApiClientV2-export/model.json rename to app/test/integration-test/src/test/resources/io/syndesis/test/itest/apiconnector/TodoOpenApiV2Connector-export/model.json diff --git a/app/test/integration-test/src/test/resources/io/syndesis/test/itest/apiconnector/TodoApiClientV3-export/model-info.json b/app/test/integration-test/src/test/resources/io/syndesis/test/itest/apiconnector/TodoOpenApiV3Connector-export/model-info.json similarity index 100% rename from app/test/integration-test/src/test/resources/io/syndesis/test/itest/apiconnector/TodoApiClientV3-export/model-info.json rename to app/test/integration-test/src/test/resources/io/syndesis/test/itest/apiconnector/TodoOpenApiV3Connector-export/model-info.json diff --git a/app/test/integration-test/src/test/resources/io/syndesis/test/itest/apiconnector/TodoApiClientV3-export/model.json b/app/test/integration-test/src/test/resources/io/syndesis/test/itest/apiconnector/TodoOpenApiV3Connector-export/model.json similarity index 100% rename from app/test/integration-test/src/test/resources/io/syndesis/test/itest/apiconnector/TodoApiClientV3-export/model.json rename to app/test/integration-test/src/test/resources/io/syndesis/test/itest/apiconnector/TodoOpenApiV3Connector-export/model.json diff --git a/app/test/integration-test/src/test/resources/io/syndesis/test/itest/apiprovider/TodoOpenApiV3-export/model-info.json b/app/test/integration-test/src/test/resources/io/syndesis/test/itest/apiprovider/TodoOpenApiV3-export/model-info.json new file mode 100755 index 00000000000..14c226dea81 --- /dev/null +++ b/app/test/integration-test/src/test/resources/io/syndesis/test/itest/apiprovider/TodoOpenApiV3-export/model-info.json @@ -0,0 +1 @@ +{"schemaVersion":32} \ No newline at end of file diff --git a/app/test/integration-test/src/test/resources/io/syndesis/test/itest/apiprovider/TodoOpenApiV3-export/model.json b/app/test/integration-test/src/test/resources/io/syndesis/test/itest/apiprovider/TodoOpenApiV3-export/model.json new file mode 100755 index 00000000000..64dadcf95ea --- /dev/null +++ b/app/test/integration-test/src/test/resources/io/syndesis/test/itest/apiprovider/TodoOpenApiV3-export/model.json @@ -0,0 +1,6529 @@ +{ + "connections": { + ":5": { + "configuredProperties": { + "password": "»ENC:bdecbb6462cdce61252db8a046621b75be7d2289a1decc7cf0ed8196ef609343dca2dd85baa2573663de99277f84a361", + "schema": "sampledb", + "url": "jdbc:postgresql://syndesis-db:5432/sampledb", + "user": "sampledb" + }, + "connector": { + "actions": [ + { + "actionType": "connector", + "description": "Invoke SQL to obtain, store, update, or delete data.", + "descriptor": { + "componentScheme": "sql", + "connectorCustomizers": [ + "io.syndesis.connector.sql.customizer.SqlConnectorCustomizer" + ], + "inputDataShape": { + "kind": "json-schema" + }, + "outputDataShape": { + "kind": "json-schema" + }, + "propertyDefinitionSteps": [ + { + "description": "Enter a SQL statement that starts with INSERT, SELECT, UPDATE or DELETE.", + "name": "SQL statement", + "properties": { + "batch": { + "defaultValue": "false", + "deprecated": false, + "displayName": "Batch update", + "group": "common", + "javaType": "java.lang.Boolean", + "kind": "property", + "labelHint": "Use prepared statements for INSERT, UPDATE, DELETE in order to update multiple rows with batch update.", + "order": 2, + "required": false, + "secret": false, + "type": "boolean" + }, + "query": { + "deprecated": false, + "displayName": "SQL statement", + "group": "common", + "javaType": "java.lang.String", + "kind": "path", + "labelHint": "SQL statement to be executed. Can contain input parameters prefixed by ':#'.", + "order": 1, + "placeholder": "for example ':#MYPARAMNAME'", + "required": true, + "secret": false, + "type": "dataList" + }, + "raiseErrorOnNotFound": { + "defaultValue": "false", + "deprecated": false, + "displayName": "Raise error when record not found", + "group": "common", + "javaType": "java.lang.Boolean", + "kind": "property", + "labelHint": "Error when no records are selected, updated or deleted", + "order": 3, + "required": false, + "secret": false, + "type": "boolean" + } + } + } + ], + "standardizedErrors": [ + { + "displayName": "SqlDataAccessError", + "name": "SQL_DATA_ACCESS_ERROR" + }, + { + "displayName": "SqlEntityNotFoundError", + "name": "SQL_ENTITY_NOT_FOUND_ERROR" + }, + { + "displayName": "SqlConnectorError", + "name": "SQL_CONNECTOR_ERROR" + } + ] + }, + "id": "sql-connector", + "name": "Invoke SQL", + "pattern": "To", + "tags": [ + "dynamic" + ] + }, + { + "actionType": "connector", + "description": "Periodically invoke SQL to obtain data.", + "descriptor": { + "componentScheme": "sql", + "connectorCustomizers": [ + "io.syndesis.connector.sql.customizer.SqlStartConnectorCustomizer" + ], + "inputDataShape": { + "kind": "none" + }, + "outputDataShape": { + "kind": "json-schema" + }, + "propertyDefinitionSteps": [ + { + "description": "Enter a SQL statement that returns results, such as SELECT.", + "name": "SQL statement", + "properties": { + "isRaiseErrorOnNotFound": { + "deprecated": false, + "displayName": "Raise NotFoundError", + "group": "consumer", + "javaType": "java.lang.Boolean", + "kind": "parameter", + "labelHint": "Raise NotFoundError if no records are inserted, updated, selected or deleted", + "order": 3, + "required": false, + "secret": false, + "type": "boolean" + }, + "query": { + "deprecated": false, + "displayName": "SQL statement", + "group": "common", + "javaType": "java.lang.String", + "kind": "path", + "labelHint": "SQL statement to be executed.", + "order": 1, + "required": true, + "secret": false, + "type": "dataList" + }, + "schedulerExpression": { + "defaultValue": "60000", + "deprecated": false, + "displayName": "Period", + "group": "consumer", + "javaType": "long", + "kind": "parameter", + "labelHint": "Delay between scheduling (executing).", + "order": 2, + "required": false, + "secret": false, + "type": "duration" + } + } + } + ] + }, + "id": "sql-start-connector", + "name": "Periodic SQL invocation", + "pattern": "From", + "tags": [ + "dynamic" + ] + }, + { + "actionType": "connector", + "description": "Invoke a stored procedure.", + "descriptor": { + "componentScheme": "sql-stored", + "connectorCustomizers": [ + "io.syndesis.connector.sql.customizer.SqlStoredConnectorCustomizer" + ], + "inputDataShape": { + "kind": "json-schema" + }, + "outputDataShape": { + "kind": "json-schema" + }, + "propertyDefinitionSteps": [ + { + "description": "Select the stored procedure.", + "name": "Procedure name", + "properties": { + "procedureName": { + "componentProperty": true, + "deprecated": false, + "displayName": "Procedure name", + "group": "common", + "javaType": "java.lang.String", + "kind": "property", + "labelHint": "Name of the stored procedure.", + "required": false, + "secret": false, + "type": "select" + }, + "template": { + "componentProperty": false, + "deprecated": false, + "displayName": "Template", + "group": "producer", + "javaType": "java.lang.String", + "kind": "path", + "labelHint": "Stored procedure template to perform.", + "required": false, + "secret": false, + "type": "hidden" + } + } + } + ] + }, + "id": "sql-stored-connector", + "name": "Invoke stored procedure", + "pattern": "To", + "tags": [ + "dynamic" + ] + }, + { + "actionType": "connector", + "description": "Periodically invoke a stored procedure.", + "descriptor": { + "componentScheme": "sql-stored", + "connectorCustomizers": [ + "io.syndesis.connector.sql.customizer.SqlStartStoredConnectorCustomizer" + ], + "inputDataShape": { + "kind": "none" + }, + "outputDataShape": { + "kind": "json-schema" + }, + "propertyDefinitionSteps": [ + { + "description": "Select the stored procedure.", + "name": "Procedure name", + "properties": { + "procedureName": { + "componentProperty": true, + "deprecated": false, + "displayName": "Procedure name", + "group": "producer", + "javaType": "java.lang.String", + "kind": "path", + "labelHint": "Name of the stored procedure.", + "required": true, + "secret": false, + "type": "select" + }, + "schedulerExpression": { + "defaultValue": "60000", + "deprecated": false, + "displayName": "Period", + "group": "consumer", + "javaType": "long", + "kind": "parameter", + "labelHint": "Delay between scheduling (executing).", + "required": false, + "secret": false, + "type": "duration" + }, + "template": { + "componentProperty": false, + "deprecated": false, + "displayName": "Template", + "group": "producer", + "javaType": "java.lang.String", + "kind": "path", + "labelHint": "Stored Procedure template to perform.", + "required": true, + "secret": false, + "type": "hidden" + } + } + } + ] + }, + "id": "sql-stored-start-connector", + "name": "Periodic stored procedure invocation", + "pattern": "From", + "tags": [ + "dynamic" + ] + } + ], + "connectorCustomizers": [ + "io.syndesis.connector.sql.customizer.DataSourceCustomizer" + ], + "dependencies": [ + { + "id": "io.syndesis.connector:connector-sql:2.0-SNAPSHOT", + "type": "MAVEN" + }, + { + "id": "jdbc-driver", + "type": "EXTENSION_TAG" + } + ], + "description": "Invoke SQL to obtain, store, update, or delete data.", + "icon": "assets:sql.svg", + "id": "sql", + "name": "Database", + "properties": { + "password": { + "componentProperty": true, + "deprecated": false, + "displayName": "Password", + "group": "security", + "javaType": "java.lang.String", + "kind": "property", + "label": "common,security", + "labelHint": "Password for the database connection.", + "order": 3, + "required": true, + "secret": true, + "type": "string" + }, + "schema": { + "componentProperty": true, + "deprecated": false, + "displayName": "Schema", + "group": "common", + "javaType": "java.lang.String", + "kind": "property", + "label": "common", + "labelHint": "Database schema.", + "order": 4, + "required": false, + "secret": false, + "type": "string" + }, + "url": { + "componentProperty": true, + "deprecated": false, + "displayName": "Connection URL", + "group": "common", + "javaType": "java.lang.String", + "kind": "property", + "labelHint": "JDBC URL of the database.", + "order": 1, + "required": true, + "secret": false, + "type": "string" + }, + "user": { + "componentProperty": true, + "deprecated": false, + "displayName": "Username", + "group": "common", + "javaType": "java.lang.String", + "kind": "property", + "labelHint": "Username for the database connection.", + "order": 2, + "required": true, + "secret": false, + "type": "string" + } + }, + "tags": [ + "verifier" + ], + "version": 64 + }, + "connectorId": "sql", + "description": "Connection to SampleDB", + "icon": "assets:sql.svg", + "id": "5", + "isDerived": false, + "name": "PostgresDB", + "tags": [ + "sampledb" + ], + "uses": 0 + }, + ":api-provider": { + "connector": { + "actions": [ + { + "actionType": "connector", + "description": "Start a Syndesis integration from a provided API", + "descriptor": { + "componentScheme": "direct", + "connectorCustomizers": [ + "io.syndesis.connector.apiprovider.ApiProviderStartEndpointCustomizer" + ], + "inputDataShape": { + "kind": "none" + }, + "outputDataShape": { + "kind": "any" + }, + "propertyDefinitionSteps": [ + { + "description": "API Provider Configuration", + "name": "configuration", + "properties": { + "name": { + "componentProperty": false, + "deprecated": false, + "description": "The operation ID as defined in the API spec", + "displayName": "Operation ID", + "javaType": "String", + "kind": "parameter", + "required": true, + "secret": false, + "type": "string" + } + } + } + ] + }, + "id": "io.syndesis:api-provider-start", + "name": "Provided API", + "pattern": "From", + "tags": [ + "expose" + ] + }, + { + "actionType": "connector", + "description": "End action of Syndesis integrations that start from a provided API", + "descriptor": { + "componentScheme": "bean", + "configuredProperties": { + "beanName": "io.syndesis.connector.apiprovider.NoOpBean", + "method": "process" + }, + "connectorCustomizers": [ + "io.syndesis.connector.apiprovider.ApiProviderReturnPathCustomizer" + ], + "inputDataShape": { + "kind": "any" + }, + "outputDataShape": { + "kind": "none" + }, + "propertyDefinitionSteps": [ + { + "description": "API Provider Return Path Configuration", + "name": "configuration", + "properties": { + "defaultResponse": { + "componentProperty": false, + "deprecated": false, + "displayName": "Default Response", + "javaType": "String", + "kind": "parameter", + "order": 0, + "required": false, + "secret": false, + "type": "legend" + }, + "errorHandling": { + "componentProperty": false, + "deprecated": false, + "displayName": "Error Handling", + "javaType": "String", + "kind": "parameter", + "order": 2, + "required": false, + "secret": false, + "type": "legend" + }, + "errorResponseCodes": { + "componentProperty": false, + "defaultValue": "{}", + "deprecated": false, + "description": "The return code to set according to different error situations", + "displayName": "Error Response Codes", + "javaType": "Map", + "kind": "parameter", + "order": 4, + "required": false, + "secret": false, + "type": "mapset" + }, + "httpResponseCode": { + "componentProperty": false, + "deprecated": false, + "description": "The return code to set in the HTTP response", + "displayName": "Return Code", + "javaType": "String", + "kind": "parameter", + "order": 1, + "required": true, + "secret": false, + "type": "select" + }, + "returnBody": { + "componentProperty": false, + "deprecated": false, + "displayName": "Include error message in the return body", + "javaType": "Boolean", + "kind": "parameter", + "order": 3, + "required": false, + "secret": false, + "type": "boolean" + } + } + } + ], + "standardizedErrors": [ + { + "displayName": "ServerError", + "name": "SERVER_ERROR" + } + ] + }, + "id": "io.syndesis:api-provider-end", + "name": "Provided API Return Path", + "pattern": "To" + } + ], + "dependencies": [ + { + "id": "io.syndesis.connector:connector-api-provider:2.0-SNAPSHOT", + "type": "MAVEN" + }, + { + "id": "org.apache.camel:camel-swagger-java:2.23.2.fuse-760011", + "type": "MAVEN" + }, + { + "id": "org.apache.camel:camel-servlet-starter:2.23.2.fuse-760011", + "type": "MAVEN" + } + ], + "description": "Expose Restful APIs", + "icon": "assets:api-provider.svg", + "id": "api-provider", + "metadata": { + "hide-from-connection-pages": "true" + }, + "name": "API Provider", + "version": 64 + }, + "connectorId": "api-provider", + "description": "Expose Restful APIs", + "icon": "assets:api-provider.svg", + "id": "api-provider", + "isDerived": false, + "metadata": { + "hide-from-connection-pages": "true" + }, + "name": "API Provider", + "uses": 0 + } + }, + "connectors": { + ":api-provider": { + "actions": [ + { + "actionType": "connector", + "description": "Start a Syndesis integration from a provided API", + "descriptor": { + "componentScheme": "direct", + "connectorCustomizers": [ + "io.syndesis.connector.apiprovider.ApiProviderStartEndpointCustomizer" + ], + "inputDataShape": { + "kind": "none" + }, + "outputDataShape": { + "kind": "any" + }, + "propertyDefinitionSteps": [ + { + "description": "API Provider Configuration", + "name": "configuration", + "properties": { + "name": { + "componentProperty": false, + "deprecated": false, + "description": "The operation ID as defined in the API spec", + "displayName": "Operation ID", + "javaType": "String", + "kind": "parameter", + "required": true, + "secret": false, + "type": "string" + } + } + } + ] + }, + "id": "io.syndesis:api-provider-start", + "name": "Provided API", + "pattern": "From", + "tags": [ + "expose" + ] + }, + { + "actionType": "connector", + "description": "End action of Syndesis integrations that start from a provided API", + "descriptor": { + "componentScheme": "bean", + "configuredProperties": { + "beanName": "io.syndesis.connector.apiprovider.NoOpBean", + "method": "process" + }, + "connectorCustomizers": [ + "io.syndesis.connector.apiprovider.ApiProviderReturnPathCustomizer" + ], + "inputDataShape": { + "kind": "any" + }, + "outputDataShape": { + "kind": "none" + }, + "propertyDefinitionSteps": [ + { + "description": "API Provider Return Path Configuration", + "name": "configuration", + "properties": { + "defaultResponse": { + "componentProperty": false, + "deprecated": false, + "displayName": "Default Response", + "javaType": "String", + "kind": "parameter", + "order": 0, + "required": false, + "secret": false, + "type": "legend" + }, + "errorHandling": { + "componentProperty": false, + "deprecated": false, + "displayName": "Error Handling", + "javaType": "String", + "kind": "parameter", + "order": 2, + "required": false, + "secret": false, + "type": "legend" + }, + "errorResponseCodes": { + "componentProperty": false, + "defaultValue": "{}", + "deprecated": false, + "description": "The return code to set according to different error situations", + "displayName": "Error Response Codes", + "javaType": "Map", + "kind": "parameter", + "order": 4, + "required": false, + "secret": false, + "type": "mapset" + }, + "httpResponseCode": { + "componentProperty": false, + "deprecated": false, + "description": "The return code to set in the HTTP response", + "displayName": "Return Code", + "javaType": "String", + "kind": "parameter", + "order": 1, + "required": true, + "secret": false, + "type": "select" + }, + "returnBody": { + "componentProperty": false, + "deprecated": false, + "displayName": "Include error message in the return body", + "javaType": "Boolean", + "kind": "parameter", + "order": 3, + "required": false, + "secret": false, + "type": "boolean" + } + } + } + ], + "standardizedErrors": [ + { + "displayName": "ServerError", + "name": "SERVER_ERROR" + } + ] + }, + "id": "io.syndesis:api-provider-end", + "name": "Provided API Return Path", + "pattern": "To" + } + ], + "dependencies": [ + { + "id": "io.syndesis.connector:connector-api-provider:2.0-SNAPSHOT", + "type": "MAVEN" + }, + { + "id": "org.apache.camel:camel-swagger-java:2.23.2.fuse-760011", + "type": "MAVEN" + }, + { + "id": "org.apache.camel:camel-servlet-starter:2.23.2.fuse-760011", + "type": "MAVEN" + } + ], + "description": "Expose Restful APIs", + "icon": "assets:api-provider.svg", + "id": "api-provider", + "metadata": { + "hide-from-connection-pages": "true" + }, + "name": "API Provider", + "version": 64 + }, + ":sql": { + "actions": [ + { + "actionType": "connector", + "description": "Invoke SQL to obtain, store, update, or delete data.", + "descriptor": { + "componentScheme": "sql", + "connectorCustomizers": [ + "io.syndesis.connector.sql.customizer.SqlConnectorCustomizer" + ], + "inputDataShape": { + "kind": "json-schema" + }, + "outputDataShape": { + "kind": "json-schema" + }, + "propertyDefinitionSteps": [ + { + "description": "Enter a SQL statement that starts with INSERT, SELECT, UPDATE or DELETE.", + "name": "SQL statement", + "properties": { + "batch": { + "defaultValue": "false", + "deprecated": false, + "displayName": "Batch update", + "group": "common", + "javaType": "java.lang.Boolean", + "kind": "property", + "labelHint": "Use prepared statements for INSERT, UPDATE, DELETE in order to update multiple rows with batch update.", + "order": 2, + "required": false, + "secret": false, + "type": "boolean" + }, + "query": { + "deprecated": false, + "displayName": "SQL statement", + "group": "common", + "javaType": "java.lang.String", + "kind": "path", + "labelHint": "SQL statement to be executed. Can contain input parameters prefixed by ':#'.", + "order": 1, + "placeholder": "for example ':#MYPARAMNAME'", + "required": true, + "secret": false, + "type": "dataList" + }, + "raiseErrorOnNotFound": { + "defaultValue": "false", + "deprecated": false, + "displayName": "Raise error when record not found", + "group": "common", + "javaType": "java.lang.Boolean", + "kind": "property", + "labelHint": "Error when no records are selected, updated or deleted", + "order": 3, + "required": false, + "secret": false, + "type": "boolean" + } + } + } + ], + "standardizedErrors": [ + { + "displayName": "SqlDataAccessError", + "name": "SQL_DATA_ACCESS_ERROR" + }, + { + "displayName": "SqlEntityNotFoundError", + "name": "SQL_ENTITY_NOT_FOUND_ERROR" + }, + { + "displayName": "SqlConnectorError", + "name": "SQL_CONNECTOR_ERROR" + } + ] + }, + "id": "sql-connector", + "name": "Invoke SQL", + "pattern": "To", + "tags": [ + "dynamic" + ] + }, + { + "actionType": "connector", + "description": "Periodically invoke SQL to obtain data.", + "descriptor": { + "componentScheme": "sql", + "connectorCustomizers": [ + "io.syndesis.connector.sql.customizer.SqlStartConnectorCustomizer" + ], + "inputDataShape": { + "kind": "none" + }, + "outputDataShape": { + "kind": "json-schema" + }, + "propertyDefinitionSteps": [ + { + "description": "Enter a SQL statement that returns results, such as SELECT.", + "name": "SQL statement", + "properties": { + "isRaiseErrorOnNotFound": { + "deprecated": false, + "displayName": "Raise NotFoundError", + "group": "consumer", + "javaType": "java.lang.Boolean", + "kind": "parameter", + "labelHint": "Raise NotFoundError if no records are inserted, updated, selected or deleted", + "order": 3, + "required": false, + "secret": false, + "type": "boolean" + }, + "query": { + "deprecated": false, + "displayName": "SQL statement", + "group": "common", + "javaType": "java.lang.String", + "kind": "path", + "labelHint": "SQL statement to be executed.", + "order": 1, + "required": true, + "secret": false, + "type": "dataList" + }, + "schedulerExpression": { + "defaultValue": "60000", + "deprecated": false, + "displayName": "Period", + "group": "consumer", + "javaType": "long", + "kind": "parameter", + "labelHint": "Delay between scheduling (executing).", + "order": 2, + "required": false, + "secret": false, + "type": "duration" + } + } + } + ] + }, + "id": "sql-start-connector", + "name": "Periodic SQL invocation", + "pattern": "From", + "tags": [ + "dynamic" + ] + }, + { + "actionType": "connector", + "description": "Invoke a stored procedure.", + "descriptor": { + "componentScheme": "sql-stored", + "connectorCustomizers": [ + "io.syndesis.connector.sql.customizer.SqlStoredConnectorCustomizer" + ], + "inputDataShape": { + "kind": "json-schema" + }, + "outputDataShape": { + "kind": "json-schema" + }, + "propertyDefinitionSteps": [ + { + "description": "Select the stored procedure.", + "name": "Procedure name", + "properties": { + "procedureName": { + "componentProperty": true, + "deprecated": false, + "displayName": "Procedure name", + "group": "common", + "javaType": "java.lang.String", + "kind": "property", + "labelHint": "Name of the stored procedure.", + "required": false, + "secret": false, + "type": "select" + }, + "template": { + "componentProperty": false, + "deprecated": false, + "displayName": "Template", + "group": "producer", + "javaType": "java.lang.String", + "kind": "path", + "labelHint": "Stored procedure template to perform.", + "required": false, + "secret": false, + "type": "hidden" + } + } + } + ] + }, + "id": "sql-stored-connector", + "name": "Invoke stored procedure", + "pattern": "To", + "tags": [ + "dynamic" + ] + }, + { + "actionType": "connector", + "description": "Periodically invoke a stored procedure.", + "descriptor": { + "componentScheme": "sql-stored", + "connectorCustomizers": [ + "io.syndesis.connector.sql.customizer.SqlStartStoredConnectorCustomizer" + ], + "inputDataShape": { + "kind": "none" + }, + "outputDataShape": { + "kind": "json-schema" + }, + "propertyDefinitionSteps": [ + { + "description": "Select the stored procedure.", + "name": "Procedure name", + "properties": { + "procedureName": { + "componentProperty": true, + "deprecated": false, + "displayName": "Procedure name", + "group": "producer", + "javaType": "java.lang.String", + "kind": "path", + "labelHint": "Name of the stored procedure.", + "required": true, + "secret": false, + "type": "select" + }, + "schedulerExpression": { + "defaultValue": "60000", + "deprecated": false, + "displayName": "Period", + "group": "consumer", + "javaType": "long", + "kind": "parameter", + "labelHint": "Delay between scheduling (executing).", + "required": false, + "secret": false, + "type": "duration" + }, + "template": { + "componentProperty": false, + "deprecated": false, + "displayName": "Template", + "group": "producer", + "javaType": "java.lang.String", + "kind": "path", + "labelHint": "Stored Procedure template to perform.", + "required": true, + "secret": false, + "type": "hidden" + } + } + } + ] + }, + "id": "sql-stored-start-connector", + "name": "Periodic stored procedure invocation", + "pattern": "From", + "tags": [ + "dynamic" + ] + } + ], + "connectorCustomizers": [ + "io.syndesis.connector.sql.customizer.DataSourceCustomizer" + ], + "dependencies": [ + { + "id": "io.syndesis.connector:connector-sql:2.0-SNAPSHOT", + "type": "MAVEN" + }, + { + "id": "jdbc-driver", + "type": "EXTENSION_TAG" + } + ], + "description": "Invoke SQL to obtain, store, update, or delete data.", + "icon": "assets:sql.svg", + "id": "sql", + "name": "Database", + "properties": { + "password": { + "componentProperty": true, + "deprecated": false, + "displayName": "Password", + "group": "security", + "javaType": "java.lang.String", + "kind": "property", + "label": "common,security", + "labelHint": "Password for the database connection.", + "order": 3, + "required": true, + "secret": true, + "type": "string" + }, + "schema": { + "componentProperty": true, + "deprecated": false, + "displayName": "Schema", + "group": "common", + "javaType": "java.lang.String", + "kind": "property", + "label": "common", + "labelHint": "Database schema.", + "order": 4, + "required": false, + "secret": false, + "type": "string" + }, + "url": { + "componentProperty": true, + "deprecated": false, + "displayName": "Connection URL", + "group": "common", + "javaType": "java.lang.String", + "kind": "property", + "labelHint": "JDBC URL of the database.", + "order": 1, + "required": true, + "secret": false, + "type": "string" + }, + "user": { + "componentProperty": true, + "deprecated": false, + "displayName": "Username", + "group": "common", + "javaType": "java.lang.String", + "kind": "property", + "labelHint": "Username for the database connection.", + "order": 2, + "required": true, + "secret": false, + "type": "string" + } + }, + "tags": [ + "verifier" + ], + "version": 64 + } + }, + "integrations": { + ":i-LwPq6VYz3EFFmQK5RGaz": { + "createdAt": 1576703391779, + "flows": [ + { + "description": "GET /", + "id": "i-LwPppMaz3EFFmQK5RGNz", + "metadata": { + "default-return-code": "200", + "excerpt": "200 OK", + "openapi-operationid": "listTasks", + "return-code-edited": "true" + }, + "name": "List all tasks", + "steps": [ + { + "action": { + "actionType": "connector", + "description": "Start a Syndesis integration from a provided API", + "descriptor": { + "componentScheme": "direct", + "connectorCustomizers": [ + "io.syndesis.connector.apiprovider.ApiProviderStartEndpointCustomizer" + ], + "inputDataShape": { + "kind": "none" + }, + "outputDataShape": { + "kind": "none" + }, + "propertyDefinitionSteps": [ + { + "description": "API Provider Configuration", + "name": "configuration", + "properties": { + "name": { + "componentProperty": false, + "deprecated": false, + "description": "The operation ID as defined in the API spec", + "displayName": "Operation ID", + "javaType": "String", + "kind": "parameter", + "required": true, + "secret": false, + "type": "string" + } + } + } + ] + }, + "id": "io.syndesis:api-provider-start", + "metadata": { + "serverBasePath": "/api" + }, + "name": "Provided API", + "pattern": "From", + "tags": [ + "expose", + "locked-action" + ] + }, + "configuredProperties": { + "name": "listTasks" + }, + "connection": { + "connector": { + "actions": [ + { + "actionType": "connector", + "description": "Start a Syndesis integration from a provided API", + "descriptor": { + "componentScheme": "direct", + "connectorCustomizers": [ + "io.syndesis.connector.apiprovider.ApiProviderStartEndpointCustomizer" + ], + "inputDataShape": { + "kind": "none" + }, + "outputDataShape": { + "kind": "any" + }, + "propertyDefinitionSteps": [ + { + "description": "API Provider Configuration", + "name": "configuration", + "properties": { + "name": { + "componentProperty": false, + "deprecated": false, + "description": "The operation ID as defined in the API spec", + "displayName": "Operation ID", + "javaType": "String", + "kind": "parameter", + "required": true, + "secret": false, + "type": "string" + } + } + } + ] + }, + "id": "io.syndesis:api-provider-start", + "name": "Provided API", + "pattern": "From", + "tags": [ + "expose" + ] + }, + { + "actionType": "connector", + "description": "End action of Syndesis integrations that start from a provided API", + "descriptor": { + "componentScheme": "bean", + "configuredProperties": { + "beanName": "io.syndesis.connector.apiprovider.NoOpBean", + "method": "process" + }, + "connectorCustomizers": [ + "io.syndesis.connector.apiprovider.ApiProviderReturnPathCustomizer" + ], + "inputDataShape": { + "kind": "any" + }, + "outputDataShape": { + "kind": "none" + }, + "propertyDefinitionSteps": [ + { + "description": "API Provider Return Path Configuration", + "name": "configuration", + "properties": { + "defaultResponse": { + "componentProperty": false, + "deprecated": false, + "displayName": "Default Response", + "javaType": "String", + "kind": "parameter", + "order": 0, + "required": false, + "secret": false, + "type": "legend" + }, + "errorHandling": { + "componentProperty": false, + "deprecated": false, + "displayName": "Error Handling", + "javaType": "String", + "kind": "parameter", + "order": 2, + "required": false, + "secret": false, + "type": "legend" + }, + "errorResponseCodes": { + "componentProperty": false, + "defaultValue": "{}", + "deprecated": false, + "description": "The return code to set according to different error situations", + "displayName": "Error Response Codes", + "javaType": "Map", + "kind": "parameter", + "order": 4, + "required": false, + "secret": false, + "type": "mapset" + }, + "httpResponseCode": { + "componentProperty": false, + "deprecated": false, + "description": "The return code to set in the HTTP response", + "displayName": "Return Code", + "javaType": "String", + "kind": "parameter", + "order": 1, + "required": true, + "secret": false, + "type": "select" + }, + "returnBody": { + "componentProperty": false, + "deprecated": false, + "displayName": "Include error message in the return body", + "javaType": "Boolean", + "kind": "parameter", + "order": 3, + "required": false, + "secret": false, + "type": "boolean" + } + } + } + ], + "standardizedErrors": [ + { + "displayName": "ServerError", + "name": "SERVER_ERROR" + } + ] + }, + "id": "io.syndesis:api-provider-end", + "name": "Provided API Return Path", + "pattern": "To" + } + ], + "dependencies": [ + { + "id": "io.syndesis.connector:connector-api-provider:2.0-SNAPSHOT", + "type": "MAVEN" + }, + { + "id": "org.apache.camel:camel-swagger-java:2.23.2.fuse-760011", + "type": "MAVEN" + }, + { + "id": "org.apache.camel:camel-servlet-starter:2.23.2.fuse-760011", + "type": "MAVEN" + } + ], + "description": "Expose Restful APIs", + "icon": "assets:api-provider.svg", + "id": "api-provider", + "metadata": { + "hide-from-connection-pages": "true" + }, + "name": "API Provider", + "version": 64 + }, + "connectorId": "api-provider", + "description": "Expose Restful APIs", + "icon": "assets:api-provider.svg", + "id": "api-provider", + "isDerived": false, + "metadata": { + "hide-from-connection-pages": "true" + }, + "name": "API Provider", + "uses": 0 + }, + "id": "i-LwPppM_z3EFFmQK5RGLz", + "metadata": { + "configured": "true" + }, + "stepKind": "endpoint" + }, + { + "configuredProperties": { + "bodyLoggingEnabled": "false", + "contextLoggingEnabled": "false", + "customText": "List tasks" + }, + "id": "-LwPpw2mOXnrmequX_Ka", + "metadata": { + "configured": "true" + }, + "name": "Log", + "stepKind": "log" + }, + { + "action": { + "actionType": "connector", + "description": "Invoke SQL to obtain, store, update, or delete data.", + "descriptor": { + "componentScheme": "sql", + "connectorCustomizers": [ + "io.syndesis.connector.sql.customizer.SqlConnectorCustomizer" + ], + "inputDataShape": { + "kind": "none", + "type": "SQL_PARAM_IN" + }, + "outputDataShape": { + "description": "Result of SQL [select * from todo]", + "kind": "json-schema", + "metadata": { + "variant": "collection" + }, + "name": "SQL Result", + "specification": "{\"type\":\"array\",\"$schema\":\"http://json-schema.org/schema#\",\"items\":{\"type\":\"object\",\"title\":\"SQL_PARAM_OUT\",\"properties\":{\"id\":{\"type\":\"integer\",\"required\":true},\"task\":{\"type\":\"string\",\"required\":true},\"completed\":{\"type\":\"integer\",\"required\":true}}}}", + "type": "SQL_PARAM_OUT" + }, + "propertyDefinitionSteps": [ + { + "description": "Enter a SQL statement that starts with INSERT, SELECT, UPDATE or DELETE.", + "name": "SQL statement", + "properties": { + "batch": { + "defaultValue": "false", + "deprecated": false, + "displayName": "Batch update", + "group": "common", + "javaType": "java.lang.Boolean", + "kind": "property", + "labelHint": "Use prepared statements for INSERT, UPDATE, DELETE in order to update multiple rows with batch update.", + "order": 2, + "required": false, + "secret": false, + "type": "boolean" + }, + "query": { + "dataList": [ + "select * from todo" + ], + "defaultValue": "select * from todo", + "deprecated": false, + "displayName": "SQL statement", + "group": "common", + "javaType": "java.lang.String", + "kind": "path", + "labelHint": "SQL statement to be executed. Can contain input parameters prefixed by ':#'.", + "order": 1, + "placeholder": "for example ':#MYPARAMNAME'", + "required": true, + "secret": false, + "type": "dataList" + }, + "raiseErrorOnNotFound": { + "defaultValue": "false", + "deprecated": false, + "displayName": "Raise error when record not found", + "group": "common", + "javaType": "java.lang.Boolean", + "kind": "property", + "labelHint": "Error when no records are selected, updated or deleted", + "order": 3, + "required": false, + "secret": false, + "type": "boolean" + } + } + } + ], + "standardizedErrors": [ + { + "displayName": "SqlDataAccessError", + "name": "SQL_DATA_ACCESS_ERROR" + }, + { + "displayName": "SqlEntityNotFoundError", + "name": "SQL_ENTITY_NOT_FOUND_ERROR" + }, + { + "displayName": "SqlConnectorError", + "name": "SQL_CONNECTOR_ERROR" + } + ] + }, + "id": "sql-connector", + "name": "Invoke SQL", + "pattern": "To", + "tags": [ + "dynamic" + ] + }, + "configuredProperties": { + "batch": "false", + "query": "select * from todo", + "raiseErrorOnNotFound": "false" + }, + "connection": { + "configuredProperties": { + "password": "»ENC:50a0f4b2d9e6ff8f900571858a112f4532fc26aedf5e581eac7d614e3cf17aa0450a1a255d7c5ab31665ff120c5841fa", + "schema": "sampledb", + "url": "jdbc:postgresql://syndesis-db:5432/sampledb", + "user": "sampledb" + }, + "connector": { + "actions": [ + { + "actionType": "connector", + "description": "Invoke SQL to obtain, store, update, or delete data.", + "descriptor": { + "componentScheme": "sql", + "connectorCustomizers": [ + "io.syndesis.connector.sql.customizer.SqlConnectorCustomizer" + ], + "inputDataShape": { + "kind": "json-schema" + }, + "outputDataShape": { + "kind": "json-schema" + }, + "propertyDefinitionSteps": [ + { + "description": "Enter a SQL statement that starts with INSERT, SELECT, UPDATE or DELETE.", + "name": "SQL statement", + "properties": { + "batch": { + "defaultValue": "false", + "deprecated": false, + "displayName": "Batch update", + "group": "common", + "javaType": "java.lang.Boolean", + "kind": "property", + "labelHint": "Use prepared statements for INSERT, UPDATE, DELETE in order to update multiple rows with batch update.", + "order": 2, + "required": false, + "secret": false, + "type": "boolean" + }, + "query": { + "deprecated": false, + "displayName": "SQL statement", + "group": "common", + "javaType": "java.lang.String", + "kind": "path", + "labelHint": "SQL statement to be executed. Can contain input parameters prefixed by ':#'.", + "order": 1, + "placeholder": "for example ':#MYPARAMNAME'", + "required": true, + "secret": false, + "type": "dataList" + }, + "raiseErrorOnNotFound": { + "defaultValue": "false", + "deprecated": false, + "displayName": "Raise error when record not found", + "group": "common", + "javaType": "java.lang.Boolean", + "kind": "property", + "labelHint": "Error when no records are selected, updated or deleted", + "order": 3, + "required": false, + "secret": false, + "type": "boolean" + } + } + } + ], + "standardizedErrors": [ + { + "displayName": "SqlDataAccessError", + "name": "SQL_DATA_ACCESS_ERROR" + }, + { + "displayName": "SqlEntityNotFoundError", + "name": "SQL_ENTITY_NOT_FOUND_ERROR" + }, + { + "displayName": "SqlConnectorError", + "name": "SQL_CONNECTOR_ERROR" + } + ] + }, + "id": "sql-connector", + "name": "Invoke SQL", + "pattern": "To", + "tags": [ + "dynamic" + ] + }, + { + "actionType": "connector", + "description": "Periodically invoke SQL to obtain data.", + "descriptor": { + "componentScheme": "sql", + "connectorCustomizers": [ + "io.syndesis.connector.sql.customizer.SqlStartConnectorCustomizer" + ], + "inputDataShape": { + "kind": "none" + }, + "outputDataShape": { + "kind": "json-schema" + }, + "propertyDefinitionSteps": [ + { + "description": "Enter a SQL statement that returns results, such as SELECT.", + "name": "SQL statement", + "properties": { + "isRaiseErrorOnNotFound": { + "deprecated": false, + "displayName": "Raise NotFoundError", + "group": "consumer", + "javaType": "java.lang.Boolean", + "kind": "parameter", + "labelHint": "Raise NotFoundError if no records are inserted, updated, selected or deleted", + "order": 3, + "required": false, + "secret": false, + "type": "boolean" + }, + "query": { + "deprecated": false, + "displayName": "SQL statement", + "group": "common", + "javaType": "java.lang.String", + "kind": "path", + "labelHint": "SQL statement to be executed.", + "order": 1, + "required": true, + "secret": false, + "type": "dataList" + }, + "schedulerExpression": { + "defaultValue": "60000", + "deprecated": false, + "displayName": "Period", + "group": "consumer", + "javaType": "long", + "kind": "parameter", + "labelHint": "Delay between scheduling (executing).", + "order": 2, + "required": false, + "secret": false, + "type": "duration" + } + } + } + ] + }, + "id": "sql-start-connector", + "name": "Periodic SQL invocation", + "pattern": "From", + "tags": [ + "dynamic" + ] + }, + { + "actionType": "connector", + "description": "Invoke a stored procedure.", + "descriptor": { + "componentScheme": "sql-stored", + "connectorCustomizers": [ + "io.syndesis.connector.sql.customizer.SqlStoredConnectorCustomizer" + ], + "inputDataShape": { + "kind": "json-schema" + }, + "outputDataShape": { + "kind": "json-schema" + }, + "propertyDefinitionSteps": [ + { + "description": "Select the stored procedure.", + "name": "Procedure name", + "properties": { + "procedureName": { + "componentProperty": true, + "deprecated": false, + "displayName": "Procedure name", + "group": "common", + "javaType": "java.lang.String", + "kind": "property", + "labelHint": "Name of the stored procedure.", + "required": false, + "secret": false, + "type": "select" + }, + "template": { + "componentProperty": false, + "deprecated": false, + "displayName": "Template", + "group": "producer", + "javaType": "java.lang.String", + "kind": "path", + "labelHint": "Stored procedure template to perform.", + "required": false, + "secret": false, + "type": "hidden" + } + } + } + ] + }, + "id": "sql-stored-connector", + "name": "Invoke stored procedure", + "pattern": "To", + "tags": [ + "dynamic" + ] + }, + { + "actionType": "connector", + "description": "Periodically invoke a stored procedure.", + "descriptor": { + "componentScheme": "sql-stored", + "connectorCustomizers": [ + "io.syndesis.connector.sql.customizer.SqlStartStoredConnectorCustomizer" + ], + "inputDataShape": { + "kind": "none" + }, + "outputDataShape": { + "kind": "json-schema" + }, + "propertyDefinitionSteps": [ + { + "description": "Select the stored procedure.", + "name": "Procedure name", + "properties": { + "procedureName": { + "componentProperty": true, + "deprecated": false, + "displayName": "Procedure name", + "group": "producer", + "javaType": "java.lang.String", + "kind": "path", + "labelHint": "Name of the stored procedure.", + "required": true, + "secret": false, + "type": "select" + }, + "schedulerExpression": { + "defaultValue": "60000", + "deprecated": false, + "displayName": "Period", + "group": "consumer", + "javaType": "long", + "kind": "parameter", + "labelHint": "Delay between scheduling (executing).", + "required": false, + "secret": false, + "type": "duration" + }, + "template": { + "componentProperty": false, + "deprecated": false, + "displayName": "Template", + "group": "producer", + "javaType": "java.lang.String", + "kind": "path", + "labelHint": "Stored Procedure template to perform.", + "required": true, + "secret": false, + "type": "hidden" + } + } + } + ] + }, + "id": "sql-stored-start-connector", + "name": "Periodic stored procedure invocation", + "pattern": "From", + "tags": [ + "dynamic" + ] + } + ], + "connectorCustomizers": [ + "io.syndesis.connector.sql.customizer.DataSourceCustomizer" + ], + "dependencies": [ + { + "id": "io.syndesis.connector:connector-sql:2.0-SNAPSHOT", + "type": "MAVEN" + }, + { + "id": "jdbc-driver", + "type": "EXTENSION_TAG" + } + ], + "description": "Invoke SQL to obtain, store, update, or delete data.", + "icon": "assets:sql.svg", + "id": "sql", + "name": "Database", + "properties": { + "password": { + "componentProperty": true, + "deprecated": false, + "displayName": "Password", + "group": "security", + "javaType": "java.lang.String", + "kind": "property", + "label": "common,security", + "labelHint": "Password for the database connection.", + "order": 3, + "required": true, + "secret": true, + "type": "string" + }, + "schema": { + "componentProperty": true, + "deprecated": false, + "displayName": "Schema", + "group": "common", + "javaType": "java.lang.String", + "kind": "property", + "label": "common", + "labelHint": "Database schema.", + "order": 4, + "required": false, + "secret": false, + "type": "string" + }, + "url": { + "componentProperty": true, + "deprecated": false, + "displayName": "Connection URL", + "group": "common", + "javaType": "java.lang.String", + "kind": "property", + "labelHint": "JDBC URL of the database.", + "order": 1, + "required": true, + "secret": false, + "type": "string" + }, + "user": { + "componentProperty": true, + "deprecated": false, + "displayName": "Username", + "group": "common", + "javaType": "java.lang.String", + "kind": "property", + "labelHint": "Username for the database connection.", + "order": 2, + "required": true, + "secret": false, + "type": "string" + } + }, + "tags": [ + "verifier" + ], + "version": 64 + }, + "connectorId": "sql", + "description": "Connection to SampleDB", + "icon": "assets:sql.svg", + "id": "5", + "isDerived": false, + "name": "PostgresDB", + "tags": [ + "sampledb" + ], + "uses": 0 + }, + "id": "-LwPpz1rOXnrmequX_Ka", + "metadata": { + "configured": "true" + }, + "stepKind": "endpoint" + }, + { + "action": { + "actionType": "step", + "descriptor": { + "inputDataShape": { + "kind": "any", + "name": "All preceding outputs" + }, + "outputDataShape": { + "description": "API response payload", + "kind": "json-schema", + "metadata": { + "unified": "true" + }, + "name": "Response", + "specification": "{\"$schema\":\"http://json-schema.org/schema#\",\"type\":\"object\",\"$id\":\"io:syndesis:wrapped\",\"properties\":{\"body\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"id\":{\"title\":\"Task ID\",\"description\":\"Unique task identifier\",\"type\":\"integer\"},\"task\":{\"title\":\"The task\",\"description\":\"Task line\",\"type\":\"string\"},\"completed\":{\"title\":\"Task completition status\",\"description\":\"0 - ongoing, 1 - completed\",\"maximum\":1,\"minimum\":0,\"type\":\"integer\"}}}}}}" + } + } + }, + "configuredProperties": { + "atlasmapping": "{\"AtlasMapping\":{\"jsonType\":\"io.atlasmap.v2.AtlasMapping\",\"dataSource\":[{\"jsonType\":\"io.atlasmap.json.v2.JsonDataSource\",\"id\":\"-LwPpz1rOXnrmequX_Ka\",\"uri\":\"atlas:json:-LwPpz1rOXnrmequX_Ka\",\"dataSourceType\":\"SOURCE\"},{\"jsonType\":\"io.atlasmap.json.v2.JsonDataSource\",\"id\":\"i-LwPppM_z3EFFmQK5RGMz\",\"uri\":\"atlas:json:i-LwPppM_z3EFFmQK5RGMz\",\"dataSourceType\":\"TARGET\",\"template\":null}],\"mappings\":{\"mapping\":[{\"jsonType\":\"io.atlasmap.v2.Mapping\",\"id\":\"mapping.222528\",\"inputField\":[{\"jsonType\":\"io.atlasmap.json.v2.JsonField\",\"name\":\"id\",\"path\":\"/<>/id\",\"fieldType\":\"INTEGER\",\"docId\":\"-LwPpz1rOXnrmequX_Ka\",\"userCreated\":false}],\"outputField\":[{\"jsonType\":\"io.atlasmap.json.v2.JsonField\",\"name\":\"id\",\"path\":\"/body<>/id\",\"fieldType\":\"INTEGER\",\"docId\":\"i-LwPppM_z3EFFmQK5RGMz\",\"userCreated\":false}]},{\"jsonType\":\"io.atlasmap.v2.Mapping\",\"id\":\"mapping.372460\",\"inputField\":[{\"jsonType\":\"io.atlasmap.json.v2.JsonField\",\"name\":\"completed\",\"path\":\"/<>/completed\",\"fieldType\":\"INTEGER\",\"docId\":\"-LwPpz1rOXnrmequX_Ka\",\"userCreated\":false}],\"outputField\":[{\"jsonType\":\"io.atlasmap.json.v2.JsonField\",\"name\":\"completed\",\"path\":\"/body<>/completed\",\"fieldType\":\"INTEGER\",\"docId\":\"i-LwPppM_z3EFFmQK5RGMz\",\"userCreated\":false}]},{\"jsonType\":\"io.atlasmap.v2.Mapping\",\"id\":\"mapping.981815\",\"inputField\":[{\"jsonType\":\"io.atlasmap.json.v2.JsonField\",\"name\":\"task\",\"path\":\"/<>/task\",\"fieldType\":\"STRING\",\"docId\":\"-LwPpz1rOXnrmequX_Ka\",\"userCreated\":false}],\"outputField\":[{\"jsonType\":\"io.atlasmap.json.v2.JsonField\",\"name\":\"task\",\"path\":\"/body<>/task\",\"fieldType\":\"STRING\",\"docId\":\"i-LwPppM_z3EFFmQK5RGMz\",\"userCreated\":false}]}]},\"name\":\"UI.309597\",\"lookupTables\":{\"lookupTable\":[]},\"constants\":{\"constant\":[]},\"properties\":{\"property\":[]}}}" + }, + "id": "-LwPpz2dOXnrmequX_Ka", + "metadata": { + "configured": "true" + }, + "name": "Data Mapper", + "stepKind": "mapper" + }, + { + "action": { + "actionType": "connector", + "description": "End action of Syndesis integrations that start from a provided API", + "descriptor": { + "componentScheme": "bean", + "configuredProperties": { + "beanName": "io.syndesis.connector.apiprovider.NoOpBean", + "method": "process" + }, + "connectorCustomizers": [ + "io.syndesis.connector.apiprovider.ApiProviderReturnPathCustomizer" + ], + "inputDataShape": { + "description": "API response payload", + "kind": "json-schema", + "metadata": { + "unified": "true" + }, + "name": "Response", + "specification": "{\"$schema\":\"http://json-schema.org/schema#\",\"type\":\"object\",\"$id\":\"io:syndesis:wrapped\",\"properties\":{\"body\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"id\":{\"title\":\"Task ID\",\"description\":\"Unique task identifier\",\"type\":\"integer\"},\"task\":{\"title\":\"The task\",\"description\":\"Task line\",\"type\":\"string\"},\"completed\":{\"title\":\"Task completition status\",\"description\":\"0 - ongoing, 1 - completed\",\"maximum\":1,\"minimum\":0,\"type\":\"integer\"}}}}}}" + }, + "outputDataShape": { + "kind": "none" + }, + "propertyDefinitionSteps": [ + { + "description": "API Provider Return Path Configuration", + "name": "configuration", + "properties": { + "defaultResponse": { + "componentProperty": false, + "deprecated": false, + "displayName": "Default Response", + "javaType": "String", + "kind": "parameter", + "order": 0, + "required": false, + "secret": false, + "type": "legend" + }, + "errorHandling": { + "componentProperty": false, + "deprecated": false, + "displayName": "Error Handling", + "javaType": "String", + "kind": "parameter", + "order": 2, + "required": false, + "secret": false, + "type": "legend" + }, + "errorResponseCodes": { + "componentProperty": false, + "defaultValue": "{}", + "deprecated": false, + "description": "The return code to set according to different error situations", + "displayName": "Error Response Codes", + "extendedProperties": "{ \"mapsetValueDefinition\": { \"enum\" : [{\"label\":\"200 OK\",\"value\":\"200\"}], \"type\" : \"select\" },\"mapsetOptions\": { \"i18nKeyColumnTitle\": \"When the error message is\", \"i18nValueColumnTitle\": \"Return this HTTP response code\" }}", + "javaType": "Map", + "kind": "parameter", + "order": 4, + "required": false, + "secret": false, + "type": "mapset" + }, + "httpResponseCode": { + "componentProperty": false, + "deprecated": false, + "description": "The return code to set in the HTTP response", + "displayName": "Return Code", + "enum": [ + { + "label": "200 OK", + "value": "200" + } + ], + "javaType": "String", + "kind": "parameter", + "order": 1, + "required": true, + "secret": false, + "type": "select" + }, + "returnBody": { + "componentProperty": false, + "deprecated": false, + "displayName": "Include error message in the return body", + "javaType": "Boolean", + "kind": "parameter", + "order": 3, + "required": false, + "secret": false, + "type": "boolean" + } + } + } + ], + "standardizedErrors": [ + { + "displayName": "ServerError", + "name": "SERVER_ERROR" + } + ] + }, + "id": "io.syndesis:api-provider-end", + "name": "Provided API Return Path", + "pattern": "To", + "tags": [ + "locked-action" + ] + }, + "configuredProperties": { + "errorResponseCodes": "{}", + "httpResponseCode": "200", + "returnBody": "false" + }, + "connection": { + "connector": { + "actions": [ + { + "actionType": "connector", + "description": "Start a Syndesis integration from a provided API", + "descriptor": { + "componentScheme": "direct", + "connectorCustomizers": [ + "io.syndesis.connector.apiprovider.ApiProviderStartEndpointCustomizer" + ], + "inputDataShape": { + "kind": "none" + }, + "outputDataShape": { + "kind": "any" + }, + "propertyDefinitionSteps": [ + { + "description": "API Provider Configuration", + "name": "configuration", + "properties": { + "name": { + "componentProperty": false, + "deprecated": false, + "description": "The operation ID as defined in the API spec", + "displayName": "Operation ID", + "javaType": "String", + "kind": "parameter", + "required": true, + "secret": false, + "type": "string" + } + } + } + ] + }, + "id": "io.syndesis:api-provider-start", + "name": "Provided API", + "pattern": "From", + "tags": [ + "expose" + ] + }, + { + "actionType": "connector", + "description": "End action of Syndesis integrations that start from a provided API", + "descriptor": { + "componentScheme": "bean", + "configuredProperties": { + "beanName": "io.syndesis.connector.apiprovider.NoOpBean", + "method": "process" + }, + "connectorCustomizers": [ + "io.syndesis.connector.apiprovider.ApiProviderReturnPathCustomizer" + ], + "inputDataShape": { + "kind": "any" + }, + "outputDataShape": { + "kind": "none" + }, + "propertyDefinitionSteps": [ + { + "description": "API Provider Return Path Configuration", + "name": "configuration", + "properties": { + "defaultResponse": { + "componentProperty": false, + "deprecated": false, + "displayName": "Default Response", + "javaType": "String", + "kind": "parameter", + "order": 0, + "required": false, + "secret": false, + "type": "legend" + }, + "errorHandling": { + "componentProperty": false, + "deprecated": false, + "displayName": "Error Handling", + "javaType": "String", + "kind": "parameter", + "order": 2, + "required": false, + "secret": false, + "type": "legend" + }, + "errorResponseCodes": { + "componentProperty": false, + "defaultValue": "{}", + "deprecated": false, + "description": "The return code to set according to different error situations", + "displayName": "Error Response Codes", + "javaType": "Map", + "kind": "parameter", + "order": 4, + "required": false, + "secret": false, + "type": "mapset" + }, + "httpResponseCode": { + "componentProperty": false, + "deprecated": false, + "description": "The return code to set in the HTTP response", + "displayName": "Return Code", + "javaType": "String", + "kind": "parameter", + "order": 1, + "required": true, + "secret": false, + "type": "select" + }, + "returnBody": { + "componentProperty": false, + "deprecated": false, + "displayName": "Include error message in the return body", + "javaType": "Boolean", + "kind": "parameter", + "order": 3, + "required": false, + "secret": false, + "type": "boolean" + } + } + } + ], + "standardizedErrors": [ + { + "displayName": "ServerError", + "name": "SERVER_ERROR" + } + ] + }, + "id": "io.syndesis:api-provider-end", + "name": "Provided API Return Path", + "pattern": "To" + } + ], + "dependencies": [ + { + "id": "io.syndesis.connector:connector-api-provider:2.0-SNAPSHOT", + "type": "MAVEN" + }, + { + "id": "org.apache.camel:camel-swagger-java:2.23.2.fuse-760011", + "type": "MAVEN" + }, + { + "id": "org.apache.camel:camel-servlet-starter:2.23.2.fuse-760011", + "type": "MAVEN" + } + ], + "description": "Expose Restful APIs", + "icon": "assets:api-provider.svg", + "id": "api-provider", + "metadata": { + "hide-from-connection-pages": "true" + }, + "name": "API Provider", + "version": 64 + }, + "connectorId": "api-provider", + "description": "Expose Restful APIs", + "icon": "assets:api-provider.svg", + "id": "api-provider", + "isDerived": false, + "metadata": { + "hide-from-connection-pages": "true" + }, + "name": "API Provider", + "uses": 0 + }, + "id": "i-LwPppM_z3EFFmQK5RGMz", + "metadata": { + "configured": "true" + }, + "stepKind": "endpoint" + } + ], + "tags": [ + "5", + "api-provider" + ], + "type": "API_PROVIDER" + }, + { + "description": "POST /", + "id": "i-LwPppMaz3EFFmQK5RGQz", + "metadata": { + "default-return-code": "201", + "excerpt": "201 All is good", + "openapi-operationid": "addTask", + "return-code-edited": "true" + }, + "name": "Create new task", + "steps": [ + { + "action": { + "actionType": "connector", + "description": "Start a Syndesis integration from a provided API", + "descriptor": { + "componentScheme": "direct", + "connectorCustomizers": [ + "io.syndesis.connector.apiprovider.ApiProviderStartEndpointCustomizer" + ], + "inputDataShape": { + "kind": "none" + }, + "outputDataShape": { + "description": "API request payload", + "kind": "json-schema", + "metadata": { + "unified": "true" + }, + "name": "Request", + "specification": "{\"$schema\":\"http://json-schema.org/schema#\",\"type\":\"object\",\"$id\":\"io:syndesis:wrapped\",\"properties\":{\"body\":{\"type\":\"object\",\"properties\":{\"id\":{\"title\":\"Task ID\",\"description\":\"Unique task identifier\",\"type\":\"integer\"},\"task\":{\"title\":\"The task\",\"description\":\"Task line\",\"type\":\"string\"},\"completed\":{\"title\":\"Task completition status\",\"description\":\"0 - ongoing, 1 - completed\",\"maximum\":1,\"minimum\":0,\"type\":\"integer\"}}}}}" + }, + "propertyDefinitionSteps": [ + { + "description": "API Provider Configuration", + "name": "configuration", + "properties": { + "name": { + "componentProperty": false, + "deprecated": false, + "description": "The operation ID as defined in the API spec", + "displayName": "Operation ID", + "javaType": "String", + "kind": "parameter", + "required": true, + "secret": false, + "type": "string" + } + } + } + ] + }, + "id": "io.syndesis:api-provider-start", + "metadata": { + "serverBasePath": "/api" + }, + "name": "Provided API", + "pattern": "From", + "tags": [ + "expose", + "locked-action" + ] + }, + "configuredProperties": { + "name": "addTask" + }, + "connection": { + "connector": { + "actions": [ + { + "actionType": "connector", + "description": "Start a Syndesis integration from a provided API", + "descriptor": { + "componentScheme": "direct", + "connectorCustomizers": [ + "io.syndesis.connector.apiprovider.ApiProviderStartEndpointCustomizer" + ], + "inputDataShape": { + "kind": "none" + }, + "outputDataShape": { + "kind": "any" + }, + "propertyDefinitionSteps": [ + { + "description": "API Provider Configuration", + "name": "configuration", + "properties": { + "name": { + "componentProperty": false, + "deprecated": false, + "description": "The operation ID as defined in the API spec", + "displayName": "Operation ID", + "javaType": "String", + "kind": "parameter", + "required": true, + "secret": false, + "type": "string" + } + } + } + ] + }, + "id": "io.syndesis:api-provider-start", + "name": "Provided API", + "pattern": "From", + "tags": [ + "expose" + ] + }, + { + "actionType": "connector", + "description": "End action of Syndesis integrations that start from a provided API", + "descriptor": { + "componentScheme": "bean", + "configuredProperties": { + "beanName": "io.syndesis.connector.apiprovider.NoOpBean", + "method": "process" + }, + "connectorCustomizers": [ + "io.syndesis.connector.apiprovider.ApiProviderReturnPathCustomizer" + ], + "inputDataShape": { + "kind": "any" + }, + "outputDataShape": { + "kind": "none" + }, + "propertyDefinitionSteps": [ + { + "description": "API Provider Return Path Configuration", + "name": "configuration", + "properties": { + "defaultResponse": { + "componentProperty": false, + "deprecated": false, + "displayName": "Default Response", + "javaType": "String", + "kind": "parameter", + "order": 0, + "required": false, + "secret": false, + "type": "legend" + }, + "errorHandling": { + "componentProperty": false, + "deprecated": false, + "displayName": "Error Handling", + "javaType": "String", + "kind": "parameter", + "order": 2, + "required": false, + "secret": false, + "type": "legend" + }, + "errorResponseCodes": { + "componentProperty": false, + "defaultValue": "{}", + "deprecated": false, + "description": "The return code to set according to different error situations", + "displayName": "Error Response Codes", + "javaType": "Map", + "kind": "parameter", + "order": 4, + "required": false, + "secret": false, + "type": "mapset" + }, + "httpResponseCode": { + "componentProperty": false, + "deprecated": false, + "description": "The return code to set in the HTTP response", + "displayName": "Return Code", + "javaType": "String", + "kind": "parameter", + "order": 1, + "required": true, + "secret": false, + "type": "select" + }, + "returnBody": { + "componentProperty": false, + "deprecated": false, + "displayName": "Include error message in the return body", + "javaType": "Boolean", + "kind": "parameter", + "order": 3, + "required": false, + "secret": false, + "type": "boolean" + } + } + } + ], + "standardizedErrors": [ + { + "displayName": "ServerError", + "name": "SERVER_ERROR" + } + ] + }, + "id": "io.syndesis:api-provider-end", + "name": "Provided API Return Path", + "pattern": "To" + } + ], + "dependencies": [ + { + "id": "io.syndesis.connector:connector-api-provider:2.0-SNAPSHOT", + "type": "MAVEN" + }, + { + "id": "org.apache.camel:camel-swagger-java:2.23.2.fuse-760011", + "type": "MAVEN" + }, + { + "id": "org.apache.camel:camel-servlet-starter:2.23.2.fuse-760011", + "type": "MAVEN" + } + ], + "description": "Expose Restful APIs", + "icon": "assets:api-provider.svg", + "id": "api-provider", + "metadata": { + "hide-from-connection-pages": "true" + }, + "name": "API Provider", + "version": 64 + }, + "connectorId": "api-provider", + "description": "Expose Restful APIs", + "icon": "assets:api-provider.svg", + "id": "api-provider", + "isDerived": false, + "metadata": { + "hide-from-connection-pages": "true" + }, + "name": "API Provider", + "uses": 0 + }, + "id": "i-LwPppMaz3EFFmQK5RGOz", + "metadata": { + "configured": "true" + }, + "stepKind": "endpoint" + }, + { + "configuredProperties": { + "bodyLoggingEnabled": "false", + "contextLoggingEnabled": "false", + "customText": "Add task" + }, + "id": "-LwPqC--OXnrmequX_Ka", + "metadata": { + "configured": "true" + }, + "name": "Log", + "stepKind": "log" + }, + { + "action": { + "actionType": "step", + "descriptor": { + "inputDataShape": { + "kind": "any", + "name": "All preceding outputs" + }, + "outputDataShape": { + "description": "Parameters of SQL [insert into todo (task, completed) values (:#task, :#completed)]", + "kind": "json-schema", + "metadata": { + "variant": "element" + }, + "name": "SQL Parameter", + "specification": "{\"type\":\"object\",\"$schema\":\"http://json-schema.org/schema#\",\"title\":\"SQL_PARAM_IN\",\"properties\":{\"task\":{\"type\":\"string\",\"required\":true},\"completed\":{\"type\":\"integer\",\"required\":true}}}", + "type": "SQL_PARAM_IN" + } + } + }, + "configuredProperties": { + "atlasmapping": "{\"AtlasMapping\":{\"jsonType\":\"io.atlasmap.v2.AtlasMapping\",\"dataSource\":[{\"jsonType\":\"io.atlasmap.json.v2.JsonDataSource\",\"id\":\"i-LwPppMaz3EFFmQK5RGOz\",\"uri\":\"atlas:json:i-LwPppMaz3EFFmQK5RGOz\",\"dataSourceType\":\"SOURCE\"},{\"jsonType\":\"io.atlasmap.json.v2.JsonDataSource\",\"id\":\"-LwPqJ2nOXnrmequX_Ka\",\"uri\":\"atlas:json:-LwPqJ2nOXnrmequX_Ka\",\"dataSourceType\":\"TARGET\",\"template\":null}],\"mappings\":{\"mapping\":[{\"jsonType\":\"io.atlasmap.v2.Mapping\",\"id\":\"mapping.243105\",\"inputField\":[{\"jsonType\":\"io.atlasmap.json.v2.JsonField\",\"name\":\"completed\",\"path\":\"/body/completed\",\"fieldType\":\"INTEGER\",\"docId\":\"i-LwPppMaz3EFFmQK5RGOz\",\"userCreated\":false}],\"outputField\":[{\"jsonType\":\"io.atlasmap.json.v2.JsonField\",\"name\":\"completed\",\"path\":\"/completed\",\"fieldType\":\"INTEGER\",\"docId\":\"-LwPqJ2nOXnrmequX_Ka\",\"userCreated\":false}]},{\"jsonType\":\"io.atlasmap.v2.Mapping\",\"id\":\"mapping.194027\",\"inputField\":[{\"jsonType\":\"io.atlasmap.json.v2.JsonField\",\"name\":\"task\",\"path\":\"/body/task\",\"fieldType\":\"STRING\",\"docId\":\"i-LwPppMaz3EFFmQK5RGOz\",\"userCreated\":false}],\"outputField\":[{\"jsonType\":\"io.atlasmap.json.v2.JsonField\",\"name\":\"task\",\"path\":\"/task\",\"fieldType\":\"STRING\",\"docId\":\"-LwPqJ2nOXnrmequX_Ka\",\"userCreated\":false}]}]},\"name\":\"UI.64816\",\"lookupTables\":{\"lookupTable\":[]},\"constants\":{\"constant\":[]},\"properties\":{\"property\":[]}}}" + }, + "id": "-LwPqJ3EOXnrmequX_Ka", + "metadata": { + "configured": "true" + }, + "name": "Data Mapper", + "stepKind": "mapper" + }, + { + "action": { + "actionType": "connector", + "description": "Invoke SQL to obtain, store, update, or delete data.", + "descriptor": { + "componentScheme": "sql", + "connectorCustomizers": [ + "io.syndesis.connector.sql.customizer.SqlConnectorCustomizer" + ], + "inputDataShape": { + "description": "Parameters of SQL [insert into todo (task, completed) values (:#task, :#completed)]", + "kind": "json-schema", + "metadata": { + "variant": "element" + }, + "name": "SQL Parameter", + "specification": "{\"type\":\"object\",\"$schema\":\"http://json-schema.org/schema#\",\"title\":\"SQL_PARAM_IN\",\"properties\":{\"task\":{\"type\":\"string\",\"required\":true},\"completed\":{\"type\":\"integer\",\"required\":true}}}", + "type": "SQL_PARAM_IN" + }, + "outputDataShape": { + "description": "Result of SQL [insert into todo (task, completed) values (:#task, :#completed)]", + "kind": "json-schema", + "metadata": { + "variant": "collection" + }, + "name": "SQL Result", + "specification": "{\"type\":\"array\",\"$schema\":\"http://json-schema.org/schema#\",\"items\":{\"type\":\"object\",\"title\":\"SQL_PARAM_OUT\",\"properties\":{\"id\":{\"type\":\"integer\",\"required\":true}}}}", + "type": "SQL_PARAM_OUT" + }, + "propertyDefinitionSteps": [ + { + "description": "Enter a SQL statement that starts with INSERT, SELECT, UPDATE or DELETE.", + "name": "SQL statement", + "properties": { + "batch": { + "defaultValue": "false", + "deprecated": false, + "displayName": "Batch update", + "group": "common", + "javaType": "java.lang.Boolean", + "kind": "property", + "labelHint": "Use prepared statements for INSERT, UPDATE, DELETE in order to update multiple rows with batch update.", + "order": 2, + "required": false, + "secret": false, + "type": "boolean" + }, + "query": { + "dataList": [ + "insert into todo (task, completed) values (:#task, :#completed)" + ], + "defaultValue": "insert into todo (task, completed) values (:#task, :#completed)", + "deprecated": false, + "displayName": "SQL statement", + "group": "common", + "javaType": "java.lang.String", + "kind": "path", + "labelHint": "SQL statement to be executed. Can contain input parameters prefixed by ':#'.", + "order": 1, + "placeholder": "for example ':#MYPARAMNAME'", + "required": true, + "secret": false, + "type": "dataList" + }, + "raiseErrorOnNotFound": { + "defaultValue": "false", + "deprecated": false, + "displayName": "Raise error when record not found", + "group": "common", + "javaType": "java.lang.Boolean", + "kind": "property", + "labelHint": "Error when no records are selected, updated or deleted", + "order": 3, + "required": false, + "secret": false, + "type": "boolean" + } + } + } + ], + "standardizedErrors": [ + { + "displayName": "SqlDataAccessError", + "name": "SQL_DATA_ACCESS_ERROR" + }, + { + "displayName": "SqlEntityNotFoundError", + "name": "SQL_ENTITY_NOT_FOUND_ERROR" + }, + { + "displayName": "SqlConnectorError", + "name": "SQL_CONNECTOR_ERROR" + } + ] + }, + "id": "sql-connector", + "name": "Invoke SQL", + "pattern": "To", + "tags": [ + "dynamic" + ] + }, + "configuredProperties": { + "batch": "false", + "query": "insert into todo (task, completed) values (:#task, :#completed)", + "raiseErrorOnNotFound": "false" + }, + "connection": { + "configuredProperties": { + "password": "»ENC:50a0f4b2d9e6ff8f900571858a112f4532fc26aedf5e581eac7d614e3cf17aa0450a1a255d7c5ab31665ff120c5841fa", + "schema": "sampledb", + "url": "jdbc:postgresql://syndesis-db:5432/sampledb", + "user": "sampledb" + }, + "connector": { + "actions": [ + { + "actionType": "connector", + "description": "Invoke SQL to obtain, store, update, or delete data.", + "descriptor": { + "componentScheme": "sql", + "connectorCustomizers": [ + "io.syndesis.connector.sql.customizer.SqlConnectorCustomizer" + ], + "inputDataShape": { + "kind": "json-schema" + }, + "outputDataShape": { + "kind": "json-schema" + }, + "propertyDefinitionSteps": [ + { + "description": "Enter a SQL statement that starts with INSERT, SELECT, UPDATE or DELETE.", + "name": "SQL statement", + "properties": { + "batch": { + "defaultValue": "false", + "deprecated": false, + "displayName": "Batch update", + "group": "common", + "javaType": "java.lang.Boolean", + "kind": "property", + "labelHint": "Use prepared statements for INSERT, UPDATE, DELETE in order to update multiple rows with batch update.", + "order": 2, + "required": false, + "secret": false, + "type": "boolean" + }, + "query": { + "deprecated": false, + "displayName": "SQL statement", + "group": "common", + "javaType": "java.lang.String", + "kind": "path", + "labelHint": "SQL statement to be executed. Can contain input parameters prefixed by ':#'.", + "order": 1, + "placeholder": "for example ':#MYPARAMNAME'", + "required": true, + "secret": false, + "type": "dataList" + }, + "raiseErrorOnNotFound": { + "defaultValue": "false", + "deprecated": false, + "displayName": "Raise error when record not found", + "group": "common", + "javaType": "java.lang.Boolean", + "kind": "property", + "labelHint": "Error when no records are selected, updated or deleted", + "order": 3, + "required": false, + "secret": false, + "type": "boolean" + } + } + } + ], + "standardizedErrors": [ + { + "displayName": "SqlDataAccessError", + "name": "SQL_DATA_ACCESS_ERROR" + }, + { + "displayName": "SqlEntityNotFoundError", + "name": "SQL_ENTITY_NOT_FOUND_ERROR" + }, + { + "displayName": "SqlConnectorError", + "name": "SQL_CONNECTOR_ERROR" + } + ] + }, + "id": "sql-connector", + "name": "Invoke SQL", + "pattern": "To", + "tags": [ + "dynamic" + ] + }, + { + "actionType": "connector", + "description": "Periodically invoke SQL to obtain data.", + "descriptor": { + "componentScheme": "sql", + "connectorCustomizers": [ + "io.syndesis.connector.sql.customizer.SqlStartConnectorCustomizer" + ], + "inputDataShape": { + "kind": "none" + }, + "outputDataShape": { + "kind": "json-schema" + }, + "propertyDefinitionSteps": [ + { + "description": "Enter a SQL statement that returns results, such as SELECT.", + "name": "SQL statement", + "properties": { + "isRaiseErrorOnNotFound": { + "deprecated": false, + "displayName": "Raise NotFoundError", + "group": "consumer", + "javaType": "java.lang.Boolean", + "kind": "parameter", + "labelHint": "Raise NotFoundError if no records are inserted, updated, selected or deleted", + "order": 3, + "required": false, + "secret": false, + "type": "boolean" + }, + "query": { + "deprecated": false, + "displayName": "SQL statement", + "group": "common", + "javaType": "java.lang.String", + "kind": "path", + "labelHint": "SQL statement to be executed.", + "order": 1, + "required": true, + "secret": false, + "type": "dataList" + }, + "schedulerExpression": { + "defaultValue": "60000", + "deprecated": false, + "displayName": "Period", + "group": "consumer", + "javaType": "long", + "kind": "parameter", + "labelHint": "Delay between scheduling (executing).", + "order": 2, + "required": false, + "secret": false, + "type": "duration" + } + } + } + ] + }, + "id": "sql-start-connector", + "name": "Periodic SQL invocation", + "pattern": "From", + "tags": [ + "dynamic" + ] + }, + { + "actionType": "connector", + "description": "Invoke a stored procedure.", + "descriptor": { + "componentScheme": "sql-stored", + "connectorCustomizers": [ + "io.syndesis.connector.sql.customizer.SqlStoredConnectorCustomizer" + ], + "inputDataShape": { + "kind": "json-schema" + }, + "outputDataShape": { + "kind": "json-schema" + }, + "propertyDefinitionSteps": [ + { + "description": "Select the stored procedure.", + "name": "Procedure name", + "properties": { + "procedureName": { + "componentProperty": true, + "deprecated": false, + "displayName": "Procedure name", + "group": "common", + "javaType": "java.lang.String", + "kind": "property", + "labelHint": "Name of the stored procedure.", + "required": false, + "secret": false, + "type": "select" + }, + "template": { + "componentProperty": false, + "deprecated": false, + "displayName": "Template", + "group": "producer", + "javaType": "java.lang.String", + "kind": "path", + "labelHint": "Stored procedure template to perform.", + "required": false, + "secret": false, + "type": "hidden" + } + } + } + ] + }, + "id": "sql-stored-connector", + "name": "Invoke stored procedure", + "pattern": "To", + "tags": [ + "dynamic" + ] + }, + { + "actionType": "connector", + "description": "Periodically invoke a stored procedure.", + "descriptor": { + "componentScheme": "sql-stored", + "connectorCustomizers": [ + "io.syndesis.connector.sql.customizer.SqlStartStoredConnectorCustomizer" + ], + "inputDataShape": { + "kind": "none" + }, + "outputDataShape": { + "kind": "json-schema" + }, + "propertyDefinitionSteps": [ + { + "description": "Select the stored procedure.", + "name": "Procedure name", + "properties": { + "procedureName": { + "componentProperty": true, + "deprecated": false, + "displayName": "Procedure name", + "group": "producer", + "javaType": "java.lang.String", + "kind": "path", + "labelHint": "Name of the stored procedure.", + "required": true, + "secret": false, + "type": "select" + }, + "schedulerExpression": { + "defaultValue": "60000", + "deprecated": false, + "displayName": "Period", + "group": "consumer", + "javaType": "long", + "kind": "parameter", + "labelHint": "Delay between scheduling (executing).", + "required": false, + "secret": false, + "type": "duration" + }, + "template": { + "componentProperty": false, + "deprecated": false, + "displayName": "Template", + "group": "producer", + "javaType": "java.lang.String", + "kind": "path", + "labelHint": "Stored Procedure template to perform.", + "required": true, + "secret": false, + "type": "hidden" + } + } + } + ] + }, + "id": "sql-stored-start-connector", + "name": "Periodic stored procedure invocation", + "pattern": "From", + "tags": [ + "dynamic" + ] + } + ], + "connectorCustomizers": [ + "io.syndesis.connector.sql.customizer.DataSourceCustomizer" + ], + "dependencies": [ + { + "id": "io.syndesis.connector:connector-sql:2.0-SNAPSHOT", + "type": "MAVEN" + }, + { + "id": "jdbc-driver", + "type": "EXTENSION_TAG" + } + ], + "description": "Invoke SQL to obtain, store, update, or delete data.", + "icon": "assets:sql.svg", + "id": "sql", + "name": "Database", + "properties": { + "password": { + "componentProperty": true, + "deprecated": false, + "displayName": "Password", + "group": "security", + "javaType": "java.lang.String", + "kind": "property", + "label": "common,security", + "labelHint": "Password for the database connection.", + "order": 3, + "required": true, + "secret": true, + "type": "string" + }, + "schema": { + "componentProperty": true, + "deprecated": false, + "displayName": "Schema", + "group": "common", + "javaType": "java.lang.String", + "kind": "property", + "label": "common", + "labelHint": "Database schema.", + "order": 4, + "required": false, + "secret": false, + "type": "string" + }, + "url": { + "componentProperty": true, + "deprecated": false, + "displayName": "Connection URL", + "group": "common", + "javaType": "java.lang.String", + "kind": "property", + "labelHint": "JDBC URL of the database.", + "order": 1, + "required": true, + "secret": false, + "type": "string" + }, + "user": { + "componentProperty": true, + "deprecated": false, + "displayName": "Username", + "group": "common", + "javaType": "java.lang.String", + "kind": "property", + "labelHint": "Username for the database connection.", + "order": 2, + "required": true, + "secret": false, + "type": "string" + } + }, + "tags": [ + "verifier" + ], + "version": 64 + }, + "connectorId": "sql", + "description": "Connection to SampleDB", + "icon": "assets:sql.svg", + "id": "5", + "isDerived": false, + "name": "PostgresDB", + "tags": [ + "sampledb" + ], + "uses": 0 + }, + "id": "-LwPqJ2nOXnrmequX_Ka", + "metadata": { + "configured": "true" + }, + "stepKind": "endpoint" + }, + { + "action": { + "actionType": "step", + "descriptor": { + "inputDataShape": { + "kind": "any", + "name": "All preceding outputs" + }, + "outputDataShape": { + "description": "API response payload", + "kind": "json-schema", + "metadata": { + "unified": "true" + }, + "name": "Response", + "specification": "{\"$schema\":\"http://json-schema.org/schema#\",\"type\":\"object\",\"$id\":\"io:syndesis:wrapped\",\"properties\":{\"body\":{\"type\":\"object\",\"properties\":{\"id\":{\"title\":\"Task ID\",\"description\":\"Unique task identifier\",\"type\":\"integer\"},\"task\":{\"title\":\"The task\",\"description\":\"Task line\",\"type\":\"string\"},\"completed\":{\"title\":\"Task completition status\",\"description\":\"0 - ongoing, 1 - completed\",\"maximum\":1,\"minimum\":0,\"type\":\"integer\"}}}}}" + } + } + }, + "configuredProperties": { + "atlasmapping": "{\"AtlasMapping\":{\"jsonType\":\"io.atlasmap.v2.AtlasMapping\",\"dataSource\":[{\"jsonType\":\"io.atlasmap.json.v2.JsonDataSource\",\"id\":\"i-LwPppMaz3EFFmQK5RGOz\",\"uri\":\"atlas:json:i-LwPppMaz3EFFmQK5RGOz\",\"dataSourceType\":\"SOURCE\"},{\"jsonType\":\"io.atlasmap.json.v2.JsonDataSource\",\"id\":\"-LwPqJ3EOXnrmequX_Ka\",\"uri\":\"atlas:json:-LwPqJ3EOXnrmequX_Ka\",\"dataSourceType\":\"SOURCE\"},{\"jsonType\":\"io.atlasmap.json.v2.JsonDataSource\",\"id\":\"-LwPqJ2nOXnrmequX_Ka\",\"uri\":\"atlas:json:-LwPqJ2nOXnrmequX_Ka\",\"dataSourceType\":\"SOURCE\"},{\"jsonType\":\"io.atlasmap.json.v2.JsonDataSource\",\"id\":\"i-LwPppMaz3EFFmQK5RGPz\",\"uri\":\"atlas:json:i-LwPppMaz3EFFmQK5RGPz\",\"dataSourceType\":\"TARGET\",\"template\":null}],\"mappings\":{\"mapping\":[{\"jsonType\":\"io.atlasmap.v2.Mapping\",\"id\":\"mapping.443565\",\"inputField\":[{\"jsonType\":\"io.atlasmap.json.v2.JsonField\",\"name\":\"completed\",\"path\":\"/body/completed\",\"fieldType\":\"INTEGER\",\"docId\":\"i-LwPppMaz3EFFmQK5RGOz\",\"userCreated\":false}],\"outputField\":[{\"jsonType\":\"io.atlasmap.json.v2.JsonField\",\"name\":\"completed\",\"path\":\"/body/completed\",\"fieldType\":\"INTEGER\",\"docId\":\"i-LwPppMaz3EFFmQK5RGPz\",\"userCreated\":false}]},{\"jsonType\":\"io.atlasmap.v2.Mapping\",\"id\":\"mapping.460420\",\"inputField\":[{\"jsonType\":\"io.atlasmap.json.v2.JsonField\",\"name\":\"task\",\"path\":\"/body/task\",\"fieldType\":\"STRING\",\"docId\":\"i-LwPppMaz3EFFmQK5RGOz\",\"userCreated\":false}],\"outputField\":[{\"jsonType\":\"io.atlasmap.json.v2.JsonField\",\"name\":\"task\",\"path\":\"/body/task\",\"fieldType\":\"STRING\",\"docId\":\"i-LwPppMaz3EFFmQK5RGPz\",\"userCreated\":false}]},{\"jsonType\":\"io.atlasmap.v2.Mapping\",\"id\":\"mapping.606033\",\"inputFieldGroup\":{\"jsonType\":\"io.atlasmap.v2.FieldGroup\",\"actions\":[{\"Concatenate\":{\"delimiter\":\" \"}}],\"field\":[{\"jsonType\":\"io.atlasmap.json.v2.JsonField\",\"name\":\"id\",\"path\":\"/<>/id\",\"fieldType\":\"INTEGER\",\"docId\":\"-LwPqJ2nOXnrmequX_Ka\",\"userCreated\":false,\"index\":0}]},\"outputField\":[{\"jsonType\":\"io.atlasmap.json.v2.JsonField\",\"name\":\"id\",\"path\":\"/body/id\",\"fieldType\":\"INTEGER\",\"docId\":\"i-LwPppMaz3EFFmQK5RGPz\",\"userCreated\":false}]}]},\"name\":\"UI.801930\",\"lookupTables\":{\"lookupTable\":[]},\"constants\":{\"constant\":[]},\"properties\":{\"property\":[]}}}" + }, + "id": "-LwPqNSbOXnrmequX_Kb", + "metadata": { + "configured": "true" + }, + "name": "Data Mapper", + "stepKind": "mapper" + }, + { + "action": { + "actionType": "connector", + "description": "End action of Syndesis integrations that start from a provided API", + "descriptor": { + "componentScheme": "bean", + "configuredProperties": { + "beanName": "io.syndesis.connector.apiprovider.NoOpBean", + "method": "process" + }, + "connectorCustomizers": [ + "io.syndesis.connector.apiprovider.ApiProviderReturnPathCustomizer" + ], + "inputDataShape": { + "description": "API response payload", + "kind": "json-schema", + "metadata": { + "unified": "true" + }, + "name": "Response", + "specification": "{\"$schema\":\"http://json-schema.org/schema#\",\"type\":\"object\",\"$id\":\"io:syndesis:wrapped\",\"properties\":{\"body\":{\"type\":\"object\",\"properties\":{\"id\":{\"title\":\"Task ID\",\"description\":\"Unique task identifier\",\"type\":\"integer\"},\"task\":{\"title\":\"The task\",\"description\":\"Task line\",\"type\":\"string\"},\"completed\":{\"title\":\"Task completition status\",\"description\":\"0 - ongoing, 1 - completed\",\"maximum\":1,\"minimum\":0,\"type\":\"integer\"}}}}}" + }, + "outputDataShape": { + "kind": "none" + }, + "propertyDefinitionSteps": [ + { + "description": "API Provider Return Path Configuration", + "name": "configuration", + "properties": { + "defaultResponse": { + "componentProperty": false, + "deprecated": false, + "displayName": "Default Response", + "javaType": "String", + "kind": "parameter", + "order": 0, + "required": false, + "secret": false, + "type": "legend" + }, + "errorHandling": { + "componentProperty": false, + "deprecated": false, + "displayName": "Error Handling", + "javaType": "String", + "kind": "parameter", + "order": 2, + "required": false, + "secret": false, + "type": "legend" + }, + "errorResponseCodes": { + "componentProperty": false, + "defaultValue": "{}", + "deprecated": false, + "description": "The return code to set according to different error situations", + "displayName": "Error Response Codes", + "extendedProperties": "{ \"mapsetValueDefinition\": { \"enum\" : [{\"label\":\"201 All is good\",\"value\":\"201\"}], \"type\" : \"select\" },\"mapsetOptions\": { \"i18nKeyColumnTitle\": \"When the error message is\", \"i18nValueColumnTitle\": \"Return this HTTP response code\" }}", + "javaType": "Map", + "kind": "parameter", + "order": 4, + "required": false, + "secret": false, + "type": "mapset" + }, + "httpResponseCode": { + "componentProperty": false, + "deprecated": false, + "description": "The return code to set in the HTTP response", + "displayName": "Return Code", + "enum": [ + { + "label": "201 All is good", + "value": "201" + } + ], + "javaType": "String", + "kind": "parameter", + "order": 1, + "required": true, + "secret": false, + "type": "select" + }, + "returnBody": { + "componentProperty": false, + "deprecated": false, + "displayName": "Include error message in the return body", + "javaType": "Boolean", + "kind": "parameter", + "order": 3, + "required": false, + "secret": false, + "type": "boolean" + } + } + } + ], + "standardizedErrors": [ + { + "displayName": "ServerError", + "name": "SERVER_ERROR" + } + ] + }, + "id": "io.syndesis:api-provider-end", + "name": "Provided API Return Path", + "pattern": "To", + "tags": [ + "locked-action" + ] + }, + "configuredProperties": { + "errorResponseCodes": "{}", + "httpResponseCode": "201", + "returnBody": "false" + }, + "connection": { + "connector": { + "actions": [ + { + "actionType": "connector", + "description": "Start a Syndesis integration from a provided API", + "descriptor": { + "componentScheme": "direct", + "connectorCustomizers": [ + "io.syndesis.connector.apiprovider.ApiProviderStartEndpointCustomizer" + ], + "inputDataShape": { + "kind": "none" + }, + "outputDataShape": { + "kind": "any" + }, + "propertyDefinitionSteps": [ + { + "description": "API Provider Configuration", + "name": "configuration", + "properties": { + "name": { + "componentProperty": false, + "deprecated": false, + "description": "The operation ID as defined in the API spec", + "displayName": "Operation ID", + "javaType": "String", + "kind": "parameter", + "required": true, + "secret": false, + "type": "string" + } + } + } + ] + }, + "id": "io.syndesis:api-provider-start", + "name": "Provided API", + "pattern": "From", + "tags": [ + "expose" + ] + }, + { + "actionType": "connector", + "description": "End action of Syndesis integrations that start from a provided API", + "descriptor": { + "componentScheme": "bean", + "configuredProperties": { + "beanName": "io.syndesis.connector.apiprovider.NoOpBean", + "method": "process" + }, + "connectorCustomizers": [ + "io.syndesis.connector.apiprovider.ApiProviderReturnPathCustomizer" + ], + "inputDataShape": { + "kind": "any" + }, + "outputDataShape": { + "kind": "none" + }, + "propertyDefinitionSteps": [ + { + "description": "API Provider Return Path Configuration", + "name": "configuration", + "properties": { + "defaultResponse": { + "componentProperty": false, + "deprecated": false, + "displayName": "Default Response", + "javaType": "String", + "kind": "parameter", + "order": 0, + "required": false, + "secret": false, + "type": "legend" + }, + "errorHandling": { + "componentProperty": false, + "deprecated": false, + "displayName": "Error Handling", + "javaType": "String", + "kind": "parameter", + "order": 2, + "required": false, + "secret": false, + "type": "legend" + }, + "errorResponseCodes": { + "componentProperty": false, + "defaultValue": "{}", + "deprecated": false, + "description": "The return code to set according to different error situations", + "displayName": "Error Response Codes", + "javaType": "Map", + "kind": "parameter", + "order": 4, + "required": false, + "secret": false, + "type": "mapset" + }, + "httpResponseCode": { + "componentProperty": false, + "deprecated": false, + "description": "The return code to set in the HTTP response", + "displayName": "Return Code", + "javaType": "String", + "kind": "parameter", + "order": 1, + "required": true, + "secret": false, + "type": "select" + }, + "returnBody": { + "componentProperty": false, + "deprecated": false, + "displayName": "Include error message in the return body", + "javaType": "Boolean", + "kind": "parameter", + "order": 3, + "required": false, + "secret": false, + "type": "boolean" + } + } + } + ], + "standardizedErrors": [ + { + "displayName": "ServerError", + "name": "SERVER_ERROR" + } + ] + }, + "id": "io.syndesis:api-provider-end", + "name": "Provided API Return Path", + "pattern": "To" + } + ], + "dependencies": [ + { + "id": "io.syndesis.connector:connector-api-provider:2.0-SNAPSHOT", + "type": "MAVEN" + }, + { + "id": "org.apache.camel:camel-swagger-java:2.23.2.fuse-760011", + "type": "MAVEN" + }, + { + "id": "org.apache.camel:camel-servlet-starter:2.23.2.fuse-760011", + "type": "MAVEN" + } + ], + "description": "Expose Restful APIs", + "icon": "assets:api-provider.svg", + "id": "api-provider", + "metadata": { + "hide-from-connection-pages": "true" + }, + "name": "API Provider", + "version": 64 + }, + "connectorId": "api-provider", + "description": "Expose Restful APIs", + "icon": "assets:api-provider.svg", + "id": "api-provider", + "isDerived": false, + "metadata": { + "hide-from-connection-pages": "true" + }, + "name": "API Provider", + "uses": 0 + }, + "id": "i-LwPppMaz3EFFmQK5RGPz", + "metadata": { + "configured": "true" + }, + "stepKind": "endpoint" + } + ], + "tags": [ + "5", + "api-provider" + ], + "type": "API_PROVIDER" + }, + { + "description": "GET /{id}", + "id": "i-LwPppMaz3EFFmQK5RGTz", + "metadata": { + "default-return-code": "200", + "excerpt": "200 All is good", + "openapi-operationid": "getTask", + "return-code-edited": "true" + }, + "name": "Fetch task", + "steps": [ + { + "action": { + "actionType": "connector", + "description": "Start a Syndesis integration from a provided API", + "descriptor": { + "componentScheme": "direct", + "connectorCustomizers": [ + "io.syndesis.connector.apiprovider.ApiProviderStartEndpointCustomizer" + ], + "inputDataShape": { + "kind": "none" + }, + "outputDataShape": { + "description": "API request payload", + "kind": "json-schema", + "metadata": { + "unified": "true" + }, + "name": "Request", + "specification": "{\"$schema\":\"http://json-schema.org/schema#\",\"type\":\"object\",\"$id\":\"io:syndesis:wrapped\",\"properties\":{\"parameters\":{\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"integer\",\"title\":\"id\",\"description\":\"Task identifier\"}}}}}" + }, + "propertyDefinitionSteps": [ + { + "description": "API Provider Configuration", + "name": "configuration", + "properties": { + "name": { + "componentProperty": false, + "deprecated": false, + "description": "The operation ID as defined in the API spec", + "displayName": "Operation ID", + "javaType": "String", + "kind": "parameter", + "required": true, + "secret": false, + "type": "string" + } + } + } + ] + }, + "id": "io.syndesis:api-provider-start", + "metadata": { + "serverBasePath": "/api" + }, + "name": "Provided API", + "pattern": "From", + "tags": [ + "expose", + "locked-action" + ] + }, + "configuredProperties": { + "name": "getTask" + }, + "connection": { + "connector": { + "actions": [ + { + "actionType": "connector", + "description": "Start a Syndesis integration from a provided API", + "descriptor": { + "componentScheme": "direct", + "connectorCustomizers": [ + "io.syndesis.connector.apiprovider.ApiProviderStartEndpointCustomizer" + ], + "inputDataShape": { + "kind": "none" + }, + "outputDataShape": { + "kind": "any" + }, + "propertyDefinitionSteps": [ + { + "description": "API Provider Configuration", + "name": "configuration", + "properties": { + "name": { + "componentProperty": false, + "deprecated": false, + "description": "The operation ID as defined in the API spec", + "displayName": "Operation ID", + "javaType": "String", + "kind": "parameter", + "required": true, + "secret": false, + "type": "string" + } + } + } + ] + }, + "id": "io.syndesis:api-provider-start", + "name": "Provided API", + "pattern": "From", + "tags": [ + "expose" + ] + }, + { + "actionType": "connector", + "description": "End action of Syndesis integrations that start from a provided API", + "descriptor": { + "componentScheme": "bean", + "configuredProperties": { + "beanName": "io.syndesis.connector.apiprovider.NoOpBean", + "method": "process" + }, + "connectorCustomizers": [ + "io.syndesis.connector.apiprovider.ApiProviderReturnPathCustomizer" + ], + "inputDataShape": { + "kind": "any" + }, + "outputDataShape": { + "kind": "none" + }, + "propertyDefinitionSteps": [ + { + "description": "API Provider Return Path Configuration", + "name": "configuration", + "properties": { + "defaultResponse": { + "componentProperty": false, + "deprecated": false, + "displayName": "Default Response", + "javaType": "String", + "kind": "parameter", + "order": 0, + "required": false, + "secret": false, + "type": "legend" + }, + "errorHandling": { + "componentProperty": false, + "deprecated": false, + "displayName": "Error Handling", + "javaType": "String", + "kind": "parameter", + "order": 2, + "required": false, + "secret": false, + "type": "legend" + }, + "errorResponseCodes": { + "componentProperty": false, + "defaultValue": "{}", + "deprecated": false, + "description": "The return code to set according to different error situations", + "displayName": "Error Response Codes", + "javaType": "Map", + "kind": "parameter", + "order": 4, + "required": false, + "secret": false, + "type": "mapset" + }, + "httpResponseCode": { + "componentProperty": false, + "deprecated": false, + "description": "The return code to set in the HTTP response", + "displayName": "Return Code", + "javaType": "String", + "kind": "parameter", + "order": 1, + "required": true, + "secret": false, + "type": "select" + }, + "returnBody": { + "componentProperty": false, + "deprecated": false, + "displayName": "Include error message in the return body", + "javaType": "Boolean", + "kind": "parameter", + "order": 3, + "required": false, + "secret": false, + "type": "boolean" + } + } + } + ], + "standardizedErrors": [ + { + "displayName": "ServerError", + "name": "SERVER_ERROR" + } + ] + }, + "id": "io.syndesis:api-provider-end", + "name": "Provided API Return Path", + "pattern": "To" + } + ], + "dependencies": [ + { + "id": "io.syndesis.connector:connector-api-provider:2.0-SNAPSHOT", + "type": "MAVEN" + }, + { + "id": "org.apache.camel:camel-swagger-java:2.23.2.fuse-760011", + "type": "MAVEN" + }, + { + "id": "org.apache.camel:camel-servlet-starter:2.23.2.fuse-760011", + "type": "MAVEN" + } + ], + "description": "Expose Restful APIs", + "icon": "assets:api-provider.svg", + "id": "api-provider", + "metadata": { + "hide-from-connection-pages": "true" + }, + "name": "API Provider", + "version": 64 + }, + "connectorId": "api-provider", + "description": "Expose Restful APIs", + "icon": "assets:api-provider.svg", + "id": "api-provider", + "isDerived": false, + "metadata": { + "hide-from-connection-pages": "true" + }, + "name": "API Provider", + "uses": 0 + }, + "id": "i-LwPppMaz3EFFmQK5RGRz", + "metadata": { + "configured": "true" + }, + "stepKind": "endpoint" + }, + { + "configuredProperties": { + "bodyLoggingEnabled": "false", + "contextLoggingEnabled": "false", + "customText": "Get task" + }, + "id": "-LwPqVpxOXnrmequX_Kb", + "metadata": { + "configured": "true" + }, + "name": "Log", + "stepKind": "log" + }, + { + "action": { + "actionType": "step", + "descriptor": { + "inputDataShape": { + "kind": "any", + "name": "All preceding outputs" + }, + "outputDataShape": { + "description": "Parameters of SQL [select * from todo where id=:#id]", + "kind": "json-schema", + "metadata": { + "variant": "element" + }, + "name": "SQL Parameter", + "specification": "{\"type\":\"object\",\"$schema\":\"http://json-schema.org/schema#\",\"title\":\"SQL_PARAM_IN\",\"properties\":{\"id\":{\"type\":\"integer\",\"required\":true}}}", + "type": "SQL_PARAM_IN" + } + } + }, + "configuredProperties": { + "atlasmapping": "{\"AtlasMapping\":{\"jsonType\":\"io.atlasmap.v2.AtlasMapping\",\"dataSource\":[{\"jsonType\":\"io.atlasmap.json.v2.JsonDataSource\",\"id\":\"i-LwPppMaz3EFFmQK5RGRz\",\"uri\":\"atlas:json:i-LwPppMaz3EFFmQK5RGRz\",\"dataSourceType\":\"SOURCE\"},{\"jsonType\":\"io.atlasmap.json.v2.JsonDataSource\",\"id\":\"-LwPqaTZOXnrmequX_Kb\",\"uri\":\"atlas:json:-LwPqaTZOXnrmequX_Kb\",\"dataSourceType\":\"TARGET\",\"template\":null}],\"mappings\":{\"mapping\":[{\"jsonType\":\"io.atlasmap.v2.Mapping\",\"id\":\"mapping.400807\",\"inputField\":[{\"jsonType\":\"io.atlasmap.json.v2.JsonField\",\"name\":\"id\",\"path\":\"/parameters/id\",\"fieldType\":\"INTEGER\",\"docId\":\"i-LwPppMaz3EFFmQK5RGRz\",\"userCreated\":false}],\"outputField\":[{\"jsonType\":\"io.atlasmap.json.v2.JsonField\",\"name\":\"id\",\"path\":\"/id\",\"fieldType\":\"INTEGER\",\"docId\":\"-LwPqaTZOXnrmequX_Kb\",\"userCreated\":false}]}]},\"name\":\"UI.630223\",\"lookupTables\":{\"lookupTable\":[]},\"constants\":{\"constant\":[]},\"properties\":{\"property\":[]}}}" + }, + "id": "-LwPqaUIOXnrmequX_Kb", + "metadata": { + "configured": "true" + }, + "name": "Data Mapper", + "stepKind": "mapper" + }, + { + "action": { + "actionType": "connector", + "description": "Invoke SQL to obtain, store, update, or delete data.", + "descriptor": { + "componentScheme": "sql", + "connectorCustomizers": [ + "io.syndesis.connector.sql.customizer.SqlConnectorCustomizer" + ], + "inputDataShape": { + "description": "Parameters of SQL [select * from todo where id=:#id]", + "kind": "json-schema", + "metadata": { + "variant": "element" + }, + "name": "SQL Parameter", + "specification": "{\"type\":\"object\",\"$schema\":\"http://json-schema.org/schema#\",\"title\":\"SQL_PARAM_IN\",\"properties\":{\"id\":{\"type\":\"integer\",\"required\":true}}}", + "type": "SQL_PARAM_IN" + }, + "outputDataShape": { + "description": "Result of SQL [select * from todo where id=:#id]", + "kind": "json-schema", + "metadata": { + "variant": "collection" + }, + "name": "SQL Result", + "specification": "{\"type\":\"array\",\"$schema\":\"http://json-schema.org/schema#\",\"items\":{\"type\":\"object\",\"title\":\"SQL_PARAM_OUT\",\"properties\":{\"id\":{\"type\":\"integer\",\"required\":true},\"task\":{\"type\":\"string\",\"required\":true},\"completed\":{\"type\":\"integer\",\"required\":true}}}}", + "type": "SQL_PARAM_OUT" + }, + "propertyDefinitionSteps": [ + { + "description": "Enter a SQL statement that starts with INSERT, SELECT, UPDATE or DELETE.", + "name": "SQL statement", + "properties": { + "batch": { + "defaultValue": "false", + "deprecated": false, + "displayName": "Batch update", + "group": "common", + "javaType": "java.lang.Boolean", + "kind": "property", + "labelHint": "Use prepared statements for INSERT, UPDATE, DELETE in order to update multiple rows with batch update.", + "order": 2, + "required": false, + "secret": false, + "type": "boolean" + }, + "query": { + "dataList": [ + "select * from todo where id=:#id" + ], + "defaultValue": "select * from todo where id=:#id", + "deprecated": false, + "displayName": "SQL statement", + "group": "common", + "javaType": "java.lang.String", + "kind": "path", + "labelHint": "SQL statement to be executed. Can contain input parameters prefixed by ':#'.", + "order": 1, + "placeholder": "for example ':#MYPARAMNAME'", + "required": true, + "secret": false, + "type": "dataList" + }, + "raiseErrorOnNotFound": { + "defaultValue": "false", + "deprecated": false, + "displayName": "Raise error when record not found", + "group": "common", + "javaType": "java.lang.Boolean", + "kind": "property", + "labelHint": "Error when no records are selected, updated or deleted", + "order": 3, + "required": false, + "secret": false, + "type": "boolean" + } + } + } + ], + "standardizedErrors": [ + { + "displayName": "SqlDataAccessError", + "name": "SQL_DATA_ACCESS_ERROR" + }, + { + "displayName": "SqlEntityNotFoundError", + "name": "SQL_ENTITY_NOT_FOUND_ERROR" + }, + { + "displayName": "SqlConnectorError", + "name": "SQL_CONNECTOR_ERROR" + } + ] + }, + "id": "sql-connector", + "name": "Invoke SQL", + "pattern": "To", + "tags": [ + "dynamic" + ] + }, + "configuredProperties": { + "batch": "false", + "query": "select * from todo where id=:#id", + "raiseErrorOnNotFound": "true" + }, + "connection": { + "configuredProperties": { + "password": "»ENC:50a0f4b2d9e6ff8f900571858a112f4532fc26aedf5e581eac7d614e3cf17aa0450a1a255d7c5ab31665ff120c5841fa", + "schema": "sampledb", + "url": "jdbc:postgresql://syndesis-db:5432/sampledb", + "user": "sampledb" + }, + "connector": { + "actions": [ + { + "actionType": "connector", + "description": "Invoke SQL to obtain, store, update, or delete data.", + "descriptor": { + "componentScheme": "sql", + "connectorCustomizers": [ + "io.syndesis.connector.sql.customizer.SqlConnectorCustomizer" + ], + "inputDataShape": { + "kind": "json-schema" + }, + "outputDataShape": { + "kind": "json-schema" + }, + "propertyDefinitionSteps": [ + { + "description": "Enter a SQL statement that starts with INSERT, SELECT, UPDATE or DELETE.", + "name": "SQL statement", + "properties": { + "batch": { + "defaultValue": "false", + "deprecated": false, + "displayName": "Batch update", + "group": "common", + "javaType": "java.lang.Boolean", + "kind": "property", + "labelHint": "Use prepared statements for INSERT, UPDATE, DELETE in order to update multiple rows with batch update.", + "order": 2, + "required": false, + "secret": false, + "type": "boolean" + }, + "query": { + "deprecated": false, + "displayName": "SQL statement", + "group": "common", + "javaType": "java.lang.String", + "kind": "path", + "labelHint": "SQL statement to be executed. Can contain input parameters prefixed by ':#'.", + "order": 1, + "placeholder": "for example ':#MYPARAMNAME'", + "required": true, + "secret": false, + "type": "dataList" + }, + "raiseErrorOnNotFound": { + "defaultValue": "false", + "deprecated": false, + "displayName": "Raise error when record not found", + "group": "common", + "javaType": "java.lang.Boolean", + "kind": "property", + "labelHint": "Error when no records are selected, updated or deleted", + "order": 3, + "required": false, + "secret": false, + "type": "boolean" + } + } + } + ], + "standardizedErrors": [ + { + "displayName": "SqlDataAccessError", + "name": "SQL_DATA_ACCESS_ERROR" + }, + { + "displayName": "SqlEntityNotFoundError", + "name": "SQL_ENTITY_NOT_FOUND_ERROR" + }, + { + "displayName": "SqlConnectorError", + "name": "SQL_CONNECTOR_ERROR" + } + ] + }, + "id": "sql-connector", + "name": "Invoke SQL", + "pattern": "To", + "tags": [ + "dynamic" + ] + }, + { + "actionType": "connector", + "description": "Periodically invoke SQL to obtain data.", + "descriptor": { + "componentScheme": "sql", + "connectorCustomizers": [ + "io.syndesis.connector.sql.customizer.SqlStartConnectorCustomizer" + ], + "inputDataShape": { + "kind": "none" + }, + "outputDataShape": { + "kind": "json-schema" + }, + "propertyDefinitionSteps": [ + { + "description": "Enter a SQL statement that returns results, such as SELECT.", + "name": "SQL statement", + "properties": { + "isRaiseErrorOnNotFound": { + "deprecated": false, + "displayName": "Raise NotFoundError", + "group": "consumer", + "javaType": "java.lang.Boolean", + "kind": "parameter", + "labelHint": "Raise NotFoundError if no records are inserted, updated, selected or deleted", + "order": 3, + "required": false, + "secret": false, + "type": "boolean" + }, + "query": { + "deprecated": false, + "displayName": "SQL statement", + "group": "common", + "javaType": "java.lang.String", + "kind": "path", + "labelHint": "SQL statement to be executed.", + "order": 1, + "required": true, + "secret": false, + "type": "dataList" + }, + "schedulerExpression": { + "defaultValue": "60000", + "deprecated": false, + "displayName": "Period", + "group": "consumer", + "javaType": "long", + "kind": "parameter", + "labelHint": "Delay between scheduling (executing).", + "order": 2, + "required": false, + "secret": false, + "type": "duration" + } + } + } + ] + }, + "id": "sql-start-connector", + "name": "Periodic SQL invocation", + "pattern": "From", + "tags": [ + "dynamic" + ] + }, + { + "actionType": "connector", + "description": "Invoke a stored procedure.", + "descriptor": { + "componentScheme": "sql-stored", + "connectorCustomizers": [ + "io.syndesis.connector.sql.customizer.SqlStoredConnectorCustomizer" + ], + "inputDataShape": { + "kind": "json-schema" + }, + "outputDataShape": { + "kind": "json-schema" + }, + "propertyDefinitionSteps": [ + { + "description": "Select the stored procedure.", + "name": "Procedure name", + "properties": { + "procedureName": { + "componentProperty": true, + "deprecated": false, + "displayName": "Procedure name", + "group": "common", + "javaType": "java.lang.String", + "kind": "property", + "labelHint": "Name of the stored procedure.", + "required": false, + "secret": false, + "type": "select" + }, + "template": { + "componentProperty": false, + "deprecated": false, + "displayName": "Template", + "group": "producer", + "javaType": "java.lang.String", + "kind": "path", + "labelHint": "Stored procedure template to perform.", + "required": false, + "secret": false, + "type": "hidden" + } + } + } + ] + }, + "id": "sql-stored-connector", + "name": "Invoke stored procedure", + "pattern": "To", + "tags": [ + "dynamic" + ] + }, + { + "actionType": "connector", + "description": "Periodically invoke a stored procedure.", + "descriptor": { + "componentScheme": "sql-stored", + "connectorCustomizers": [ + "io.syndesis.connector.sql.customizer.SqlStartStoredConnectorCustomizer" + ], + "inputDataShape": { + "kind": "none" + }, + "outputDataShape": { + "kind": "json-schema" + }, + "propertyDefinitionSteps": [ + { + "description": "Select the stored procedure.", + "name": "Procedure name", + "properties": { + "procedureName": { + "componentProperty": true, + "deprecated": false, + "displayName": "Procedure name", + "group": "producer", + "javaType": "java.lang.String", + "kind": "path", + "labelHint": "Name of the stored procedure.", + "required": true, + "secret": false, + "type": "select" + }, + "schedulerExpression": { + "defaultValue": "60000", + "deprecated": false, + "displayName": "Period", + "group": "consumer", + "javaType": "long", + "kind": "parameter", + "labelHint": "Delay between scheduling (executing).", + "required": false, + "secret": false, + "type": "duration" + }, + "template": { + "componentProperty": false, + "deprecated": false, + "displayName": "Template", + "group": "producer", + "javaType": "java.lang.String", + "kind": "path", + "labelHint": "Stored Procedure template to perform.", + "required": true, + "secret": false, + "type": "hidden" + } + } + } + ] + }, + "id": "sql-stored-start-connector", + "name": "Periodic stored procedure invocation", + "pattern": "From", + "tags": [ + "dynamic" + ] + } + ], + "connectorCustomizers": [ + "io.syndesis.connector.sql.customizer.DataSourceCustomizer" + ], + "dependencies": [ + { + "id": "io.syndesis.connector:connector-sql:2.0-SNAPSHOT", + "type": "MAVEN" + }, + { + "id": "jdbc-driver", + "type": "EXTENSION_TAG" + } + ], + "description": "Invoke SQL to obtain, store, update, or delete data.", + "icon": "assets:sql.svg", + "id": "sql", + "name": "Database", + "properties": { + "password": { + "componentProperty": true, + "deprecated": false, + "displayName": "Password", + "group": "security", + "javaType": "java.lang.String", + "kind": "property", + "label": "common,security", + "labelHint": "Password for the database connection.", + "order": 3, + "required": true, + "secret": true, + "type": "string" + }, + "schema": { + "componentProperty": true, + "deprecated": false, + "displayName": "Schema", + "group": "common", + "javaType": "java.lang.String", + "kind": "property", + "label": "common", + "labelHint": "Database schema.", + "order": 4, + "required": false, + "secret": false, + "type": "string" + }, + "url": { + "componentProperty": true, + "deprecated": false, + "displayName": "Connection URL", + "group": "common", + "javaType": "java.lang.String", + "kind": "property", + "labelHint": "JDBC URL of the database.", + "order": 1, + "required": true, + "secret": false, + "type": "string" + }, + "user": { + "componentProperty": true, + "deprecated": false, + "displayName": "Username", + "group": "common", + "javaType": "java.lang.String", + "kind": "property", + "labelHint": "Username for the database connection.", + "order": 2, + "required": true, + "secret": false, + "type": "string" + } + }, + "tags": [ + "verifier" + ], + "version": 64 + }, + "connectorId": "sql", + "description": "Connection to SampleDB", + "icon": "assets:sql.svg", + "id": "5", + "isDerived": false, + "name": "PostgresDB", + "tags": [ + "sampledb" + ], + "uses": 0 + }, + "id": "-LwPqaTZOXnrmequX_Kb", + "metadata": { + "configured": "true" + }, + "stepKind": "endpoint" + }, + { + "action": { + "actionType": "step", + "descriptor": { + "inputDataShape": { + "kind": "any", + "name": "All preceding outputs" + }, + "outputDataShape": { + "description": "API response payload", + "kind": "json-schema", + "metadata": { + "unified": "true" + }, + "name": "Response", + "specification": "{\"$schema\":\"http://json-schema.org/schema#\",\"type\":\"object\",\"$id\":\"io:syndesis:wrapped\",\"properties\":{\"body\":{\"type\":\"object\",\"properties\":{\"id\":{\"title\":\"Task ID\",\"description\":\"Unique task identifier\",\"type\":\"integer\"},\"task\":{\"title\":\"The task\",\"description\":\"Task line\",\"type\":\"string\"},\"completed\":{\"title\":\"Task completition status\",\"description\":\"0 - ongoing, 1 - completed\",\"maximum\":1,\"minimum\":0,\"type\":\"integer\"}}}}}" + } + } + }, + "configuredProperties": { + "atlasmapping": "{\"AtlasMapping\":{\"jsonType\":\"io.atlasmap.v2.AtlasMapping\",\"dataSource\":[{\"jsonType\":\"io.atlasmap.json.v2.JsonDataSource\",\"id\":\"i-LwPppMaz3EFFmQK5RGRz\",\"uri\":\"atlas:json:i-LwPppMaz3EFFmQK5RGRz\",\"dataSourceType\":\"SOURCE\"},{\"jsonType\":\"io.atlasmap.json.v2.JsonDataSource\",\"id\":\"-LwPqaUIOXnrmequX_Kb\",\"uri\":\"atlas:json:-LwPqaUIOXnrmequX_Kb\",\"dataSourceType\":\"SOURCE\"},{\"jsonType\":\"io.atlasmap.json.v2.JsonDataSource\",\"id\":\"-LwPqaTZOXnrmequX_Kb\",\"uri\":\"atlas:json:-LwPqaTZOXnrmequX_Kb\",\"dataSourceType\":\"SOURCE\"},{\"jsonType\":\"io.atlasmap.json.v2.JsonDataSource\",\"id\":\"i-LwPppMaz3EFFmQK5RGSz\",\"uri\":\"atlas:json:i-LwPppMaz3EFFmQK5RGSz\",\"dataSourceType\":\"TARGET\",\"template\":null}],\"mappings\":{\"mapping\":[{\"jsonType\":\"io.atlasmap.v2.Mapping\",\"id\":\"mapping.646197\",\"inputFieldGroup\":{\"jsonType\":\"io.atlasmap.v2.FieldGroup\",\"actions\":[{\"Concatenate\":{\"delimiter\":\" \"}}],\"field\":[{\"jsonType\":\"io.atlasmap.json.v2.JsonField\",\"name\":\"completed\",\"path\":\"/<>/completed\",\"fieldType\":\"INTEGER\",\"docId\":\"-LwPqaTZOXnrmequX_Kb\",\"userCreated\":false,\"index\":0}]},\"outputField\":[{\"jsonType\":\"io.atlasmap.json.v2.JsonField\",\"name\":\"completed\",\"path\":\"/body/completed\",\"fieldType\":\"INTEGER\",\"docId\":\"i-LwPppMaz3EFFmQK5RGSz\",\"userCreated\":false}]},{\"jsonType\":\"io.atlasmap.v2.Mapping\",\"id\":\"mapping.864802\",\"inputFieldGroup\":{\"jsonType\":\"io.atlasmap.v2.FieldGroup\",\"actions\":[{\"Concatenate\":{\"delimiter\":\" \"}}],\"field\":[{\"jsonType\":\"io.atlasmap.json.v2.JsonField\",\"name\":\"id\",\"path\":\"/<>/id\",\"fieldType\":\"INTEGER\",\"docId\":\"-LwPqaTZOXnrmequX_Kb\",\"userCreated\":false,\"index\":0}]},\"outputField\":[{\"jsonType\":\"io.atlasmap.json.v2.JsonField\",\"name\":\"id\",\"path\":\"/body/id\",\"fieldType\":\"INTEGER\",\"docId\":\"i-LwPppMaz3EFFmQK5RGSz\",\"userCreated\":false}]},{\"jsonType\":\"io.atlasmap.v2.Mapping\",\"id\":\"mapping.473475\",\"inputFieldGroup\":{\"jsonType\":\"io.atlasmap.v2.FieldGroup\",\"actions\":[{\"Concatenate\":{\"delimiter\":\" \"}}],\"field\":[{\"jsonType\":\"io.atlasmap.json.v2.JsonField\",\"name\":\"task\",\"path\":\"/<>/task\",\"fieldType\":\"STRING\",\"docId\":\"-LwPqaTZOXnrmequX_Kb\",\"userCreated\":false,\"index\":0}]},\"outputField\":[{\"jsonType\":\"io.atlasmap.json.v2.JsonField\",\"name\":\"task\",\"path\":\"/body/task\",\"fieldType\":\"STRING\",\"docId\":\"i-LwPppMaz3EFFmQK5RGSz\",\"userCreated\":false}]}]},\"name\":\"UI.931230\",\"lookupTables\":{\"lookupTable\":[]},\"constants\":{\"constant\":[]},\"properties\":{\"property\":[]}}}" + }, + "id": "-LwPqcMoOXnrmequX_Kb", + "metadata": { + "configured": "true" + }, + "name": "Data Mapper", + "stepKind": "mapper" + }, + { + "action": { + "actionType": "connector", + "description": "End action of Syndesis integrations that start from a provided API", + "descriptor": { + "componentScheme": "bean", + "configuredProperties": { + "beanName": "io.syndesis.connector.apiprovider.NoOpBean", + "method": "process" + }, + "connectorCustomizers": [ + "io.syndesis.connector.apiprovider.ApiProviderReturnPathCustomizer" + ], + "inputDataShape": { + "description": "API response payload", + "kind": "json-schema", + "metadata": { + "unified": "true" + }, + "name": "Response", + "specification": "{\"$schema\":\"http://json-schema.org/schema#\",\"type\":\"object\",\"$id\":\"io:syndesis:wrapped\",\"properties\":{\"body\":{\"type\":\"object\",\"properties\":{\"id\":{\"title\":\"Task ID\",\"description\":\"Unique task identifier\",\"type\":\"integer\"},\"task\":{\"title\":\"The task\",\"description\":\"Task line\",\"type\":\"string\"},\"completed\":{\"title\":\"Task completition status\",\"description\":\"0 - ongoing, 1 - completed\",\"maximum\":1,\"minimum\":0,\"type\":\"integer\"}}}}}" + }, + "outputDataShape": { + "kind": "none" + }, + "propertyDefinitionSteps": [ + { + "description": "API Provider Return Path Configuration", + "name": "configuration", + "properties": { + "defaultResponse": { + "componentProperty": false, + "deprecated": false, + "displayName": "Default Response", + "javaType": "String", + "kind": "parameter", + "order": 0, + "required": false, + "secret": false, + "type": "legend" + }, + "errorHandling": { + "componentProperty": false, + "deprecated": false, + "displayName": "Error Handling", + "javaType": "String", + "kind": "parameter", + "order": 2, + "required": false, + "secret": false, + "type": "legend" + }, + "errorResponseCodes": { + "componentProperty": false, + "defaultValue": "{}", + "deprecated": false, + "description": "The return code to set according to different error situations", + "displayName": "Error Response Codes", + "extendedProperties": "{ \"mapsetValueDefinition\": { \"enum\" : [{\"label\":\"200 All is good\",\"value\":\"200\"},{\"label\":\"404 No task with provided identifier found\",\"value\":\"404\"}], \"type\" : \"select\" },\"mapsetOptions\": { \"i18nKeyColumnTitle\": \"When the error message is\", \"i18nValueColumnTitle\": \"Return this HTTP response code\" }}", + "javaType": "Map", + "kind": "parameter", + "order": 4, + "required": false, + "secret": false, + "type": "mapset" + }, + "httpResponseCode": { + "componentProperty": false, + "deprecated": false, + "description": "The return code to set in the HTTP response", + "displayName": "Return Code", + "enum": [ + { + "label": "200 All is good", + "value": "200" + }, + { + "label": "404 No task with provided identifier found", + "value": "404" + } + ], + "javaType": "String", + "kind": "parameter", + "order": 1, + "required": true, + "secret": false, + "type": "select" + }, + "returnBody": { + "componentProperty": false, + "deprecated": false, + "displayName": "Include error message in the return body", + "javaType": "Boolean", + "kind": "parameter", + "order": 3, + "required": false, + "secret": false, + "type": "boolean" + } + } + } + ], + "standardizedErrors": [ + { + "displayName": "ServerError", + "name": "SERVER_ERROR" + } + ] + }, + "id": "io.syndesis:api-provider-end", + "name": "Provided API Return Path", + "pattern": "To", + "tags": [ + "locked-action" + ] + }, + "configuredProperties": { + "errorResponseCodes": "{\"SQL_ENTITY_NOT_FOUND_ERROR\":\"404\"}", + "httpResponseCode": "200", + "returnBody": "false" + }, + "connection": { + "connector": { + "actions": [ + { + "actionType": "connector", + "description": "Start a Syndesis integration from a provided API", + "descriptor": { + "componentScheme": "direct", + "connectorCustomizers": [ + "io.syndesis.connector.apiprovider.ApiProviderStartEndpointCustomizer" + ], + "inputDataShape": { + "kind": "none" + }, + "outputDataShape": { + "kind": "any" + }, + "propertyDefinitionSteps": [ + { + "description": "API Provider Configuration", + "name": "configuration", + "properties": { + "name": { + "componentProperty": false, + "deprecated": false, + "description": "The operation ID as defined in the API spec", + "displayName": "Operation ID", + "javaType": "String", + "kind": "parameter", + "required": true, + "secret": false, + "type": "string" + } + } + } + ] + }, + "id": "io.syndesis:api-provider-start", + "name": "Provided API", + "pattern": "From", + "tags": [ + "expose" + ] + }, + { + "actionType": "connector", + "description": "End action of Syndesis integrations that start from a provided API", + "descriptor": { + "componentScheme": "bean", + "configuredProperties": { + "beanName": "io.syndesis.connector.apiprovider.NoOpBean", + "method": "process" + }, + "connectorCustomizers": [ + "io.syndesis.connector.apiprovider.ApiProviderReturnPathCustomizer" + ], + "inputDataShape": { + "kind": "any" + }, + "outputDataShape": { + "kind": "none" + }, + "propertyDefinitionSteps": [ + { + "description": "API Provider Return Path Configuration", + "name": "configuration", + "properties": { + "defaultResponse": { + "componentProperty": false, + "deprecated": false, + "displayName": "Default Response", + "javaType": "String", + "kind": "parameter", + "order": 0, + "required": false, + "secret": false, + "type": "legend" + }, + "errorHandling": { + "componentProperty": false, + "deprecated": false, + "displayName": "Error Handling", + "javaType": "String", + "kind": "parameter", + "order": 2, + "required": false, + "secret": false, + "type": "legend" + }, + "errorResponseCodes": { + "componentProperty": false, + "defaultValue": "{}", + "deprecated": false, + "description": "The return code to set according to different error situations", + "displayName": "Error Response Codes", + "javaType": "Map", + "kind": "parameter", + "order": 4, + "required": false, + "secret": false, + "type": "mapset" + }, + "httpResponseCode": { + "componentProperty": false, + "deprecated": false, + "description": "The return code to set in the HTTP response", + "displayName": "Return Code", + "javaType": "String", + "kind": "parameter", + "order": 1, + "required": true, + "secret": false, + "type": "select" + }, + "returnBody": { + "componentProperty": false, + "deprecated": false, + "displayName": "Include error message in the return body", + "javaType": "Boolean", + "kind": "parameter", + "order": 3, + "required": false, + "secret": false, + "type": "boolean" + } + } + } + ], + "standardizedErrors": [ + { + "displayName": "ServerError", + "name": "SERVER_ERROR" + } + ] + }, + "id": "io.syndesis:api-provider-end", + "name": "Provided API Return Path", + "pattern": "To" + } + ], + "dependencies": [ + { + "id": "io.syndesis.connector:connector-api-provider:2.0-SNAPSHOT", + "type": "MAVEN" + }, + { + "id": "org.apache.camel:camel-swagger-java:2.23.2.fuse-760011", + "type": "MAVEN" + }, + { + "id": "org.apache.camel:camel-servlet-starter:2.23.2.fuse-760011", + "type": "MAVEN" + } + ], + "description": "Expose Restful APIs", + "icon": "assets:api-provider.svg", + "id": "api-provider", + "metadata": { + "hide-from-connection-pages": "true" + }, + "name": "API Provider", + "version": 64 + }, + "connectorId": "api-provider", + "description": "Expose Restful APIs", + "icon": "assets:api-provider.svg", + "id": "api-provider", + "isDerived": false, + "metadata": { + "hide-from-connection-pages": "true" + }, + "name": "API Provider", + "uses": 0 + }, + "id": "i-LwPppMaz3EFFmQK5RGSz", + "metadata": { + "configured": "true" + }, + "stepKind": "endpoint" + } + ], + "tags": [ + "5", + "api-provider" + ], + "type": "API_PROVIDER" + }, + { + "description": "PUT /{id}", + "id": "i-LwPppMbz3EFFmQK5RGWz", + "metadata": { + "default-return-code": "200", + "excerpt": "200 All is good", + "openapi-operationid": "updateTask", + "return-code-edited": "true" + }, + "name": "Update task", + "steps": [ + { + "action": { + "actionType": "connector", + "description": "Start a Syndesis integration from a provided API", + "descriptor": { + "componentScheme": "direct", + "connectorCustomizers": [ + "io.syndesis.connector.apiprovider.ApiProviderStartEndpointCustomizer" + ], + "inputDataShape": { + "kind": "none" + }, + "outputDataShape": { + "description": "API request payload", + "kind": "json-schema", + "metadata": { + "unified": "true" + }, + "name": "Request", + "specification": "{\"$schema\":\"http://json-schema.org/schema#\",\"type\":\"object\",\"$id\":\"io:syndesis:wrapped\",\"properties\":{\"parameters\":{\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"integer\",\"title\":\"id\",\"description\":\"Task identifier\"}}},\"body\":{\"type\":\"object\",\"properties\":{\"id\":{\"title\":\"Task ID\",\"description\":\"Unique task identifier\",\"type\":\"integer\"},\"task\":{\"title\":\"The task\",\"description\":\"Task line\",\"type\":\"string\"},\"completed\":{\"title\":\"Task completition status\",\"description\":\"0 - ongoing, 1 - completed\",\"maximum\":1,\"minimum\":0,\"type\":\"integer\"}}}}}" + }, + "propertyDefinitionSteps": [ + { + "description": "API Provider Configuration", + "name": "configuration", + "properties": { + "name": { + "componentProperty": false, + "deprecated": false, + "description": "The operation ID as defined in the API spec", + "displayName": "Operation ID", + "javaType": "String", + "kind": "parameter", + "required": true, + "secret": false, + "type": "string" + } + } + } + ] + }, + "id": "io.syndesis:api-provider-start", + "metadata": { + "serverBasePath": "/api" + }, + "name": "Provided API", + "pattern": "From", + "tags": [ + "expose", + "locked-action" + ] + }, + "configuredProperties": { + "name": "updateTask" + }, + "connection": { + "connector": { + "actions": [ + { + "actionType": "connector", + "description": "Start a Syndesis integration from a provided API", + "descriptor": { + "componentScheme": "direct", + "connectorCustomizers": [ + "io.syndesis.connector.apiprovider.ApiProviderStartEndpointCustomizer" + ], + "inputDataShape": { + "kind": "none" + }, + "outputDataShape": { + "kind": "any" + }, + "propertyDefinitionSteps": [ + { + "description": "API Provider Configuration", + "name": "configuration", + "properties": { + "name": { + "componentProperty": false, + "deprecated": false, + "description": "The operation ID as defined in the API spec", + "displayName": "Operation ID", + "javaType": "String", + "kind": "parameter", + "required": true, + "secret": false, + "type": "string" + } + } + } + ] + }, + "id": "io.syndesis:api-provider-start", + "name": "Provided API", + "pattern": "From", + "tags": [ + "expose" + ] + }, + { + "actionType": "connector", + "description": "End action of Syndesis integrations that start from a provided API", + "descriptor": { + "componentScheme": "bean", + "configuredProperties": { + "beanName": "io.syndesis.connector.apiprovider.NoOpBean", + "method": "process" + }, + "connectorCustomizers": [ + "io.syndesis.connector.apiprovider.ApiProviderReturnPathCustomizer" + ], + "inputDataShape": { + "kind": "any" + }, + "outputDataShape": { + "kind": "none" + }, + "propertyDefinitionSteps": [ + { + "description": "API Provider Return Path Configuration", + "name": "configuration", + "properties": { + "defaultResponse": { + "componentProperty": false, + "deprecated": false, + "displayName": "Default Response", + "javaType": "String", + "kind": "parameter", + "order": 0, + "required": false, + "secret": false, + "type": "legend" + }, + "errorHandling": { + "componentProperty": false, + "deprecated": false, + "displayName": "Error Handling", + "javaType": "String", + "kind": "parameter", + "order": 2, + "required": false, + "secret": false, + "type": "legend" + }, + "errorResponseCodes": { + "componentProperty": false, + "defaultValue": "{}", + "deprecated": false, + "description": "The return code to set according to different error situations", + "displayName": "Error Response Codes", + "javaType": "Map", + "kind": "parameter", + "order": 4, + "required": false, + "secret": false, + "type": "mapset" + }, + "httpResponseCode": { + "componentProperty": false, + "deprecated": false, + "description": "The return code to set in the HTTP response", + "displayName": "Return Code", + "javaType": "String", + "kind": "parameter", + "order": 1, + "required": true, + "secret": false, + "type": "select" + }, + "returnBody": { + "componentProperty": false, + "deprecated": false, + "displayName": "Include error message in the return body", + "javaType": "Boolean", + "kind": "parameter", + "order": 3, + "required": false, + "secret": false, + "type": "boolean" + } + } + } + ], + "standardizedErrors": [ + { + "displayName": "ServerError", + "name": "SERVER_ERROR" + } + ] + }, + "id": "io.syndesis:api-provider-end", + "name": "Provided API Return Path", + "pattern": "To" + } + ], + "dependencies": [ + { + "id": "io.syndesis.connector:connector-api-provider:2.0-SNAPSHOT", + "type": "MAVEN" + }, + { + "id": "org.apache.camel:camel-swagger-java:2.23.2.fuse-760011", + "type": "MAVEN" + }, + { + "id": "org.apache.camel:camel-servlet-starter:2.23.2.fuse-760011", + "type": "MAVEN" + } + ], + "description": "Expose Restful APIs", + "icon": "assets:api-provider.svg", + "id": "api-provider", + "metadata": { + "hide-from-connection-pages": "true" + }, + "name": "API Provider", + "version": 64 + }, + "connectorId": "api-provider", + "description": "Expose Restful APIs", + "icon": "assets:api-provider.svg", + "id": "api-provider", + "isDerived": false, + "metadata": { + "hide-from-connection-pages": "true" + }, + "name": "API Provider", + "uses": 0 + }, + "id": "i-LwPppMbz3EFFmQK5RGUz", + "metadata": { + "configured": "true" + }, + "stepKind": "endpoint" + }, + { + "configuredProperties": { + "bodyLoggingEnabled": "false", + "contextLoggingEnabled": "false", + "customText": "Update task" + }, + "id": "-LwPqoZ0OXnrmequX_Kb", + "metadata": { + "configured": "true" + }, + "name": "Log", + "stepKind": "log" + }, + { + "action": { + "actionType": "step", + "descriptor": { + "inputDataShape": { + "kind": "any", + "name": "All preceding outputs" + }, + "outputDataShape": { + "description": "Parameters of SQL [update todo set task=:#task, completed=:#completed where id=:#id]", + "kind": "json-schema", + "metadata": { + "variant": "element" + }, + "name": "SQL Parameter", + "specification": "{\"type\":\"object\",\"$schema\":\"http://json-schema.org/schema#\",\"title\":\"SQL_PARAM_IN\",\"properties\":{\"task\":{\"type\":\"string\",\"required\":true},\"completed\":{\"type\":\"integer\",\"required\":true},\"id\":{\"type\":\"integer\",\"required\":true}}}", + "type": "SQL_PARAM_IN" + } + } + }, + "configuredProperties": { + "atlasmapping": "{\"AtlasMapping\":{\"jsonType\":\"io.atlasmap.v2.AtlasMapping\",\"dataSource\":[{\"jsonType\":\"io.atlasmap.json.v2.JsonDataSource\",\"id\":\"i-LwPppMbz3EFFmQK5RGUz\",\"uri\":\"atlas:json:i-LwPppMbz3EFFmQK5RGUz\",\"dataSourceType\":\"SOURCE\"},{\"jsonType\":\"io.atlasmap.json.v2.JsonDataSource\",\"id\":\"-LwPqxnxOXnrmequX_Kb\",\"uri\":\"atlas:json:-LwPqxnxOXnrmequX_Kb\",\"dataSourceType\":\"TARGET\",\"template\":null}],\"mappings\":{\"mapping\":[{\"jsonType\":\"io.atlasmap.v2.Mapping\",\"id\":\"mapping.836566\",\"inputField\":[{\"jsonType\":\"io.atlasmap.json.v2.JsonField\",\"name\":\"id\",\"path\":\"/parameters/id\",\"fieldType\":\"INTEGER\",\"docId\":\"i-LwPppMbz3EFFmQK5RGUz\",\"userCreated\":false}],\"outputField\":[{\"jsonType\":\"io.atlasmap.json.v2.JsonField\",\"name\":\"id\",\"path\":\"/id\",\"fieldType\":\"INTEGER\",\"docId\":\"-LwPqxnxOXnrmequX_Kb\",\"userCreated\":false}]},{\"jsonType\":\"io.atlasmap.v2.Mapping\",\"id\":\"mapping.308308\",\"inputField\":[{\"jsonType\":\"io.atlasmap.json.v2.JsonField\",\"name\":\"completed\",\"path\":\"/body/completed\",\"fieldType\":\"INTEGER\",\"docId\":\"i-LwPppMbz3EFFmQK5RGUz\",\"userCreated\":false}],\"outputField\":[{\"jsonType\":\"io.atlasmap.json.v2.JsonField\",\"name\":\"completed\",\"path\":\"/completed\",\"fieldType\":\"INTEGER\",\"docId\":\"-LwPqxnxOXnrmequX_Kb\",\"userCreated\":false}]},{\"jsonType\":\"io.atlasmap.v2.Mapping\",\"id\":\"mapping.316696\",\"inputField\":[{\"jsonType\":\"io.atlasmap.json.v2.JsonField\",\"name\":\"task\",\"path\":\"/body/task\",\"fieldType\":\"STRING\",\"docId\":\"i-LwPppMbz3EFFmQK5RGUz\",\"userCreated\":false}],\"outputField\":[{\"jsonType\":\"io.atlasmap.json.v2.JsonField\",\"name\":\"task\",\"path\":\"/task\",\"fieldType\":\"STRING\",\"docId\":\"-LwPqxnxOXnrmequX_Kb\",\"userCreated\":false}]}]},\"name\":\"UI.156722\",\"lookupTables\":{\"lookupTable\":[]},\"constants\":{\"constant\":[]},\"properties\":{\"property\":[]}}}" + }, + "id": "-LwPqxoPOXnrmequX_Kb", + "metadata": { + "configured": "true" + }, + "name": "Data Mapper", + "stepKind": "mapper" + }, + { + "action": { + "actionType": "connector", + "description": "Invoke SQL to obtain, store, update, or delete data.", + "descriptor": { + "componentScheme": "sql", + "connectorCustomizers": [ + "io.syndesis.connector.sql.customizer.SqlConnectorCustomizer" + ], + "inputDataShape": { + "description": "Parameters of SQL [update todo set task=:#task, completed=:#completed where id=:#id]", + "kind": "json-schema", + "metadata": { + "variant": "element" + }, + "name": "SQL Parameter", + "specification": "{\"type\":\"object\",\"$schema\":\"http://json-schema.org/schema#\",\"title\":\"SQL_PARAM_IN\",\"properties\":{\"task\":{\"type\":\"string\",\"required\":true},\"completed\":{\"type\":\"integer\",\"required\":true},\"id\":{\"type\":\"integer\",\"required\":true}}}", + "type": "SQL_PARAM_IN" + }, + "outputDataShape": { + "kind": "none", + "type": "SQL_PARAM_OUT" + }, + "propertyDefinitionSteps": [ + { + "description": "Enter a SQL statement that starts with INSERT, SELECT, UPDATE or DELETE.", + "name": "SQL statement", + "properties": { + "batch": { + "defaultValue": "false", + "deprecated": false, + "displayName": "Batch update", + "group": "common", + "javaType": "java.lang.Boolean", + "kind": "property", + "labelHint": "Use prepared statements for INSERT, UPDATE, DELETE in order to update multiple rows with batch update.", + "order": 2, + "required": false, + "secret": false, + "type": "boolean" + }, + "query": { + "dataList": [ + "update todo set task=:#task, completed=:#completed where id=:#id" + ], + "defaultValue": "update todo set task=:#task, completed=:#completed where id=:#id", + "deprecated": false, + "displayName": "SQL statement", + "group": "common", + "javaType": "java.lang.String", + "kind": "path", + "labelHint": "SQL statement to be executed. Can contain input parameters prefixed by ':#'.", + "order": 1, + "placeholder": "for example ':#MYPARAMNAME'", + "required": true, + "secret": false, + "type": "dataList" + }, + "raiseErrorOnNotFound": { + "defaultValue": "false", + "deprecated": false, + "displayName": "Raise error when record not found", + "group": "common", + "javaType": "java.lang.Boolean", + "kind": "property", + "labelHint": "Error when no records are selected, updated or deleted", + "order": 3, + "required": false, + "secret": false, + "type": "boolean" + } + } + } + ], + "standardizedErrors": [ + { + "displayName": "SqlDataAccessError", + "name": "SQL_DATA_ACCESS_ERROR" + }, + { + "displayName": "SqlEntityNotFoundError", + "name": "SQL_ENTITY_NOT_FOUND_ERROR" + }, + { + "displayName": "SqlConnectorError", + "name": "SQL_CONNECTOR_ERROR" + } + ] + }, + "id": "sql-connector", + "name": "Invoke SQL", + "pattern": "To", + "tags": [ + "dynamic" + ] + }, + "configuredProperties": { + "batch": "false", + "query": "update todo set task=:#task, completed=:#completed where id=:#id", + "raiseErrorOnNotFound": "true" + }, + "connection": { + "configuredProperties": { + "password": "»ENC:50a0f4b2d9e6ff8f900571858a112f4532fc26aedf5e581eac7d614e3cf17aa0450a1a255d7c5ab31665ff120c5841fa", + "schema": "sampledb", + "url": "jdbc:postgresql://syndesis-db:5432/sampledb", + "user": "sampledb" + }, + "connector": { + "actions": [ + { + "actionType": "connector", + "description": "Invoke SQL to obtain, store, update, or delete data.", + "descriptor": { + "componentScheme": "sql", + "connectorCustomizers": [ + "io.syndesis.connector.sql.customizer.SqlConnectorCustomizer" + ], + "inputDataShape": { + "kind": "json-schema" + }, + "outputDataShape": { + "kind": "json-schema" + }, + "propertyDefinitionSteps": [ + { + "description": "Enter a SQL statement that starts with INSERT, SELECT, UPDATE or DELETE.", + "name": "SQL statement", + "properties": { + "batch": { + "defaultValue": "false", + "deprecated": false, + "displayName": "Batch update", + "group": "common", + "javaType": "java.lang.Boolean", + "kind": "property", + "labelHint": "Use prepared statements for INSERT, UPDATE, DELETE in order to update multiple rows with batch update.", + "order": 2, + "required": false, + "secret": false, + "type": "boolean" + }, + "query": { + "deprecated": false, + "displayName": "SQL statement", + "group": "common", + "javaType": "java.lang.String", + "kind": "path", + "labelHint": "SQL statement to be executed. Can contain input parameters prefixed by ':#'.", + "order": 1, + "placeholder": "for example ':#MYPARAMNAME'", + "required": true, + "secret": false, + "type": "dataList" + }, + "raiseErrorOnNotFound": { + "defaultValue": "false", + "deprecated": false, + "displayName": "Raise error when record not found", + "group": "common", + "javaType": "java.lang.Boolean", + "kind": "property", + "labelHint": "Error when no records are selected, updated or deleted", + "order": 3, + "required": false, + "secret": false, + "type": "boolean" + } + } + } + ], + "standardizedErrors": [ + { + "displayName": "SqlDataAccessError", + "name": "SQL_DATA_ACCESS_ERROR" + }, + { + "displayName": "SqlEntityNotFoundError", + "name": "SQL_ENTITY_NOT_FOUND_ERROR" + }, + { + "displayName": "SqlConnectorError", + "name": "SQL_CONNECTOR_ERROR" + } + ] + }, + "id": "sql-connector", + "name": "Invoke SQL", + "pattern": "To", + "tags": [ + "dynamic" + ] + }, + { + "actionType": "connector", + "description": "Periodically invoke SQL to obtain data.", + "descriptor": { + "componentScheme": "sql", + "connectorCustomizers": [ + "io.syndesis.connector.sql.customizer.SqlStartConnectorCustomizer" + ], + "inputDataShape": { + "kind": "none" + }, + "outputDataShape": { + "kind": "json-schema" + }, + "propertyDefinitionSteps": [ + { + "description": "Enter a SQL statement that returns results, such as SELECT.", + "name": "SQL statement", + "properties": { + "isRaiseErrorOnNotFound": { + "deprecated": false, + "displayName": "Raise NotFoundError", + "group": "consumer", + "javaType": "java.lang.Boolean", + "kind": "parameter", + "labelHint": "Raise NotFoundError if no records are inserted, updated, selected or deleted", + "order": 3, + "required": false, + "secret": false, + "type": "boolean" + }, + "query": { + "deprecated": false, + "displayName": "SQL statement", + "group": "common", + "javaType": "java.lang.String", + "kind": "path", + "labelHint": "SQL statement to be executed.", + "order": 1, + "required": true, + "secret": false, + "type": "dataList" + }, + "schedulerExpression": { + "defaultValue": "60000", + "deprecated": false, + "displayName": "Period", + "group": "consumer", + "javaType": "long", + "kind": "parameter", + "labelHint": "Delay between scheduling (executing).", + "order": 2, + "required": false, + "secret": false, + "type": "duration" + } + } + } + ] + }, + "id": "sql-start-connector", + "name": "Periodic SQL invocation", + "pattern": "From", + "tags": [ + "dynamic" + ] + }, + { + "actionType": "connector", + "description": "Invoke a stored procedure.", + "descriptor": { + "componentScheme": "sql-stored", + "connectorCustomizers": [ + "io.syndesis.connector.sql.customizer.SqlStoredConnectorCustomizer" + ], + "inputDataShape": { + "kind": "json-schema" + }, + "outputDataShape": { + "kind": "json-schema" + }, + "propertyDefinitionSteps": [ + { + "description": "Select the stored procedure.", + "name": "Procedure name", + "properties": { + "procedureName": { + "componentProperty": true, + "deprecated": false, + "displayName": "Procedure name", + "group": "common", + "javaType": "java.lang.String", + "kind": "property", + "labelHint": "Name of the stored procedure.", + "required": false, + "secret": false, + "type": "select" + }, + "template": { + "componentProperty": false, + "deprecated": false, + "displayName": "Template", + "group": "producer", + "javaType": "java.lang.String", + "kind": "path", + "labelHint": "Stored procedure template to perform.", + "required": false, + "secret": false, + "type": "hidden" + } + } + } + ] + }, + "id": "sql-stored-connector", + "name": "Invoke stored procedure", + "pattern": "To", + "tags": [ + "dynamic" + ] + }, + { + "actionType": "connector", + "description": "Periodically invoke a stored procedure.", + "descriptor": { + "componentScheme": "sql-stored", + "connectorCustomizers": [ + "io.syndesis.connector.sql.customizer.SqlStartStoredConnectorCustomizer" + ], + "inputDataShape": { + "kind": "none" + }, + "outputDataShape": { + "kind": "json-schema" + }, + "propertyDefinitionSteps": [ + { + "description": "Select the stored procedure.", + "name": "Procedure name", + "properties": { + "procedureName": { + "componentProperty": true, + "deprecated": false, + "displayName": "Procedure name", + "group": "producer", + "javaType": "java.lang.String", + "kind": "path", + "labelHint": "Name of the stored procedure.", + "required": true, + "secret": false, + "type": "select" + }, + "schedulerExpression": { + "defaultValue": "60000", + "deprecated": false, + "displayName": "Period", + "group": "consumer", + "javaType": "long", + "kind": "parameter", + "labelHint": "Delay between scheduling (executing).", + "required": false, + "secret": false, + "type": "duration" + }, + "template": { + "componentProperty": false, + "deprecated": false, + "displayName": "Template", + "group": "producer", + "javaType": "java.lang.String", + "kind": "path", + "labelHint": "Stored Procedure template to perform.", + "required": true, + "secret": false, + "type": "hidden" + } + } + } + ] + }, + "id": "sql-stored-start-connector", + "name": "Periodic stored procedure invocation", + "pattern": "From", + "tags": [ + "dynamic" + ] + } + ], + "connectorCustomizers": [ + "io.syndesis.connector.sql.customizer.DataSourceCustomizer" + ], + "dependencies": [ + { + "id": "io.syndesis.connector:connector-sql:2.0-SNAPSHOT", + "type": "MAVEN" + }, + { + "id": "jdbc-driver", + "type": "EXTENSION_TAG" + } + ], + "description": "Invoke SQL to obtain, store, update, or delete data.", + "icon": "assets:sql.svg", + "id": "sql", + "name": "Database", + "properties": { + "password": { + "componentProperty": true, + "deprecated": false, + "displayName": "Password", + "group": "security", + "javaType": "java.lang.String", + "kind": "property", + "label": "common,security", + "labelHint": "Password for the database connection.", + "order": 3, + "required": true, + "secret": true, + "type": "string" + }, + "schema": { + "componentProperty": true, + "deprecated": false, + "displayName": "Schema", + "group": "common", + "javaType": "java.lang.String", + "kind": "property", + "label": "common", + "labelHint": "Database schema.", + "order": 4, + "required": false, + "secret": false, + "type": "string" + }, + "url": { + "componentProperty": true, + "deprecated": false, + "displayName": "Connection URL", + "group": "common", + "javaType": "java.lang.String", + "kind": "property", + "labelHint": "JDBC URL of the database.", + "order": 1, + "required": true, + "secret": false, + "type": "string" + }, + "user": { + "componentProperty": true, + "deprecated": false, + "displayName": "Username", + "group": "common", + "javaType": "java.lang.String", + "kind": "property", + "labelHint": "Username for the database connection.", + "order": 2, + "required": true, + "secret": false, + "type": "string" + } + }, + "tags": [ + "verifier" + ], + "version": 64 + }, + "connectorId": "sql", + "description": "Connection to SampleDB", + "icon": "assets:sql.svg", + "id": "5", + "isDerived": false, + "name": "PostgresDB", + "tags": [ + "sampledb" + ], + "uses": 0 + }, + "id": "-LwPqxnxOXnrmequX_Kb", + "metadata": { + "configured": "true" + }, + "stepKind": "endpoint" + }, + { + "action": { + "actionType": "step", + "descriptor": { + "inputDataShape": { + "kind": "any", + "name": "All preceding outputs" + }, + "outputDataShape": { + "description": "API response payload", + "kind": "json-schema", + "metadata": { + "unified": "true" + }, + "name": "Response", + "specification": "{\"$schema\":\"http://json-schema.org/schema#\",\"type\":\"object\",\"$id\":\"io:syndesis:wrapped\",\"properties\":{\"body\":{\"type\":\"object\",\"properties\":{\"id\":{\"title\":\"Task ID\",\"description\":\"Unique task identifier\",\"type\":\"integer\"},\"task\":{\"title\":\"The task\",\"description\":\"Task line\",\"type\":\"string\"},\"completed\":{\"title\":\"Task completition status\",\"description\":\"0 - ongoing, 1 - completed\",\"maximum\":1,\"minimum\":0,\"type\":\"integer\"}}}}}" + } + } + }, + "configuredProperties": { + "atlasmapping": "{\"AtlasMapping\":{\"jsonType\":\"io.atlasmap.v2.AtlasMapping\",\"dataSource\":[{\"jsonType\":\"io.atlasmap.json.v2.JsonDataSource\",\"id\":\"i-LwPppMbz3EFFmQK5RGUz\",\"uri\":\"atlas:json:i-LwPppMbz3EFFmQK5RGUz\",\"dataSourceType\":\"SOURCE\"},{\"jsonType\":\"io.atlasmap.json.v2.JsonDataSource\",\"id\":\"-LwPqxoPOXnrmequX_Kb\",\"uri\":\"atlas:json:-LwPqxoPOXnrmequX_Kb\",\"dataSourceType\":\"SOURCE\"},{\"jsonType\":\"io.atlasmap.json.v2.JsonDataSource\",\"id\":\"i-LwPppMbz3EFFmQK5RGVz\",\"uri\":\"atlas:json:i-LwPppMbz3EFFmQK5RGVz\",\"dataSourceType\":\"TARGET\",\"template\":null}],\"mappings\":{\"mapping\":[{\"jsonType\":\"io.atlasmap.v2.Mapping\",\"id\":\"mapping.803288\",\"inputField\":[{\"jsonType\":\"io.atlasmap.json.v2.JsonField\",\"name\":\"completed\",\"path\":\"/body/completed\",\"fieldType\":\"INTEGER\",\"docId\":\"i-LwPppMbz3EFFmQK5RGUz\",\"userCreated\":false}],\"outputField\":[{\"jsonType\":\"io.atlasmap.json.v2.JsonField\",\"name\":\"completed\",\"path\":\"/body/completed\",\"fieldType\":\"INTEGER\",\"docId\":\"i-LwPppMbz3EFFmQK5RGVz\",\"userCreated\":false}]},{\"jsonType\":\"io.atlasmap.v2.Mapping\",\"id\":\"mapping.623682\",\"inputField\":[{\"jsonType\":\"io.atlasmap.json.v2.JsonField\",\"name\":\"task\",\"path\":\"/body/task\",\"fieldType\":\"STRING\",\"docId\":\"i-LwPppMbz3EFFmQK5RGUz\",\"userCreated\":false}],\"outputField\":[{\"jsonType\":\"io.atlasmap.json.v2.JsonField\",\"name\":\"task\",\"path\":\"/body/task\",\"fieldType\":\"STRING\",\"docId\":\"i-LwPppMbz3EFFmQK5RGVz\",\"userCreated\":false}]},{\"jsonType\":\"io.atlasmap.v2.Mapping\",\"id\":\"mapping.615121\",\"inputField\":[{\"jsonType\":\"io.atlasmap.json.v2.JsonField\",\"name\":\"id\",\"path\":\"/parameters/id\",\"fieldType\":\"INTEGER\",\"docId\":\"i-LwPppMbz3EFFmQK5RGUz\",\"userCreated\":false}],\"outputField\":[{\"jsonType\":\"io.atlasmap.json.v2.JsonField\",\"name\":\"id\",\"path\":\"/body/id\",\"fieldType\":\"INTEGER\",\"docId\":\"i-LwPppMbz3EFFmQK5RGVz\",\"userCreated\":false}]}]},\"name\":\"UI.3801\",\"lookupTables\":{\"lookupTable\":[]},\"constants\":{\"constant\":[]},\"properties\":{\"property\":[]}}}" + }, + "id": "-LwPr0I5OXnrmequX_Kb", + "metadata": { + "configured": "true" + }, + "name": "Data Mapper", + "stepKind": "mapper" + }, + { + "action": { + "actionType": "connector", + "description": "End action of Syndesis integrations that start from a provided API", + "descriptor": { + "componentScheme": "bean", + "configuredProperties": { + "beanName": "io.syndesis.connector.apiprovider.NoOpBean", + "method": "process" + }, + "connectorCustomizers": [ + "io.syndesis.connector.apiprovider.ApiProviderReturnPathCustomizer" + ], + "inputDataShape": { + "description": "API response payload", + "kind": "json-schema", + "metadata": { + "unified": "true" + }, + "name": "Response", + "specification": "{\"$schema\":\"http://json-schema.org/schema#\",\"type\":\"object\",\"$id\":\"io:syndesis:wrapped\",\"properties\":{\"body\":{\"type\":\"object\",\"properties\":{\"id\":{\"title\":\"Task ID\",\"description\":\"Unique task identifier\",\"type\":\"integer\"},\"task\":{\"title\":\"The task\",\"description\":\"Task line\",\"type\":\"string\"},\"completed\":{\"title\":\"Task completition status\",\"description\":\"0 - ongoing, 1 - completed\",\"maximum\":1,\"minimum\":0,\"type\":\"integer\"}}}}}" + }, + "outputDataShape": { + "kind": "none" + }, + "propertyDefinitionSteps": [ + { + "description": "API Provider Return Path Configuration", + "name": "configuration", + "properties": { + "defaultResponse": { + "componentProperty": false, + "deprecated": false, + "displayName": "Default Response", + "javaType": "String", + "kind": "parameter", + "order": 0, + "required": false, + "secret": false, + "type": "legend" + }, + "errorHandling": { + "componentProperty": false, + "deprecated": false, + "displayName": "Error Handling", + "javaType": "String", + "kind": "parameter", + "order": 2, + "required": false, + "secret": false, + "type": "legend" + }, + "errorResponseCodes": { + "componentProperty": false, + "defaultValue": "{}", + "deprecated": false, + "description": "The return code to set according to different error situations", + "displayName": "Error Response Codes", + "extendedProperties": "{ \"mapsetValueDefinition\": { \"enum\" : [{\"label\":\"200 All is good\",\"value\":\"200\"}], \"type\" : \"select\" },\"mapsetOptions\": { \"i18nKeyColumnTitle\": \"When the error message is\", \"i18nValueColumnTitle\": \"Return this HTTP response code\" }}", + "javaType": "Map", + "kind": "parameter", + "order": 4, + "required": false, + "secret": false, + "type": "mapset" + }, + "httpResponseCode": { + "componentProperty": false, + "deprecated": false, + "description": "The return code to set in the HTTP response", + "displayName": "Return Code", + "enum": [ + { + "label": "200 All is good", + "value": "200" + } + ], + "javaType": "String", + "kind": "parameter", + "order": 1, + "required": true, + "secret": false, + "type": "select" + }, + "returnBody": { + "componentProperty": false, + "deprecated": false, + "displayName": "Include error message in the return body", + "javaType": "Boolean", + "kind": "parameter", + "order": 3, + "required": false, + "secret": false, + "type": "boolean" + } + } + } + ], + "standardizedErrors": [ + { + "displayName": "ServerError", + "name": "SERVER_ERROR" + } + ] + }, + "id": "io.syndesis:api-provider-end", + "name": "Provided API Return Path", + "pattern": "To", + "tags": [ + "locked-action" + ] + }, + "configuredProperties": { + "errorResponseCodes": "{}", + "httpResponseCode": "200", + "returnBody": "true" + }, + "connection": { + "connector": { + "actions": [ + { + "actionType": "connector", + "description": "Start a Syndesis integration from a provided API", + "descriptor": { + "componentScheme": "direct", + "connectorCustomizers": [ + "io.syndesis.connector.apiprovider.ApiProviderStartEndpointCustomizer" + ], + "inputDataShape": { + "kind": "none" + }, + "outputDataShape": { + "kind": "any" + }, + "propertyDefinitionSteps": [ + { + "description": "API Provider Configuration", + "name": "configuration", + "properties": { + "name": { + "componentProperty": false, + "deprecated": false, + "description": "The operation ID as defined in the API spec", + "displayName": "Operation ID", + "javaType": "String", + "kind": "parameter", + "required": true, + "secret": false, + "type": "string" + } + } + } + ] + }, + "id": "io.syndesis:api-provider-start", + "name": "Provided API", + "pattern": "From", + "tags": [ + "expose" + ] + }, + { + "actionType": "connector", + "description": "End action of Syndesis integrations that start from a provided API", + "descriptor": { + "componentScheme": "bean", + "configuredProperties": { + "beanName": "io.syndesis.connector.apiprovider.NoOpBean", + "method": "process" + }, + "connectorCustomizers": [ + "io.syndesis.connector.apiprovider.ApiProviderReturnPathCustomizer" + ], + "inputDataShape": { + "kind": "any" + }, + "outputDataShape": { + "kind": "none" + }, + "propertyDefinitionSteps": [ + { + "description": "API Provider Return Path Configuration", + "name": "configuration", + "properties": { + "defaultResponse": { + "componentProperty": false, + "deprecated": false, + "displayName": "Default Response", + "javaType": "String", + "kind": "parameter", + "order": 0, + "required": false, + "secret": false, + "type": "legend" + }, + "errorHandling": { + "componentProperty": false, + "deprecated": false, + "displayName": "Error Handling", + "javaType": "String", + "kind": "parameter", + "order": 2, + "required": false, + "secret": false, + "type": "legend" + }, + "errorResponseCodes": { + "componentProperty": false, + "defaultValue": "{}", + "deprecated": false, + "description": "The return code to set according to different error situations", + "displayName": "Error Response Codes", + "javaType": "Map", + "kind": "parameter", + "order": 4, + "required": false, + "secret": false, + "type": "mapset" + }, + "httpResponseCode": { + "componentProperty": false, + "deprecated": false, + "description": "The return code to set in the HTTP response", + "displayName": "Return Code", + "javaType": "String", + "kind": "parameter", + "order": 1, + "required": true, + "secret": false, + "type": "select" + }, + "returnBody": { + "componentProperty": false, + "deprecated": false, + "displayName": "Include error message in the return body", + "javaType": "Boolean", + "kind": "parameter", + "order": 3, + "required": false, + "secret": false, + "type": "boolean" + } + } + } + ], + "standardizedErrors": [ + { + "displayName": "ServerError", + "name": "SERVER_ERROR" + } + ] + }, + "id": "io.syndesis:api-provider-end", + "name": "Provided API Return Path", + "pattern": "To" + } + ], + "dependencies": [ + { + "id": "io.syndesis.connector:connector-api-provider:2.0-SNAPSHOT", + "type": "MAVEN" + }, + { + "id": "org.apache.camel:camel-swagger-java:2.23.2.fuse-760011", + "type": "MAVEN" + }, + { + "id": "org.apache.camel:camel-servlet-starter:2.23.2.fuse-760011", + "type": "MAVEN" + } + ], + "description": "Expose Restful APIs", + "icon": "assets:api-provider.svg", + "id": "api-provider", + "metadata": { + "hide-from-connection-pages": "true" + }, + "name": "API Provider", + "version": 64 + }, + "connectorId": "api-provider", + "description": "Expose Restful APIs", + "icon": "assets:api-provider.svg", + "id": "api-provider", + "isDerived": false, + "metadata": { + "hide-from-connection-pages": "true" + }, + "name": "API Provider", + "uses": 0 + }, + "id": "i-LwPppMbz3EFFmQK5RGVz", + "metadata": { + "configured": "true" + }, + "stepKind": "endpoint" + } + ], + "tags": [ + "5", + "api-provider" + ], + "type": "API_PROVIDER" + }, + { + "description": "DELETE /{id}", + "id": "i-LwPppMbz3EFFmQK5RGZz", + "metadata": { + "default-return-code": "204", + "excerpt": "204 Task deleted", + "openapi-operationid": "deleteTask", + "return-code-edited": "true" + }, + "name": "Delete task", + "steps": [ + { + "action": { + "actionType": "connector", + "description": "Start a Syndesis integration from a provided API", + "descriptor": { + "componentScheme": "direct", + "connectorCustomizers": [ + "io.syndesis.connector.apiprovider.ApiProviderStartEndpointCustomizer" + ], + "inputDataShape": { + "kind": "none" + }, + "outputDataShape": { + "description": "API request payload", + "kind": "json-schema", + "metadata": { + "unified": "true" + }, + "name": "Request", + "specification": "{\"$schema\":\"http://json-schema.org/schema#\",\"type\":\"object\",\"$id\":\"io:syndesis:wrapped\",\"properties\":{\"parameters\":{\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"integer\",\"title\":\"id\",\"description\":\"Task identifier to delete\"}}}}}" + }, + "propertyDefinitionSteps": [ + { + "description": "API Provider Configuration", + "name": "configuration", + "properties": { + "name": { + "componentProperty": false, + "deprecated": false, + "description": "The operation ID as defined in the API spec", + "displayName": "Operation ID", + "javaType": "String", + "kind": "parameter", + "required": true, + "secret": false, + "type": "string" + } + } + } + ] + }, + "id": "io.syndesis:api-provider-start", + "metadata": { + "serverBasePath": "/api" + }, + "name": "Provided API", + "pattern": "From", + "tags": [ + "expose", + "locked-action" + ] + }, + "configuredProperties": { + "name": "deleteTask" + }, + "connection": { + "connector": { + "actions": [ + { + "actionType": "connector", + "description": "Start a Syndesis integration from a provided API", + "descriptor": { + "componentScheme": "direct", + "connectorCustomizers": [ + "io.syndesis.connector.apiprovider.ApiProviderStartEndpointCustomizer" + ], + "inputDataShape": { + "kind": "none" + }, + "outputDataShape": { + "kind": "any" + }, + "propertyDefinitionSteps": [ + { + "description": "API Provider Configuration", + "name": "configuration", + "properties": { + "name": { + "componentProperty": false, + "deprecated": false, + "description": "The operation ID as defined in the API spec", + "displayName": "Operation ID", + "javaType": "String", + "kind": "parameter", + "required": true, + "secret": false, + "type": "string" + } + } + } + ] + }, + "id": "io.syndesis:api-provider-start", + "name": "Provided API", + "pattern": "From", + "tags": [ + "expose" + ] + }, + { + "actionType": "connector", + "description": "End action of Syndesis integrations that start from a provided API", + "descriptor": { + "componentScheme": "bean", + "configuredProperties": { + "beanName": "io.syndesis.connector.apiprovider.NoOpBean", + "method": "process" + }, + "connectorCustomizers": [ + "io.syndesis.connector.apiprovider.ApiProviderReturnPathCustomizer" + ], + "inputDataShape": { + "kind": "any" + }, + "outputDataShape": { + "kind": "none" + }, + "propertyDefinitionSteps": [ + { + "description": "API Provider Return Path Configuration", + "name": "configuration", + "properties": { + "defaultResponse": { + "componentProperty": false, + "deprecated": false, + "displayName": "Default Response", + "javaType": "String", + "kind": "parameter", + "order": 0, + "required": false, + "secret": false, + "type": "legend" + }, + "errorHandling": { + "componentProperty": false, + "deprecated": false, + "displayName": "Error Handling", + "javaType": "String", + "kind": "parameter", + "order": 2, + "required": false, + "secret": false, + "type": "legend" + }, + "errorResponseCodes": { + "componentProperty": false, + "defaultValue": "{}", + "deprecated": false, + "description": "The return code to set according to different error situations", + "displayName": "Error Response Codes", + "javaType": "Map", + "kind": "parameter", + "order": 4, + "required": false, + "secret": false, + "type": "mapset" + }, + "httpResponseCode": { + "componentProperty": false, + "deprecated": false, + "description": "The return code to set in the HTTP response", + "displayName": "Return Code", + "javaType": "String", + "kind": "parameter", + "order": 1, + "required": true, + "secret": false, + "type": "select" + }, + "returnBody": { + "componentProperty": false, + "deprecated": false, + "displayName": "Include error message in the return body", + "javaType": "Boolean", + "kind": "parameter", + "order": 3, + "required": false, + "secret": false, + "type": "boolean" + } + } + } + ], + "standardizedErrors": [ + { + "displayName": "ServerError", + "name": "SERVER_ERROR" + } + ] + }, + "id": "io.syndesis:api-provider-end", + "name": "Provided API Return Path", + "pattern": "To" + } + ], + "dependencies": [ + { + "id": "io.syndesis.connector:connector-api-provider:2.0-SNAPSHOT", + "type": "MAVEN" + }, + { + "id": "org.apache.camel:camel-swagger-java:2.23.2.fuse-760011", + "type": "MAVEN" + }, + { + "id": "org.apache.camel:camel-servlet-starter:2.23.2.fuse-760011", + "type": "MAVEN" + } + ], + "description": "Expose Restful APIs", + "icon": "assets:api-provider.svg", + "id": "api-provider", + "metadata": { + "hide-from-connection-pages": "true" + }, + "name": "API Provider", + "version": 64 + }, + "connectorId": "api-provider", + "description": "Expose Restful APIs", + "icon": "assets:api-provider.svg", + "id": "api-provider", + "isDerived": false, + "metadata": { + "hide-from-connection-pages": "true" + }, + "name": "API Provider", + "uses": 0 + }, + "id": "i-LwPppMbz3EFFmQK5RGXz", + "metadata": { + "configured": "true" + }, + "stepKind": "endpoint" + }, + { + "configuredProperties": { + "bodyLoggingEnabled": "false", + "contextLoggingEnabled": "false", + "customText": "Delete task" + }, + "id": "-LwPrCCSOXnrmequX_Kb", + "metadata": { + "configured": "true" + }, + "name": "Log", + "stepKind": "log" + }, + { + "action": { + "actionType": "step", + "descriptor": { + "inputDataShape": { + "kind": "any", + "name": "All preceding outputs" + }, + "outputDataShape": { + "description": "Parameters of SQL [delete from todo where id=:#id]", + "kind": "json-schema", + "metadata": { + "variant": "element" + }, + "name": "SQL Parameter", + "specification": "{\"type\":\"object\",\"$schema\":\"http://json-schema.org/schema#\",\"title\":\"SQL_PARAM_IN\",\"properties\":{\"id\":{\"type\":\"integer\",\"required\":true}}}", + "type": "SQL_PARAM_IN" + } + } + }, + "configuredProperties": { + "atlasmapping": "{\"AtlasMapping\":{\"jsonType\":\"io.atlasmap.v2.AtlasMapping\",\"dataSource\":[{\"jsonType\":\"io.atlasmap.json.v2.JsonDataSource\",\"id\":\"i-LwPppMbz3EFFmQK5RGXz\",\"uri\":\"atlas:json:i-LwPppMbz3EFFmQK5RGXz\",\"dataSourceType\":\"SOURCE\"},{\"jsonType\":\"io.atlasmap.json.v2.JsonDataSource\",\"id\":\"-LwPrI24OXnrmequX_Kb\",\"uri\":\"atlas:json:-LwPrI24OXnrmequX_Kb\",\"dataSourceType\":\"TARGET\",\"template\":null}],\"mappings\":{\"mapping\":[{\"jsonType\":\"io.atlasmap.v2.Mapping\",\"id\":\"mapping.111697\",\"inputField\":[{\"jsonType\":\"io.atlasmap.json.v2.JsonField\",\"name\":\"id\",\"path\":\"/parameters/id\",\"fieldType\":\"INTEGER\",\"docId\":\"i-LwPppMbz3EFFmQK5RGXz\",\"userCreated\":false}],\"outputField\":[{\"jsonType\":\"io.atlasmap.json.v2.JsonField\",\"name\":\"id\",\"path\":\"/id\",\"fieldType\":\"INTEGER\",\"docId\":\"-LwPrI24OXnrmequX_Kb\",\"userCreated\":false}]}]},\"name\":\"UI.150022\",\"lookupTables\":{\"lookupTable\":[]},\"constants\":{\"constant\":[]},\"properties\":{\"property\":[]}}}" + }, + "id": "-LwPrI2SOXnrmequX_Kb", + "metadata": { + "configured": "true" + }, + "name": "Data Mapper", + "stepKind": "mapper" + }, + { + "action": { + "actionType": "connector", + "description": "Invoke SQL to obtain, store, update, or delete data.", + "descriptor": { + "componentScheme": "sql", + "connectorCustomizers": [ + "io.syndesis.connector.sql.customizer.SqlConnectorCustomizer" + ], + "inputDataShape": { + "description": "Parameters of SQL [delete from todo where id=:#id]", + "kind": "json-schema", + "metadata": { + "variant": "element" + }, + "name": "SQL Parameter", + "specification": "{\"type\":\"object\",\"$schema\":\"http://json-schema.org/schema#\",\"title\":\"SQL_PARAM_IN\",\"properties\":{\"id\":{\"type\":\"integer\",\"required\":true}}}", + "type": "SQL_PARAM_IN" + }, + "outputDataShape": { + "kind": "none", + "type": "SQL_PARAM_OUT" + }, + "propertyDefinitionSteps": [ + { + "description": "Enter a SQL statement that starts with INSERT, SELECT, UPDATE or DELETE.", + "name": "SQL statement", + "properties": { + "batch": { + "defaultValue": "false", + "deprecated": false, + "displayName": "Batch update", + "group": "common", + "javaType": "java.lang.Boolean", + "kind": "property", + "labelHint": "Use prepared statements for INSERT, UPDATE, DELETE in order to update multiple rows with batch update.", + "order": 2, + "required": false, + "secret": false, + "type": "boolean" + }, + "query": { + "dataList": [ + "delete from todo where id=:#id" + ], + "defaultValue": "delete from todo where id=:#id", + "deprecated": false, + "displayName": "SQL statement", + "group": "common", + "javaType": "java.lang.String", + "kind": "path", + "labelHint": "SQL statement to be executed. Can contain input parameters prefixed by ':#'.", + "order": 1, + "placeholder": "for example ':#MYPARAMNAME'", + "required": true, + "secret": false, + "type": "dataList" + }, + "raiseErrorOnNotFound": { + "defaultValue": "false", + "deprecated": false, + "displayName": "Raise error when record not found", + "group": "common", + "javaType": "java.lang.Boolean", + "kind": "property", + "labelHint": "Error when no records are selected, updated or deleted", + "order": 3, + "required": false, + "secret": false, + "type": "boolean" + } + } + } + ], + "standardizedErrors": [ + { + "displayName": "SqlDataAccessError", + "name": "SQL_DATA_ACCESS_ERROR" + }, + { + "displayName": "SqlEntityNotFoundError", + "name": "SQL_ENTITY_NOT_FOUND_ERROR" + }, + { + "displayName": "SqlConnectorError", + "name": "SQL_CONNECTOR_ERROR" + } + ] + }, + "id": "sql-connector", + "name": "Invoke SQL", + "pattern": "To", + "tags": [ + "dynamic" + ] + }, + "configuredProperties": { + "batch": "false", + "query": "delete from todo where id=:#id", + "raiseErrorOnNotFound": "true" + }, + "connection": { + "configuredProperties": { + "password": "»ENC:50a0f4b2d9e6ff8f900571858a112f4532fc26aedf5e581eac7d614e3cf17aa0450a1a255d7c5ab31665ff120c5841fa", + "schema": "sampledb", + "url": "jdbc:postgresql://syndesis-db:5432/sampledb", + "user": "sampledb" + }, + "connector": { + "actions": [ + { + "actionType": "connector", + "description": "Invoke SQL to obtain, store, update, or delete data.", + "descriptor": { + "componentScheme": "sql", + "connectorCustomizers": [ + "io.syndesis.connector.sql.customizer.SqlConnectorCustomizer" + ], + "inputDataShape": { + "kind": "json-schema" + }, + "outputDataShape": { + "kind": "json-schema" + }, + "propertyDefinitionSteps": [ + { + "description": "Enter a SQL statement that starts with INSERT, SELECT, UPDATE or DELETE.", + "name": "SQL statement", + "properties": { + "batch": { + "defaultValue": "false", + "deprecated": false, + "displayName": "Batch update", + "group": "common", + "javaType": "java.lang.Boolean", + "kind": "property", + "labelHint": "Use prepared statements for INSERT, UPDATE, DELETE in order to update multiple rows with batch update.", + "order": 2, + "required": false, + "secret": false, + "type": "boolean" + }, + "query": { + "deprecated": false, + "displayName": "SQL statement", + "group": "common", + "javaType": "java.lang.String", + "kind": "path", + "labelHint": "SQL statement to be executed. Can contain input parameters prefixed by ':#'.", + "order": 1, + "placeholder": "for example ':#MYPARAMNAME'", + "required": true, + "secret": false, + "type": "dataList" + }, + "raiseErrorOnNotFound": { + "defaultValue": "false", + "deprecated": false, + "displayName": "Raise error when record not found", + "group": "common", + "javaType": "java.lang.Boolean", + "kind": "property", + "labelHint": "Error when no records are selected, updated or deleted", + "order": 3, + "required": false, + "secret": false, + "type": "boolean" + } + } + } + ], + "standardizedErrors": [ + { + "displayName": "SqlDataAccessError", + "name": "SQL_DATA_ACCESS_ERROR" + }, + { + "displayName": "SqlEntityNotFoundError", + "name": "SQL_ENTITY_NOT_FOUND_ERROR" + }, + { + "displayName": "SqlConnectorError", + "name": "SQL_CONNECTOR_ERROR" + } + ] + }, + "id": "sql-connector", + "name": "Invoke SQL", + "pattern": "To", + "tags": [ + "dynamic" + ] + }, + { + "actionType": "connector", + "description": "Periodically invoke SQL to obtain data.", + "descriptor": { + "componentScheme": "sql", + "connectorCustomizers": [ + "io.syndesis.connector.sql.customizer.SqlStartConnectorCustomizer" + ], + "inputDataShape": { + "kind": "none" + }, + "outputDataShape": { + "kind": "json-schema" + }, + "propertyDefinitionSteps": [ + { + "description": "Enter a SQL statement that returns results, such as SELECT.", + "name": "SQL statement", + "properties": { + "isRaiseErrorOnNotFound": { + "deprecated": false, + "displayName": "Raise NotFoundError", + "group": "consumer", + "javaType": "java.lang.Boolean", + "kind": "parameter", + "labelHint": "Raise NotFoundError if no records are inserted, updated, selected or deleted", + "order": 3, + "required": false, + "secret": false, + "type": "boolean" + }, + "query": { + "deprecated": false, + "displayName": "SQL statement", + "group": "common", + "javaType": "java.lang.String", + "kind": "path", + "labelHint": "SQL statement to be executed.", + "order": 1, + "required": true, + "secret": false, + "type": "dataList" + }, + "schedulerExpression": { + "defaultValue": "60000", + "deprecated": false, + "displayName": "Period", + "group": "consumer", + "javaType": "long", + "kind": "parameter", + "labelHint": "Delay between scheduling (executing).", + "order": 2, + "required": false, + "secret": false, + "type": "duration" + } + } + } + ] + }, + "id": "sql-start-connector", + "name": "Periodic SQL invocation", + "pattern": "From", + "tags": [ + "dynamic" + ] + }, + { + "actionType": "connector", + "description": "Invoke a stored procedure.", + "descriptor": { + "componentScheme": "sql-stored", + "connectorCustomizers": [ + "io.syndesis.connector.sql.customizer.SqlStoredConnectorCustomizer" + ], + "inputDataShape": { + "kind": "json-schema" + }, + "outputDataShape": { + "kind": "json-schema" + }, + "propertyDefinitionSteps": [ + { + "description": "Select the stored procedure.", + "name": "Procedure name", + "properties": { + "procedureName": { + "componentProperty": true, + "deprecated": false, + "displayName": "Procedure name", + "group": "common", + "javaType": "java.lang.String", + "kind": "property", + "labelHint": "Name of the stored procedure.", + "required": false, + "secret": false, + "type": "select" + }, + "template": { + "componentProperty": false, + "deprecated": false, + "displayName": "Template", + "group": "producer", + "javaType": "java.lang.String", + "kind": "path", + "labelHint": "Stored procedure template to perform.", + "required": false, + "secret": false, + "type": "hidden" + } + } + } + ] + }, + "id": "sql-stored-connector", + "name": "Invoke stored procedure", + "pattern": "To", + "tags": [ + "dynamic" + ] + }, + { + "actionType": "connector", + "description": "Periodically invoke a stored procedure.", + "descriptor": { + "componentScheme": "sql-stored", + "connectorCustomizers": [ + "io.syndesis.connector.sql.customizer.SqlStartStoredConnectorCustomizer" + ], + "inputDataShape": { + "kind": "none" + }, + "outputDataShape": { + "kind": "json-schema" + }, + "propertyDefinitionSteps": [ + { + "description": "Select the stored procedure.", + "name": "Procedure name", + "properties": { + "procedureName": { + "componentProperty": true, + "deprecated": false, + "displayName": "Procedure name", + "group": "producer", + "javaType": "java.lang.String", + "kind": "path", + "labelHint": "Name of the stored procedure.", + "required": true, + "secret": false, + "type": "select" + }, + "schedulerExpression": { + "defaultValue": "60000", + "deprecated": false, + "displayName": "Period", + "group": "consumer", + "javaType": "long", + "kind": "parameter", + "labelHint": "Delay between scheduling (executing).", + "required": false, + "secret": false, + "type": "duration" + }, + "template": { + "componentProperty": false, + "deprecated": false, + "displayName": "Template", + "group": "producer", + "javaType": "java.lang.String", + "kind": "path", + "labelHint": "Stored Procedure template to perform.", + "required": true, + "secret": false, + "type": "hidden" + } + } + } + ] + }, + "id": "sql-stored-start-connector", + "name": "Periodic stored procedure invocation", + "pattern": "From", + "tags": [ + "dynamic" + ] + } + ], + "connectorCustomizers": [ + "io.syndesis.connector.sql.customizer.DataSourceCustomizer" + ], + "dependencies": [ + { + "id": "io.syndesis.connector:connector-sql:2.0-SNAPSHOT", + "type": "MAVEN" + }, + { + "id": "jdbc-driver", + "type": "EXTENSION_TAG" + } + ], + "description": "Invoke SQL to obtain, store, update, or delete data.", + "icon": "assets:sql.svg", + "id": "sql", + "name": "Database", + "properties": { + "password": { + "componentProperty": true, + "deprecated": false, + "displayName": "Password", + "group": "security", + "javaType": "java.lang.String", + "kind": "property", + "label": "common,security", + "labelHint": "Password for the database connection.", + "order": 3, + "required": true, + "secret": true, + "type": "string" + }, + "schema": { + "componentProperty": true, + "deprecated": false, + "displayName": "Schema", + "group": "common", + "javaType": "java.lang.String", + "kind": "property", + "label": "common", + "labelHint": "Database schema.", + "order": 4, + "required": false, + "secret": false, + "type": "string" + }, + "url": { + "componentProperty": true, + "deprecated": false, + "displayName": "Connection URL", + "group": "common", + "javaType": "java.lang.String", + "kind": "property", + "labelHint": "JDBC URL of the database.", + "order": 1, + "required": true, + "secret": false, + "type": "string" + }, + "user": { + "componentProperty": true, + "deprecated": false, + "displayName": "Username", + "group": "common", + "javaType": "java.lang.String", + "kind": "property", + "labelHint": "Username for the database connection.", + "order": 2, + "required": true, + "secret": false, + "type": "string" + } + }, + "tags": [ + "verifier" + ], + "version": 64 + }, + "connectorId": "sql", + "description": "Connection to SampleDB", + "icon": "assets:sql.svg", + "id": "5", + "isDerived": false, + "name": "PostgresDB", + "tags": [ + "sampledb" + ], + "uses": 0 + }, + "id": "-LwPrI24OXnrmequX_Kb", + "metadata": { + "configured": "true" + }, + "stepKind": "endpoint" + }, + { + "action": { + "actionType": "connector", + "description": "End action of Syndesis integrations that start from a provided API", + "descriptor": { + "componentScheme": "bean", + "configuredProperties": { + "beanName": "io.syndesis.connector.apiprovider.NoOpBean", + "method": "process" + }, + "connectorCustomizers": [ + "io.syndesis.connector.apiprovider.ApiProviderReturnPathCustomizer" + ], + "inputDataShape": { + "kind": "none" + }, + "outputDataShape": { + "kind": "none" + }, + "propertyDefinitionSteps": [ + { + "description": "API Provider Return Path Configuration", + "name": "configuration", + "properties": { + "defaultResponse": { + "componentProperty": false, + "deprecated": false, + "displayName": "Default Response", + "javaType": "String", + "kind": "parameter", + "order": 0, + "required": false, + "secret": false, + "type": "legend" + }, + "errorHandling": { + "componentProperty": false, + "deprecated": false, + "displayName": "Error Handling", + "javaType": "String", + "kind": "parameter", + "order": 2, + "required": false, + "secret": false, + "type": "legend" + }, + "errorResponseCodes": { + "componentProperty": false, + "defaultValue": "{}", + "deprecated": false, + "description": "The return code to set according to different error situations", + "displayName": "Error Response Codes", + "extendedProperties": "{ \"mapsetValueDefinition\": { \"enum\" : [{\"label\":\"204 Task deleted\",\"value\":\"204\"}], \"type\" : \"select\" },\"mapsetOptions\": { \"i18nKeyColumnTitle\": \"When the error message is\", \"i18nValueColumnTitle\": \"Return this HTTP response code\" }}", + "javaType": "Map", + "kind": "parameter", + "order": 4, + "required": false, + "secret": false, + "type": "mapset" + }, + "httpResponseCode": { + "componentProperty": false, + "deprecated": false, + "description": "The return code to set in the HTTP response", + "displayName": "Return Code", + "enum": [ + { + "label": "204 Task deleted", + "value": "204" + } + ], + "javaType": "String", + "kind": "parameter", + "order": 1, + "required": true, + "secret": false, + "type": "select" + }, + "returnBody": { + "componentProperty": false, + "deprecated": false, + "displayName": "Include error message in the return body", + "javaType": "Boolean", + "kind": "parameter", + "order": 3, + "required": false, + "secret": false, + "type": "boolean" + } + } + } + ], + "standardizedErrors": [ + { + "displayName": "ServerError", + "name": "SERVER_ERROR" + } + ] + }, + "id": "io.syndesis:api-provider-end", + "name": "Provided API Return Path", + "pattern": "To", + "tags": [ + "locked-action" + ] + }, + "configuredProperties": { + "errorResponseCodes": "{}", + "httpResponseCode": "204", + "returnBody": "true" + }, + "connection": { + "connector": { + "actions": [ + { + "actionType": "connector", + "description": "Start a Syndesis integration from a provided API", + "descriptor": { + "componentScheme": "direct", + "connectorCustomizers": [ + "io.syndesis.connector.apiprovider.ApiProviderStartEndpointCustomizer" + ], + "inputDataShape": { + "kind": "none" + }, + "outputDataShape": { + "kind": "any" + }, + "propertyDefinitionSteps": [ + { + "description": "API Provider Configuration", + "name": "configuration", + "properties": { + "name": { + "componentProperty": false, + "deprecated": false, + "description": "The operation ID as defined in the API spec", + "displayName": "Operation ID", + "javaType": "String", + "kind": "parameter", + "required": true, + "secret": false, + "type": "string" + } + } + } + ] + }, + "id": "io.syndesis:api-provider-start", + "name": "Provided API", + "pattern": "From", + "tags": [ + "expose" + ] + }, + { + "actionType": "connector", + "description": "End action of Syndesis integrations that start from a provided API", + "descriptor": { + "componentScheme": "bean", + "configuredProperties": { + "beanName": "io.syndesis.connector.apiprovider.NoOpBean", + "method": "process" + }, + "connectorCustomizers": [ + "io.syndesis.connector.apiprovider.ApiProviderReturnPathCustomizer" + ], + "inputDataShape": { + "kind": "any" + }, + "outputDataShape": { + "kind": "none" + }, + "propertyDefinitionSteps": [ + { + "description": "API Provider Return Path Configuration", + "name": "configuration", + "properties": { + "defaultResponse": { + "componentProperty": false, + "deprecated": false, + "displayName": "Default Response", + "javaType": "String", + "kind": "parameter", + "order": 0, + "required": false, + "secret": false, + "type": "legend" + }, + "errorHandling": { + "componentProperty": false, + "deprecated": false, + "displayName": "Error Handling", + "javaType": "String", + "kind": "parameter", + "order": 2, + "required": false, + "secret": false, + "type": "legend" + }, + "errorResponseCodes": { + "componentProperty": false, + "defaultValue": "{}", + "deprecated": false, + "description": "The return code to set according to different error situations", + "displayName": "Error Response Codes", + "javaType": "Map", + "kind": "parameter", + "order": 4, + "required": false, + "secret": false, + "type": "mapset" + }, + "httpResponseCode": { + "componentProperty": false, + "deprecated": false, + "description": "The return code to set in the HTTP response", + "displayName": "Return Code", + "javaType": "String", + "kind": "parameter", + "order": 1, + "required": true, + "secret": false, + "type": "select" + }, + "returnBody": { + "componentProperty": false, + "deprecated": false, + "displayName": "Include error message in the return body", + "javaType": "Boolean", + "kind": "parameter", + "order": 3, + "required": false, + "secret": false, + "type": "boolean" + } + } + } + ], + "standardizedErrors": [ + { + "displayName": "ServerError", + "name": "SERVER_ERROR" + } + ] + }, + "id": "io.syndesis:api-provider-end", + "name": "Provided API Return Path", + "pattern": "To" + } + ], + "dependencies": [ + { + "id": "io.syndesis.connector:connector-api-provider:2.0-SNAPSHOT", + "type": "MAVEN" + }, + { + "id": "org.apache.camel:camel-swagger-java:2.23.2.fuse-760011", + "type": "MAVEN" + }, + { + "id": "org.apache.camel:camel-servlet-starter:2.23.2.fuse-760011", + "type": "MAVEN" + } + ], + "description": "Expose Restful APIs", + "icon": "assets:api-provider.svg", + "id": "api-provider", + "metadata": { + "hide-from-connection-pages": "true" + }, + "name": "API Provider", + "version": 64 + }, + "connectorId": "api-provider", + "description": "Expose Restful APIs", + "icon": "assets:api-provider.svg", + "id": "api-provider", + "isDerived": false, + "metadata": { + "hide-from-connection-pages": "true" + }, + "name": "API Provider", + "uses": 0 + }, + "id": "i-LwPppMbz3EFFmQK5RGYz", + "metadata": { + "configured": "true" + }, + "stepKind": "endpoint" + } + ], + "tags": [ + "5", + "api-provider" + ], + "type": "API_PROVIDER" + } + ], + "id": "i-LwPq6VYz3EFFmQK5RGaz", + "name": "TodoApiV3", + "resources": [ + { + "id": "i-LwPppMhz3EFFmQK5RG_z", + "kind": "open-api" + } + ], + "tags": [ + "api-provider", + "sql" + ], + "updatedAt": 1576703720761, + "version": 5 + } + }, + "open-apis": { + ":i-LwPppMhz3EFFmQK5RG_z": { + "document": "ewogICAgIm9wZW5hcGkiOiAiMy4wLjIiLAogICAgImluZm8iOiB7CiAgICAgICAgInRpdGxlIjogIlRvZG8gQXBwIEFQSSIsCiAgICAgICAgInZlcnNpb24iOiAiMS4wLjAiLAogICAgICAgICJkZXNjcmlwdGlvbiI6ICJFeGFtcGxlIFRvZG8gQXBwbGljYXRpb24gQVBJIiwKICAgICAgICAibGljZW5zZSI6IHsKICAgICAgICAgICAgIm5hbWUiOiAiQXBhY2hlIDIuMCIsCiAgICAgICAgICAgICJ1cmwiOiAiaHR0cDovL3d3dy5hcGFjaGUub3JnL2xpY2Vuc2VzL0xJQ0VOU0UtMi4wLmh0bWwiCiAgICAgICAgfQogICAgfSwKICAgICJzZXJ2ZXJzIjogWwogICAgICAgIHsKICAgICAgICAgICAgInVybCI6ICJodHRwOi8vaG9zdG5hbWUvYXBpIiwKICAgICAgICAgICAgInZhcmlhYmxlcyI6IHsKICAgICAgICAgICAgICAgICJzY2hlbWUiOiB7CiAgICAgICAgICAgICAgICAgICAgImVudW0iOiBbCiAgICAgICAgICAgICAgICAgICAgICAgICJodHRwIiwKICAgICAgICAgICAgICAgICAgICAgICAgImh0dHBzIgogICAgICAgICAgICAgICAgICAgIF0sCiAgICAgICAgICAgICAgICAgICAgImRlZmF1bHQiOiAiaHR0cCIsCiAgICAgICAgICAgICAgICAgICAgImRlc2NyaXB0aW9uIjogIlRoZSBzdXBwb3J0ZWQgcHJvdG9jb2wgc2NoZW1lcy4iCiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICBdLAogICAgInBhdGhzIjogewogICAgICAgICIvIjogewogICAgICAgICAgICAiZ2V0IjogewogICAgICAgICAgICAgICAgInRhZ3MiOiBbCiAgICAgICAgICAgICAgICAgICAgInRhc2tzIiwKICAgICAgICAgICAgICAgICAgICAiZmV0Y2hpbmciCiAgICAgICAgICAgICAgICBdLAogICAgICAgICAgICAgICAgInJlc3BvbnNlcyI6IHsKICAgICAgICAgICAgICAgICAgICAiMjAwIjogewogICAgICAgICAgICAgICAgICAgICAgICAiJHJlZiI6ICIjL2NvbXBvbmVudHMvcmVzcG9uc2VzL1Rhc2tMaXN0IgogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0sCiAgICAgICAgICAgICAgICAib3BlcmF0aW9uSWQiOiAibGlzdFRhc2tzIiwKICAgICAgICAgICAgICAgICJzdW1tYXJ5IjogIkxpc3QgYWxsIHRhc2tzIiwKICAgICAgICAgICAgICAgICJkZXNjcmlwdGlvbiI6ICJGZXRjaGVzIGFsbCB0YXNrcyBmcm9tIHRoZSBkYXRhYmFzZSIKICAgICAgICAgICAgfSwKICAgICAgICAgICAgInBvc3QiOiB7CiAgICAgICAgICAgICAgICAicmVxdWVzdEJvZHkiOiB7CiAgICAgICAgICAgICAgICAgICAgIiRyZWYiOiAiIy9jb21wb25lbnRzL3JlcXVlc3RCb2RpZXMvTmV3VGFzayIKICAgICAgICAgICAgICAgIH0sCiAgICAgICAgICAgICAgICAidGFncyI6IFsKICAgICAgICAgICAgICAgICAgICAidGFza3MiLAogICAgICAgICAgICAgICAgICAgICJjcmVhdGluZyIKICAgICAgICAgICAgICAgIF0sCiAgICAgICAgICAgICAgICAicmVzcG9uc2VzIjogewogICAgICAgICAgICAgICAgICAgICIyMDEiOiB7CiAgICAgICAgICAgICAgICAgICAgICAgICJjb250ZW50IjogewogICAgICAgICAgICAgICAgICAgICAgICAgICAgImFwcGxpY2F0aW9uL2pzb24iOiB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgInNjaGVtYSI6IHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIiRyZWYiOiAiIy9jb21wb25lbnRzL3NjaGVtYXMvVGFzayIKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIH0sCiAgICAgICAgICAgICAgICAgICAgICAgICJkZXNjcmlwdGlvbiI6ICJBbGwgaXMgZ29vZCIKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICAgICAgIm9wZXJhdGlvbklkIjogImFkZFRhc2siLAogICAgICAgICAgICAgICAgInN1bW1hcnkiOiAiQ3JlYXRlIG5ldyB0YXNrIiwKICAgICAgICAgICAgICAgICJkZXNjcmlwdGlvbiI6ICJTdG9yZXMgbmV3IHRhc2sgaW4gdGhlIGRhdGFiYXNlIgogICAgICAgICAgICB9CiAgICAgICAgfSwKICAgICAgICAiL3tpZH0iOiB7CiAgICAgICAgICAgICJnZXQiOiB7CiAgICAgICAgICAgICAgICAidGFncyI6IFsKICAgICAgICAgICAgICAgICAgICAidGFza3MiLAogICAgICAgICAgICAgICAgICAgICJmZXRjaGluZyIKICAgICAgICAgICAgICAgIF0sCiAgICAgICAgICAgICAgICAicGFyYW1ldGVycyI6IFsKICAgICAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgICAgICJuYW1lIjogImlkIiwKICAgICAgICAgICAgICAgICAgICAgICAgImRlc2NyaXB0aW9uIjogIlRhc2sgaWRlbnRpZmllciIsCiAgICAgICAgICAgICAgICAgICAgICAgICJzY2hlbWEiOiB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAiZm9ybWF0IjogImludDY0IiwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICJ0eXBlIjogImludGVnZXIiCiAgICAgICAgICAgICAgICAgICAgICAgIH0sCiAgICAgICAgICAgICAgICAgICAgICAgICJpbiI6ICJwYXRoIiwKICAgICAgICAgICAgICAgICAgICAgICAgInJlcXVpcmVkIjogdHJ1ZQogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIF0sCiAgICAgICAgICAgICAgICAicmVzcG9uc2VzIjogewogICAgICAgICAgICAgICAgICAgICIyMDAiOiB7CiAgICAgICAgICAgICAgICAgICAgICAgICJjb250ZW50IjogewogICAgICAgICAgICAgICAgICAgICAgICAgICAgImFwcGxpY2F0aW9uL2pzb24iOiB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgInNjaGVtYSI6IHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIiRyZWYiOiAiIy9jb21wb25lbnRzL3NjaGVtYXMvVGFzayIKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIH0sCiAgICAgICAgICAgICAgICAgICAgICAgICJkZXNjcmlwdGlvbiI6ICJBbGwgaXMgZ29vZCIKICAgICAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICAgICAgICAgICI0MDQiOiB7CiAgICAgICAgICAgICAgICAgICAgICAgICJkZXNjcmlwdGlvbiI6ICJObyB0YXNrIHdpdGggcHJvdmlkZWQgaWRlbnRpZmllciBmb3VuZCIKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICAgICAgIm9wZXJhdGlvbklkIjogImdldFRhc2siLAogICAgICAgICAgICAgICAgInN1bW1hcnkiOiAiRmV0Y2ggdGFzayIsCiAgICAgICAgICAgICAgICAiZGVzY3JpcHRpb24iOiAiRmV0Y2hlcyB0YXNrIGJ5IGdpdmVuIGlkZW50aWZpZXIiCiAgICAgICAgICAgIH0sCiAgICAgICAgICAgICJwdXQiOiB7CiAgICAgICAgICAgICAgICAicmVxdWVzdEJvZHkiOiB7CiAgICAgICAgICAgICAgICAgICAgImRlc2NyaXB0aW9uIjogIlRhc2sgd2l0aCB1cGRhdGVzIiwKICAgICAgICAgICAgICAgICAgICAiY29udGVudCI6IHsKICAgICAgICAgICAgICAgICAgICAgICAgImFwcGxpY2F0aW9uL2pzb24iOiB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAic2NoZW1hIjogewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICIkcmVmIjogIiMvY29tcG9uZW50cy9zY2hlbWFzL1Rhc2siCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICAgICAgICAgICJyZXF1aXJlZCI6IHRydWUKICAgICAgICAgICAgICAgIH0sCiAgICAgICAgICAgICAgICAidGFncyI6IFsKICAgICAgICAgICAgICAgICAgICAidGFza3MiLAogICAgICAgICAgICAgICAgICAgICJ1cGRhdGluZyIKICAgICAgICAgICAgICAgIF0sCiAgICAgICAgICAgICAgICAicGFyYW1ldGVycyI6IFsKICAgICAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgICAgICJuYW1lIjogImlkIiwKICAgICAgICAgICAgICAgICAgICAgICAgImRlc2NyaXB0aW9uIjogIlRhc2sgaWRlbnRpZmllciIsCiAgICAgICAgICAgICAgICAgICAgICAgICJzY2hlbWEiOiB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAiZm9ybWF0IjogImludDY0IiwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICJ0eXBlIjogImludGVnZXIiCiAgICAgICAgICAgICAgICAgICAgICAgIH0sCiAgICAgICAgICAgICAgICAgICAgICAgICJpbiI6ICJwYXRoIiwKICAgICAgICAgICAgICAgICAgICAgICAgInJlcXVpcmVkIjogdHJ1ZQogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIF0sCiAgICAgICAgICAgICAgICAicmVzcG9uc2VzIjogewogICAgICAgICAgICAgICAgICAgICIyMDAiOiB7CiAgICAgICAgICAgICAgICAgICAgICAgICJjb250ZW50IjogewogICAgICAgICAgICAgICAgICAgICAgICAgICAgImFwcGxpY2F0aW9uL2pzb24iOiB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgInNjaGVtYSI6IHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIiRyZWYiOiAiIy9jb21wb25lbnRzL3NjaGVtYXMvVGFzayIKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIH0sCiAgICAgICAgICAgICAgICAgICAgICAgICJkZXNjcmlwdGlvbiI6ICJBbGwgaXMgZ29vZCIKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICAgICAgIm9wZXJhdGlvbklkIjogInVwZGF0ZVRhc2siLAogICAgICAgICAgICAgICAgInN1bW1hcnkiOiAiVXBkYXRlIHRhc2siLAogICAgICAgICAgICAgICAgImRlc2NyaXB0aW9uIjogIlVwZGF0ZXMgdGFzayBieSBnaXZlbiBpZGVudGlmaWVyIgogICAgICAgICAgICB9LAogICAgICAgICAgICAiZGVsZXRlIjogewogICAgICAgICAgICAgICAgInRhZ3MiOiBbCiAgICAgICAgICAgICAgICAgICAgInRhc2tzIiwKICAgICAgICAgICAgICAgICAgICAiZGVzdHJ1Y3Rpb24iCiAgICAgICAgICAgICAgICBdLAogICAgICAgICAgICAgICAgInBhcmFtZXRlcnMiOiBbCiAgICAgICAgICAgICAgICAgICAgewogICAgICAgICAgICAgICAgICAgICAgICAibmFtZSI6ICJpZCIsCiAgICAgICAgICAgICAgICAgICAgICAgICJkZXNjcmlwdGlvbiI6ICJUYXNrIGlkZW50aWZpZXIgdG8gZGVsZXRlIiwKICAgICAgICAgICAgICAgICAgICAgICAgInNjaGVtYSI6IHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICJmb3JtYXQiOiAiaW50NjQiLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgInR5cGUiOiAiaW50ZWdlciIKICAgICAgICAgICAgICAgICAgICAgICAgfSwKICAgICAgICAgICAgICAgICAgICAgICAgImluIjogInBhdGgiLAogICAgICAgICAgICAgICAgICAgICAgICAicmVxdWlyZWQiOiB0cnVlCiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgXSwKICAgICAgICAgICAgICAgICJyZXNwb25zZXMiOiB7CiAgICAgICAgICAgICAgICAgICAgIjIwNCI6IHsKICAgICAgICAgICAgICAgICAgICAgICAgImRlc2NyaXB0aW9uIjogIlRhc2sgZGVsZXRlZCIKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICAgICAgIm9wZXJhdGlvbklkIjogImRlbGV0ZVRhc2siLAogICAgICAgICAgICAgICAgInN1bW1hcnkiOiAiRGVsZXRlIHRhc2siLAogICAgICAgICAgICAgICAgImRlc2NyaXB0aW9uIjogIkRlbGV0ZXMgdGFzayBieSBnaXZlbiBpZGVudGlmaWVyIgogICAgICAgICAgICB9CiAgICAgICAgfQogICAgfSwKICAgICJjb21wb25lbnRzIjogewogICAgICAgICJzY2hlbWFzIjogewogICAgICAgICAgICAiVGFzayI6IHsKICAgICAgICAgICAgICAgICJ0eXBlIjogIm9iamVjdCIsCiAgICAgICAgICAgICAgICAicHJvcGVydGllcyI6IHsKICAgICAgICAgICAgICAgICAgICAiaWQiOiB7CiAgICAgICAgICAgICAgICAgICAgICAgICJmb3JtYXQiOiAiaW50NjQiLAogICAgICAgICAgICAgICAgICAgICAgICAidGl0bGUiOiAiVGFzayBJRCIsCiAgICAgICAgICAgICAgICAgICAgICAgICJkZXNjcmlwdGlvbiI6ICJVbmlxdWUgdGFzayBpZGVudGlmaWVyIiwKICAgICAgICAgICAgICAgICAgICAgICAgInR5cGUiOiAiaW50ZWdlciIKICAgICAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICAgICAgICAgICJ0YXNrIjogewogICAgICAgICAgICAgICAgICAgICAgICAidGl0bGUiOiAiVGhlIHRhc2siLAogICAgICAgICAgICAgICAgICAgICAgICAiZGVzY3JpcHRpb24iOiAiVGFzayBsaW5lIiwKICAgICAgICAgICAgICAgICAgICAgICAgInR5cGUiOiAic3RyaW5nIgogICAgICAgICAgICAgICAgICAgIH0sCiAgICAgICAgICAgICAgICAgICAgImNvbXBsZXRlZCI6IHsKICAgICAgICAgICAgICAgICAgICAgICAgInRpdGxlIjogIlRhc2sgY29tcGxldGl0aW9uIHN0YXR1cyIsCiAgICAgICAgICAgICAgICAgICAgICAgICJkZXNjcmlwdGlvbiI6ICIwIC0gb25nb2luZywgMSAtIGNvbXBsZXRlZCIsCiAgICAgICAgICAgICAgICAgICAgICAgICJtYXhpbXVtIjogMSwKICAgICAgICAgICAgICAgICAgICAgICAgIm1pbmltdW0iOiAwLAogICAgICAgICAgICAgICAgICAgICAgICAidHlwZSI6ICJpbnRlZ2VyIgogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgIH0sCiAgICAgICAgInJlc3BvbnNlcyI6IHsKICAgICAgICAgICAgIlRhc2tMaXN0IjogewogICAgICAgICAgICAgICAgImNvbnRlbnQiOiB7CiAgICAgICAgICAgICAgICAgICAgImFwcGxpY2F0aW9uL2pzb24iOiB7CiAgICAgICAgICAgICAgICAgICAgICAgICJzY2hlbWEiOiB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAidHlwZSI6ICJhcnJheSIsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAiaXRlbXMiOiB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIiRyZWYiOiAiIy9jb21wb25lbnRzL3NjaGVtYXMvVGFzayIKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0sCiAgICAgICAgICAgICAgICAiZGVzY3JpcHRpb24iOiAiQWxsIGlzIGdvb2QiCiAgICAgICAgICAgIH0KICAgICAgICB9LAogICAgICAgICJyZXF1ZXN0Qm9kaWVzIjogewogICAgICAgICAgICAiTmV3VGFzayI6IHsKICAgICAgICAgICAgICAgICJkZXNjcmlwdGlvbiI6ICJOZXcgdGFzayB0byBjcmVhdGUiLAogICAgICAgICAgICAgICAgImNvbnRlbnQiOiB7CiAgICAgICAgICAgICAgICAgICAgImFwcGxpY2F0aW9uL2pzb24iOiB7CiAgICAgICAgICAgICAgICAgICAgICAgICJzY2hlbWEiOiB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAiJHJlZiI6ICIjL2NvbXBvbmVudHMvc2NoZW1hcy9UYXNrIgogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfSwKICAgICAgICAgICAgICAgICJyZXF1aXJlZCI6IHRydWUKICAgICAgICAgICAgfQogICAgICAgIH0sCiAgICAgICAgInNlY3VyaXR5U2NoZW1lcyI6IHsKICAgICAgICAgICAgInVzZXJuYW1lX3Bhc3N3b3JkIjogewogICAgICAgICAgICAgICAgInNjaGVtZSI6ICJiYXNpYyIsCiAgICAgICAgICAgICAgICAidHlwZSI6ICJodHRwIgogICAgICAgICAgICB9CiAgICAgICAgfQogICAgfQp9", + "id": "i-LwPppMhz3EFFmQK5RG_z", + "metadata": { + "Content-Type": "application/vnd.oai.openapi+json" + }, + "name": "Todo App API", + "version": 1 + } + } +} diff --git a/app/test/integration-test/src/test/resources/io/syndesis/test/itest/apiprovider/todo-openapi-v3.json b/app/test/integration-test/src/test/resources/io/syndesis/test/itest/apiprovider/todo-openapi-v3.json new file mode 100644 index 00000000000..00f8bd3771a --- /dev/null +++ b/app/test/integration-test/src/test/resources/io/syndesis/test/itest/apiprovider/todo-openapi-v3.json @@ -0,0 +1,238 @@ +{ + "openapi": "3.0.2", + "info": { + "title": "Todo App API", + "version": "1.0.0", + "description": "Example Todo Application API", + "license": { + "name": "Apache 2.0", + "url": "http://www.apache.org/licenses/LICENSE-2.0.html" + } + }, + "servers": [ + { + "url": "http://hostname/api", + "variables": { + "scheme": { + "enum": [ + "http", + "https" + ], + "default": "http", + "description": "The supported protocol schemes." + } + } + } + ], + "paths": { + "/": { + "get": { + "operationId": "listTasks", + "tags": [ + "tasks", + "fetching" + ], + "responses": { + "200": { + "$ref": "#/components/responses/TaskList" + } + }, + "summary": "List all tasks", + "description": "Fetches all tasks from the database" + }, + "post": { + "operationId": "addTask", + "requestBody": { + "$ref": "#/components/requestBodies/NewTask" + }, + "tags": [ + "tasks", + "creating" + ], + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Task" + } + } + }, + "description": "All is good" + } + }, + "summary": "Create new task", + "description": "Stores new task in the database" + } + }, + "/{id}": { + "get": { + "operationId": "getTask", + "tags": [ + "tasks", + "fetching" + ], + "parameters": [ + { + "name": "id", + "description": "Task identifier", + "schema": { + "format": "int64", + "type": "integer" + }, + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Task" + } + } + }, + "description": "All is good" + }, + "404": { + "description": "No task with provided identifier found" + } + }, + "summary": "Fetch task", + "description": "Fetches task by given identifier" + }, + "put": { + "operationId": "updateTask", + "requestBody": { + "description": "Task with updates", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Task" + } + } + }, + "required": true + }, + "tags": [ + "tasks", + "updating" + ], + "parameters": [ + { + "name": "id", + "description": "Task identifier", + "schema": { + "format": "int64", + "type": "integer" + }, + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Task" + } + } + }, + "description": "All is good" + } + }, + "summary": "Update task", + "description": "Updates task by given identifier" + }, + "delete": { + "operationId": "deleteTask", + "tags": [ + "tasks", + "destruction" + ], + "parameters": [ + { + "name": "id", + "description": "Task identifier to delete", + "schema": { + "format": "int64", + "type": "integer" + }, + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "description": "Task deleted" + } + }, + "summary": "Delete task", + "description": "Deletes task by given identifier" + } + } + }, + "components": { + "schemas": { + "Task": { + "type": "object", + "properties": { + "id": { + "format": "int64", + "title": "Task ID", + "description": "Unique task identifier", + "type": "integer" + }, + "task": { + "title": "The task", + "description": "Task line", + "type": "string" + }, + "completed": { + "title": "Task completition status", + "description": "0 - ongoing, 1 - completed", + "maximum": 1, + "minimum": 0, + "type": "integer" + } + } + } + }, + "requestBodies": { + "NewTask": { + "description": "New task to create", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Task" + } + } + }, + "required": true + } + }, + "responses": { + "TaskList": { + "description": "All is good", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Task" + } + } + } + } + } + }, + "securitySchemes": { + "username_password": { + "type": "http", + "scheme": "basic" + } + } + } +} diff --git a/app/test/integration-test/src/test/resources/logback-test.xml b/app/test/integration-test/src/test/resources/logback-test.xml index 970a70d00a1..175b4c58e7a 100644 --- a/app/test/integration-test/src/test/resources/logback-test.xml +++ b/app/test/integration-test/src/test/resources/logback-test.xml @@ -63,7 +63,7 @@ - +