Search in sources :

Example 6 with ConnectorTemplate

use of io.syndesis.common.model.connection.ConnectorTemplate in project syndesis by syndesisio.

the class CustomConnectorITCase method createConnectorTemplates.

@Before
public void createConnectorTemplates() {
    dataManager.create(template);
    final ConnectorTemplate secondTemplate = createConnectorTemplate(SECOND_TEMPLATE_ID, "connector template");
    dataManager.create(secondTemplate);
    dataManager.create(connector1);
    dataManager.create(connector2);
    dataManager.create(connector3);
    dataManager.create(nonCustomConnector);
}
Also used : ConnectorTemplate(io.syndesis.common.model.connection.ConnectorTemplate) Before(org.junit.Before)

Example 7 with ConnectorTemplate

use of io.syndesis.common.model.connection.ConnectorTemplate in project syndesis by syndesisio.

the class AbstractSwaggerConnectorTest method fetchSwaggerConnectorTemplateFromDeployment.

private static ConnectorTemplate fetchSwaggerConnectorTemplateFromDeployment() {
    final Configuration configuration = // 
    Configuration.builder().jsonProvider(// 
    new JacksonJsonProvider(Json.copyObjectMapperConfiguration())).mappingProvider(// 
    new JacksonMappingProvider(Json.copyObjectMapperConfiguration())).build();
    final List<ConnectorTemplate> templates = JsonPath.using(configuration).parse(AbstractSwaggerConnectorTest.class.getResourceAsStream("/io/syndesis/server/dao/deployment.json")).read("$..[?(@['id'] == 'swagger-connector-template')]", new TypeRef<List<ConnectorTemplate>>() {
    });
    return templates.get(0);
}
Also used : JacksonMappingProvider(com.jayway.jsonpath.spi.mapper.JacksonMappingProvider) ConnectorTemplate(io.syndesis.common.model.connection.ConnectorTemplate) Configuration(com.jayway.jsonpath.Configuration) JacksonJsonProvider(com.jayway.jsonpath.spi.json.JacksonJsonProvider) List(java.util.List)

Aggregations

ConnectorTemplate (io.syndesis.common.model.connection.ConnectorTemplate)7 ConnectorGenerator (io.syndesis.server.connector.generator.ConnectorGenerator)4 ConnectorAction (io.syndesis.common.model.action.ConnectorAction)3 Connector (io.syndesis.common.model.connection.Connector)3 ConnectorSettings (io.syndesis.common.model.connection.ConnectorSettings)3 ConnectorSummary (io.syndesis.common.model.connection.ConnectorSummary)3 Action (io.syndesis.common.model.action.Action)2 ConfigurationProperty (io.syndesis.common.model.connection.ConfigurationProperty)2 ArrayList (java.util.ArrayList)2 List (java.util.List)2 Configuration (com.jayway.jsonpath.Configuration)1 JacksonJsonProvider (com.jayway.jsonpath.spi.json.JacksonJsonProvider)1 JacksonMappingProvider (com.jayway.jsonpath.spi.mapper.JacksonMappingProvider)1 HttpMethod (io.swagger.models.HttpMethod)1 Info (io.swagger.models.Info)1 Operation (io.swagger.models.Operation)1 Path (io.swagger.models.Path)1 Swagger (io.swagger.models.Swagger)1 AbstractSerializableParameter (io.swagger.models.parameters.AbstractSerializableParameter)1 BodyParameter (io.swagger.models.parameters.BodyParameter)1