@Test public void shouldCreateSecurityConfigurationFromConcurSwagger() throws IOException { final String specification = resource("/openapi/v2/concur.json"); final ConnectorSettings connectorSettings = new ConnectorSettings.Builder() .name("Concur List API") .description("Invokes Concur List API") .icon("fa-globe") .putConfiguredProperty("specification", specification) .putConfiguredProperty("authenticationType", "oauth2:concur_oauth2") .build(); final Connector generated = generator.generate(ApiConnectorTemplate.SWAGGER_TEMPLATE, connectorSettings); assertThat(generated.getProperties().keySet()).contains("accessToken", "authorizationEndpoint", "tokenEndpoint", "clientId", "clientSecret", "tokenStrategy", "authorizeUsingParameters"); assertThat(generated.getProperties().get("tokenStrategy").getDefaultValue()).isEqualTo("AUTHORIZATION_HEADER"); assertThat(generated.getProperties().get("authorizeUsingParameters").getDefaultValue()).isEqualTo("true"); }
@Override public final Connector generate(final ConnectorTemplate connectorTemplate, final ConnectorSettings connectorSettings) { final Connector connector = basicConnector(connectorTemplate, connectorSettings); return configureConnector(connectorTemplate, connector, connectorSettings); }
OpenApiConnectorGenerator extends ConnectorGenerator { @Override public final Connector generate(final ConnectorTemplate connectorTemplate, final ConnectorSettings connectorSettings) { final Connector connector = basicConnector(connectorTemplate, connectorSettings); return configureConnector(connectorTemplate, connector, connectorSettings); } }
OpenApiConnectorGenerator extends ConnectorGenerator { @Override public final Connector generate(final ConnectorTemplate connectorTemplate, final ConnectorSettings connectorSettings) { final Connector connector = basicConnector(connectorTemplate, connectorSettings); return configureConnector(connectorTemplate, connector, connectorSettings); } OpenApiConnectorGenerator(final Connector baseConnector, final Supplier<String> operationIdGenerator);  OpenApiConnectorGenerator(final Connector baseConnector); }
OpenApiConnectorGenerator extends ConnectorGenerator { @Override public final Connector generate(final ConnectorTemplate connectorTemplate, final ConnectorSettings connectorSettings) { final Connector connector = basicConnector(connectorTemplate, connectorSettings); return configureConnector(connectorTemplate, connector, connectorSettings); } OpenApiConnectorGenerator(final Connector baseConnector, final Supplier<String> operationIdGenerator);  OpenApiConnectorGenerator(final Connector baseConnector); @Override final Connector generate(final ConnectorTemplate connectorTemplate, final ConnectorSettings connectorSettings); @Override final APISummary info(final ConnectorTemplate connectorTemplate, final ConnectorSettings connectorSettings); }
OpenApiConnectorGenerator extends ConnectorGenerator { @Override public final Connector generate(final ConnectorTemplate connectorTemplate, final ConnectorSettings connectorSettings) { final Connector connector = basicConnector(connectorTemplate, connectorSettings); return configureConnector(connectorTemplate, connector, connectorSettings); } OpenApiConnectorGenerator(final Connector baseConnector, final Supplier<String> operationIdGenerator);  OpenApiConnectorGenerator(final Connector baseConnector); @Override final Connector generate(final ConnectorTemplate connectorTemplate, final ConnectorSettings connectorSettings); @Override final APISummary info(final ConnectorTemplate connectorTemplate, final ConnectorSettings connectorSettings); static final String SPECIFICATION; }