From a01f9a6e470cad3609df543fc673cae298593095 Mon Sep 17 00:00:00 2001 From: Christoph Deppisch Date: Thu, 19 May 2022 19:32:09 +0200 Subject: [PATCH] Update to v3.3.0-SNAPSHOT --- demo/sample-bakery/pom.xml | 29 ++++------ .../samples/bakery/routes/BakeryRouter.java | 9 ++- demo/sample-bookstore/pom.xml | 41 ++++---------- .../samples/bookstore/AddBook_Ok_2_IT.java | 2 +- .../bookstore/CitrusEndpointConfig.java | 23 ++++---- demo/sample-flightbooking/pom.xml | 49 ++++++---------- demo/sample-greeting/pom.xml | 49 +++++----------- demo/sample-incident/pom.xml | 35 +++++------- demo/sample-javaee/pom.xml | 15 +---- pom.xml | 22 -------- sample-annotation-config/pom.xml | 17 +----- sample-behaviors/pom.xml | 17 +----- sample-binary/pom.xml | 17 +----- sample-camel-context/pom.xml | 24 +++----- sample-dictionaries/pom.xml | 17 +----- sample-docker/pom.xml | 15 +---- sample-dynamic-endpoints/pom.xml | 19 ++----- sample-gradle/build.gradle | 10 ++-- sample-hamcrest/pom.xml | 17 +----- sample-javaconfig/pom.xml | 17 +----- sample-jms/pom.xml | 19 ++----- sample-kafka/pom.xml | 17 +----- .../citrus/samples/todolist/TodoListIT.java | 40 ++++++++----- sample-kubernetes/pom.xml | 15 +---- sample-mail/pom.xml | 17 +----- sample-message-store/pom.xml | 17 +----- sample-reporting/pom.xml | 18 ++---- sample-rmi/pom.xml | 15 +---- sample-selenium/pom.xml | 17 +----- .../sample-cucumber-spring/pom.xml | 56 ++----------------- .../src/test/java/todo/EndpointConfig.java | 3 + samples-cucumber/sample-cucumber/pom.xml | 56 ++----------------- .../src/test/java/todo/EndpointConfig.java | 3 + .../sample-jdbc-callable-statements/pom.xml | 17 +----- samples-db/sample-jdbc-transactions/pom.xml | 17 +----- samples-db/sample-jdbc/pom.xml | 17 +----- samples-db/sample-sql/pom.xml | 17 +----- samples-ftp/sample-ftp/pom.xml | 15 +---- samples-ftp/sample-scp/pom.xml | 15 +---- samples-ftp/sample-sftp/pom.xml | 15 +---- samples-http/sample-http-basic-auth/pom.xml | 15 +---- samples-http/sample-http-form-data/pom.xml | 15 +---- samples-http/sample-http-loadtest/pom.xml | 17 +----- samples-http/sample-http-query-param/pom.xml | 15 +---- .../sample-http-static-response/pom.xml | 15 +---- samples-http/sample-http/pom.xml | 17 +----- samples-http/sample-https/pom.xml | 15 +---- samples-http/sample-swagger/pom.xml | 17 +----- samples-json/sample-databind/pom.xml | 17 +----- samples-json/sample-json/pom.xml | 17 +----- samples-junit/sample-junit/pom.xml | 17 +----- samples-junit/sample-junit5/pom.xml | 17 +----- samples-remote/sample-test-jar/pom.xml | 17 +----- samples-remote/sample-test-war/pom.xml | 19 ++----- samples-soap/sample-soap-attachment/pom.xml | 17 +----- samples-soap/sample-soap-mtom/pom.xml | 15 +---- samples-soap/sample-soap-ssl/pom.xml | 15 +---- .../sample-soap-static-response/pom.xml | 15 +---- samples-soap/sample-soap-wsaddressing/pom.xml | 15 +---- samples-soap/sample-soap-wssecurity/pom.xml | 20 ++----- samples-soap/sample-soap/pom.xml | 17 +----- samples-soap/sample-wsdl/pom.xml | 17 +----- samples-testng/sample-dataprovider/pom.xml | 17 +----- samples-testng/sample-testng/pom.xml | 17 +----- samples-xml/sample-oxm/README.md | 53 ++++++++++++------ samples-xml/sample-oxm/pom.xml | 17 +----- .../samples/todolist/EndpointConfig.java | 8 +-- .../citrus/samples/todolist/TodoListIT.java | 2 +- samples-xml/sample-xhtml/pom.xml | 17 +----- samples-xml/sample-xml/pom.xml | 17 +----- todo-app/pom.xml | 33 +++++------ .../samples/todolist/TodoApplication.java | 32 +++-------- .../todolist/web/JmsReportController.java | 16 ++++-- .../todolist/web/KafkaReportController.java | 16 ++++-- .../todolist/web/ReportingController.java | 12 ++-- .../samples/todolist/web/TodoController.java | 48 +++++++++------- .../todolist/web/TodoListController.java | 30 +++++----- .../src/main/resources/application.properties | 7 ++- todo-app/src/main/resources/static/index.html | 7 +-- .../src/main/resources/templates/todo.html | 7 +-- 80 files changed, 427 insertions(+), 1140 deletions(-) diff --git a/demo/sample-bakery/pom.xml b/demo/sample-bakery/pom.xml index 1a9ee474..663162ff 100644 --- a/demo/sample-bakery/pom.xml +++ b/demo/sample-bakery/pom.xml @@ -18,14 +18,16 @@ UTF-8 UTF-8 - 5.3.16 - 3.14.0 - 5.16.3 + 5.3.19 + 3.16.0 + 5.17.0 + 1.3.1 1.7.36 2.17.2 - 3.2.1 - 9.4.44.v20210927 - 2.12.6 + 3.3.0-SNAPSHOT + 9.4.46.v20220331 + 2.13.2.2 + 2.13.2 1.6.7 4.0.4 2.3.3 @@ -255,7 +257,7 @@ com.fasterxml.jackson.core jackson-databind - ${jackson.version} + ${jackson.databind.version} @@ -267,7 +269,7 @@ org.jolokia jolokia-core - 1.3.1 + ${jolokia.version} @@ -430,17 +432,6 @@ - - - consol-labs-snapshots - http://labs.consol.de/maven/snapshots-repository/ - - true - interval:10080 - - - - bakery-embedded diff --git a/demo/sample-bakery/web/src/main/java/com/consol/citrus/samples/bakery/routes/BakeryRouter.java b/demo/sample-bakery/web/src/main/java/com/consol/citrus/samples/bakery/routes/BakeryRouter.java index 6cb540f5..279b67da 100644 --- a/demo/sample-bakery/web/src/main/java/com/consol/citrus/samples/bakery/routes/BakeryRouter.java +++ b/demo/sample-bakery/web/src/main/java/com/consol/citrus/samples/bakery/routes/BakeryRouter.java @@ -43,12 +43,19 @@ public void configure() throws Exception { rest("/order") .consumes("application/json") - .post().route().unmarshal().json(JsonLibrary.Jackson).process(this).to("direct:bakery"); + .post() + .to("direct:bakery-http"); from("jms:queue:bakery.order.inbound") .routeId("bakery_jms_inbound") .to("direct:bakery"); + from("direct:bakery-http") + .unmarshal() + .json(JsonLibrary.Jackson) + .process(this) + .to("direct:bakery"); + from("direct:bakery") .routeId("bakery") .choice() diff --git a/demo/sample-bookstore/pom.xml b/demo/sample-bookstore/pom.xml index a4860fdf..baeb0858 100644 --- a/demo/sample-bookstore/pom.xml +++ b/demo/sample-bookstore/pom.xml @@ -11,19 +11,20 @@ UTF-8 UTF-8 - 5.3.16 - 3.1.2 + 5.3.19 + 3.1.3 2.4.8.RELEASE - 5.5.9 - 5.16.3 + 5.5.11 + 5.17.0 1.7.36 2.17.2 - 3.2.1 - 9.4.44.v20210927 + 3.3.0-SNAPSHOT + 9.4.46.v20220331 1.5.3 - 2.3.5 + 2.3.6 2.3.3 1.4.2 + 2.12.2 18001 18100 embedded @@ -149,7 +150,7 @@ xerces xercesImpl - 2.12.1 + ${xerces.version} @@ -227,7 +228,7 @@ xerces xercesImpl - 2.12.1 + ${xerces.version} @@ -261,17 +262,6 @@ jakarta.xml.bind-api ${jakarta.xml.bind-api.version} - - org.glassfish.jaxb - jaxb-core - 2.3.0 - - - javax.xml.bind - jaxb-api - - - org.glassfish.jaxb jaxb-runtime @@ -341,17 +331,6 @@ - - - consol-labs-snapshots - http://labs.consol.de/maven/snapshots-repository/ - - true - interval:10080 - - - - bookstore-embedded diff --git a/demo/sample-bookstore/src/test/java/com/consol/citrus/samples/bookstore/AddBook_Ok_2_IT.java b/demo/sample-bookstore/src/test/java/com/consol/citrus/samples/bookstore/AddBook_Ok_2_IT.java index ea63ae52..9485bc32 100644 --- a/demo/sample-bookstore/src/test/java/com/consol/citrus/samples/bookstore/AddBook_Ok_2_IT.java +++ b/demo/sample-bookstore/src/test/java/com/consol/citrus/samples/bookstore/AddBook_Ok_2_IT.java @@ -27,9 +27,9 @@ import com.consol.citrus.testng.spring.TestNGCitrusSpringSupport; import com.consol.citrus.validation.xml.XmlMarshallingValidationProcessor; import com.consol.citrus.ws.client.WebServiceClient; +import com.consol.citrus.xml.Marshaller; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; -import org.springframework.oxm.Marshaller; import org.springframework.util.Assert; import org.testng.annotations.Test; diff --git a/demo/sample-bookstore/src/test/java/com/consol/citrus/samples/bookstore/CitrusEndpointConfig.java b/demo/sample-bookstore/src/test/java/com/consol/citrus/samples/bookstore/CitrusEndpointConfig.java index 1983484c..b833f950 100644 --- a/demo/sample-bookstore/src/test/java/com/consol/citrus/samples/bookstore/CitrusEndpointConfig.java +++ b/demo/sample-bookstore/src/test/java/com/consol/citrus/samples/bookstore/CitrusEndpointConfig.java @@ -16,26 +16,31 @@ package com.consol.citrus.samples.bookstore; +import java.util.Collections; +import java.util.List; + import com.consol.citrus.dsl.endpoint.CitrusEndpoints; import com.consol.citrus.report.MessageTracingTestListener; import com.consol.citrus.variable.GlobalVariables; import com.consol.citrus.ws.client.WebServiceClient; import com.consol.citrus.ws.interceptor.LoggingClientInterceptor; -import com.consol.citrus.ws.validation.*; +import com.consol.citrus.ws.validation.SimpleSoapAttachmentValidator; +import com.consol.citrus.ws.validation.SimpleSoapFaultValidator; +import com.consol.citrus.ws.validation.SoapAttachmentValidator; +import com.consol.citrus.ws.validation.SoapFaultValidator; +import com.consol.citrus.xml.Jaxb2Marshaller; +import com.consol.citrus.xml.Marshaller; import com.consol.citrus.xml.XsdSchemaRepository; import com.consol.citrus.xml.namespace.NamespaceContextBuilder; -import org.springframework.context.annotation.*; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.PropertySource; import org.springframework.core.io.ClassPathResource; -import org.springframework.oxm.Marshaller; -import org.springframework.oxm.jaxb.Jaxb2Marshaller; import org.springframework.ws.client.support.interceptor.ClientInterceptor; import org.springframework.ws.soap.SoapMessageFactory; import org.springframework.ws.soap.saaj.SaajSoapMessageFactory; import org.springframework.xml.xsd.SimpleXsdSchema; -import java.util.Collections; -import java.util.List; - /** * @author Christoph Deppisch */ @@ -105,8 +110,6 @@ public WebServiceClient bookStoreClient() { @Bean public Marshaller jax2bMarshaller() { - Jaxb2Marshaller jaxb2Marshaller = new Jaxb2Marshaller(); - jaxb2Marshaller.setContextPath("com.consol.citrus.samples.bookstore.model"); - return jaxb2Marshaller; + return new Jaxb2Marshaller("com.consol.citrus.samples.bookstore.model"); } } diff --git a/demo/sample-flightbooking/pom.xml b/demo/sample-flightbooking/pom.xml index 3e6f42df..1fe163d0 100644 --- a/demo/sample-flightbooking/pom.xml +++ b/demo/sample-flightbooking/pom.xml @@ -11,20 +11,22 @@ UTF-8 UTF-8 - 5.3.16 - 3.1.2 + 5.3.19 + 3.1.3 2.4.8.RELEASE - 5.5.9 - 5.16.3 + 5.5.11 + 5.17.0 1.7.36 2.17.2 - 3.2.1 - 9.4.44.v20210927 - 2.12.6 + 3.3.0-SNAPSHOT + 9.4.46.v20220331 + 2.13.2.2 + 2.13.2 1.5.3 - 2.3.5 + 2.3.6 2.3.3 1.4.2 + 2.12.2 18001 18100 embedded @@ -165,7 +167,7 @@ xerces xercesImpl - 2.12.1 + ${xerces.version} @@ -281,9 +283,14 @@ com.fasterxml.jackson.core - jackson-databind + jackson-core ${jackson.version} + + com.fasterxml.jackson.core + jackson-databind + ${jackson.databind.version} + @@ -316,17 +323,6 @@ jakarta.xml.bind-api ${jakarta.xml.bind-api.version} - - org.glassfish.jaxb - jaxb-core - 2.3.0 - - - javax.xml.bind - jaxb-api - - - org.glassfish.jaxb jaxb-runtime @@ -396,17 +392,6 @@ - - - consol-labs-snapshots - http://labs.consol.de/maven/snapshots-repository/ - - true - interval:10080 - - - - flightbooking-embedded diff --git a/demo/sample-greeting/pom.xml b/demo/sample-greeting/pom.xml index c4bf3f14..f479f5ab 100644 --- a/demo/sample-greeting/pom.xml +++ b/demo/sample-greeting/pom.xml @@ -11,18 +11,21 @@ UTF-8 UTF-8 - 5.3.16 - 3.1.2 + 5.3.19 + 3.1.3 2.4.8.RELEASE - 5.5.9 - 5.16.3 + 5.5.11 + 5.17.0 + 4.5 1.7.36 2.17.2 - 3.2.1 - 9.4.44.v20210927 - 2.12.6 - 2.3.5 + 3.3.0-SNAPSHOT + 9.4.46.v20220331 + 2.13.2.2 + 2.13.2 + 2.3.6 2.3.3 + 2.12.2 18001 18100 embedded @@ -163,7 +166,7 @@ xerces xercesImpl - 2.12.1 + ${xerces.version} @@ -241,7 +244,7 @@ xerces xercesImpl - 2.12.1 + ${xerces.version} @@ -258,13 +261,13 @@ org.apache.xbean xbean-spring - 4.5 + ${xbean.spring.version} com.fasterxml.jackson.core jackson-databind - ${jackson.version} + ${jackson.databind.version} @@ -298,17 +301,6 @@ jakarta.xml.bind-api ${jakarta.xml.bind-api.version} - - org.glassfish.jaxb - jaxb-core - 2.3.0 - - - javax.xml.bind - jaxb-api - - - org.glassfish.jaxb jaxb-runtime @@ -367,17 +359,6 @@ - - - consol-labs-snapshots - http://labs.consol.de/maven/snapshots-repository/ - - true - interval:10080 - - - - greeting-embedded diff --git a/demo/sample-incident/pom.xml b/demo/sample-incident/pom.xml index ab39e831..806f6bbe 100644 --- a/demo/sample-incident/pom.xml +++ b/demo/sample-incident/pom.xml @@ -11,18 +11,20 @@ UTF-8 UTF-8 - 5.3.16 - 3.1.2 + 5.3.19 + 3.1.3 2.4.8.RELEASE - 5.5.9 - 5.16.3 - 3.5.1 + 5.5.11 + 5.17.0 + 3.5.2 1.7.36 2.17.2 - 3.2.1 - 9.4.44.v20210927 - 2.12.6 + 3.3.0-SNAPSHOT + 9.4.46.v20220331 + 2.13.2.2 + 2.13.2 2.3.3 + 2.12.2 18001 18100 embedded @@ -164,7 +166,7 @@ xerces xercesImpl - 2.12.1 + ${xerces.version} @@ -177,7 +179,7 @@ xerces xercesImpl - 2.12.1 + ${xerces.version} @@ -283,7 +285,7 @@ com.fasterxml.jackson.core jackson-databind - ${jackson.version} + ${jackson.databind.version} @@ -405,17 +407,6 @@ - - - consol-labs-snapshots - http://labs.consol.de/maven/snapshots-repository/ - - true - interval:10080 - - - - incident-embedded diff --git a/demo/sample-javaee/pom.xml b/demo/sample-javaee/pom.xml index 7966f61b..a8a8e780 100644 --- a/demo/sample-javaee/pom.xml +++ b/demo/sample-javaee/pom.xml @@ -14,8 +14,8 @@ 3.4.2 1.7.36 2.17.2 - 7.3.0 - 3.2.1 + 7.5 + 3.3.0-SNAPSHOT 8.0.0 4.13.2 1.6.0.Final @@ -256,17 +256,6 @@ - - - consol-labs-snapshots - http://labs.consol.de/maven/snapshots-repository/ - - true - interval:10080 - - - - wildfly-managed-arquillian diff --git a/pom.xml b/pom.xml index 375f6dc8..49b68089 100644 --- a/pom.xml +++ b/pom.xml @@ -39,26 +39,4 @@ samples-db samples-remote - - - - consol-labs-snapshots - http://labs.consol.de/maven/snapshots-repository/ - - true - interval:10080 - - - - - - - consol-labs-snapshots - http://labs.consol.de/maven/snapshots-repository/ - - true - interval:10080 - - - diff --git a/sample-annotation-config/pom.xml b/sample-annotation-config/pom.xml index c9529c7f..5258aa70 100644 --- a/sample-annotation-config/pom.xml +++ b/sample-annotation-config/pom.xml @@ -10,11 +10,11 @@ UTF-8 UTF-8 - 5.3.16 - 2.5.10 + 5.3.19 + 2.6.7 1.7.36 2.17.2 - 3.2.1 + 3.3.0-SNAPSHOT embedded @@ -157,15 +157,4 @@ test - - - - consol-labs-snapshots - http://labs.consol.de/maven/snapshots-repository/ - - true - interval:10080 - - - diff --git a/sample-behaviors/pom.xml b/sample-behaviors/pom.xml index 146ca5c2..80c2297b 100644 --- a/sample-behaviors/pom.xml +++ b/sample-behaviors/pom.xml @@ -10,11 +10,11 @@ UTF-8 UTF-8 - 5.3.16 - 2.5.10 + 5.3.19 + 2.6.7 1.7.36 2.17.2 - 3.2.1 + 3.3.0-SNAPSHOT embedded @@ -157,15 +157,4 @@ test - - - - consol-labs-snapshots - http://labs.consol.de/maven/snapshots-repository/ - - true - interval:10080 - - - diff --git a/sample-binary/pom.xml b/sample-binary/pom.xml index 988c838c..2c6b7a51 100644 --- a/sample-binary/pom.xml +++ b/sample-binary/pom.xml @@ -10,11 +10,11 @@ UTF-8 UTF-8 - 5.3.16 + 5.3.19 1.7.36 2.17.2 - 3.2.1 - 5.16.3 + 3.3.0-SNAPSHOT + 5.17.0 embedded @@ -166,17 +166,6 @@ - - - consol-labs-snapshots - http://labs.consol.de/maven/snapshots-repository/ - - true - interval:10080 - - - - activemq-embedded diff --git a/sample-camel-context/pom.xml b/sample-camel-context/pom.xml index 68b297d1..b0274cff 100644 --- a/sample-camel-context/pom.xml +++ b/sample-camel-context/pom.xml @@ -10,14 +10,15 @@ UTF-8 UTF-8 - 5.3.16 - 3.1.2 + 5.3.19 + 3.1.3 2.4.8.RELEASE - 3.14.0 - 5.16.3 + 3.16.0 + 5.17.0 1.7.36 2.17.2 - 3.2.1 + 3.3.0-SNAPSHOT + 4.5 embedded @@ -149,7 +150,7 @@ org.apache.xbean xbean-spring - 4.5 + ${xbean.spring.version} @@ -259,17 +260,6 @@ - - - consol-labs-snapshots - http://labs.consol.de/maven/snapshots-repository/ - - true - interval:10080 - - - - activemq-embedded diff --git a/sample-dictionaries/pom.xml b/sample-dictionaries/pom.xml index 93292b74..d76290dc 100644 --- a/sample-dictionaries/pom.xml +++ b/sample-dictionaries/pom.xml @@ -10,11 +10,11 @@ UTF-8 UTF-8 - 5.3.16 - 2.5.10 + 5.3.19 + 2.6.7 1.7.36 2.17.2 - 3.2.1 + 3.3.0-SNAPSHOT embedded @@ -163,15 +163,4 @@ test - - - - consol-labs-snapshots - http://labs.consol.de/maven/snapshots-repository/ - - true - interval:10080 - - - diff --git a/sample-docker/pom.xml b/sample-docker/pom.xml index 27c455e0..9c57e0c3 100644 --- a/sample-docker/pom.xml +++ b/sample-docker/pom.xml @@ -10,10 +10,10 @@ UTF-8 UTF-8 - 5.3.16 + 5.3.19 1.7.36 2.17.2 - 3.2.1 + 3.3.0-SNAPSHOT embedded @@ -220,17 +220,6 @@ - - - consol-labs-snapshots - http://labs.consol.de/maven/snapshots-repository/ - - true - interval:10080 - - - - todo-app-container diff --git a/sample-dynamic-endpoints/pom.xml b/sample-dynamic-endpoints/pom.xml index 72e31e75..928c4bb7 100644 --- a/sample-dynamic-endpoints/pom.xml +++ b/sample-dynamic-endpoints/pom.xml @@ -10,12 +10,12 @@ UTF-8 UTF-8 - 5.3.16 - 2.5.10 + 5.3.19 + 2.6.7 1.7.36 2.17.2 - 3.2.1 - 5.16.3 + 3.3.0-SNAPSHOT + 5.17.0 embedded @@ -191,15 +191,4 @@ test - - - - consol-labs-snapshots - http://labs.consol.de/maven/snapshots-repository/ - - true - interval:10080 - - - diff --git a/sample-gradle/build.gradle b/sample-gradle/build.gradle index 8b9f5185..aa7c84a2 100644 --- a/sample-gradle/build.gradle +++ b/sample-gradle/build.gradle @@ -13,11 +13,11 @@ repositories { } dependencies { - testCompile group: 'com.consol.citrus', name: 'citrus-base', version: '3.2.1' - testCompile group: 'com.consol.citrus', name: 'citrus-spring', version: '3.2.1' - testCompile group: 'com.consol.citrus', name: 'citrus-endpoint-catalog', version: '3.2.1' - testCompile group: 'com.consol.citrus', name: 'citrus-testng', version: '3.2.1' - testCompile group: 'org.springframework', name: 'spring-test', version: '5.3.16' + testCompile group: 'com.consol.citrus', name: 'citrus-base', version: '3.3.0-SNAPSHOT' + testCompile group: 'com.consol.citrus', name: 'citrus-spring', version: '3.3.0-SNAPSHOT' + testCompile group: 'com.consol.citrus', name: 'citrus-endpoint-catalog', version: '3.3.0-SNAPSHOT' + testCompile group: 'com.consol.citrus', name: 'citrus-testng', version: '3.3.0-SNAPSHOT' + testCompile group: 'org.springframework', name: 'spring-test', version: '5.3.19' testCompile group: 'org.slf4j', name: 'slf4j-api', version: '1.7.36' testCompile group: 'org.slf4j', name: 'jcl-over-slf4j', version: '1.7.36' testCompile group: 'org.apache.logging.log4j', name: 'log4j-slf4j-impl', version: '2.17.2' diff --git a/sample-hamcrest/pom.xml b/sample-hamcrest/pom.xml index 0d6c6746..142839f5 100644 --- a/sample-hamcrest/pom.xml +++ b/sample-hamcrest/pom.xml @@ -10,11 +10,11 @@ UTF-8 UTF-8 - 5.3.16 - 2.5.10 + 5.3.19 + 2.6.7 1.7.36 2.17.2 - 3.2.1 + 3.3.0-SNAPSHOT embedded @@ -169,15 +169,4 @@ test - - - - consol-labs-snapshots - http://labs.consol.de/maven/snapshots-repository/ - - true - interval:10080 - - - diff --git a/sample-javaconfig/pom.xml b/sample-javaconfig/pom.xml index 53f9c23d..a450d727 100644 --- a/sample-javaconfig/pom.xml +++ b/sample-javaconfig/pom.xml @@ -10,11 +10,11 @@ UTF-8 UTF-8 - 5.3.16 - 2.5.10 + 5.3.19 + 2.6.7 1.7.36 2.17.2 - 3.2.1 + 3.3.0-SNAPSHOT embedded @@ -157,15 +157,4 @@ test - - - - consol-labs-snapshots - http://labs.consol.de/maven/snapshots-repository/ - - true - interval:10080 - - - diff --git a/sample-jms/pom.xml b/sample-jms/pom.xml index a977997f..4b0abea1 100644 --- a/sample-jms/pom.xml +++ b/sample-jms/pom.xml @@ -10,12 +10,12 @@ UTF-8 UTF-8 - 5.3.16 - 2.5.10 + 5.3.19 + 2.6.7 1.7.36 2.17.2 - 3.2.1 - 5.16.3 + 3.3.0-SNAPSHOT + 5.17.0 embedded @@ -198,15 +198,4 @@ test - - - - consol-labs-snapshots - http://labs.consol.de/maven/snapshots-repository/ - - true - interval:10080 - - - diff --git a/sample-kafka/pom.xml b/sample-kafka/pom.xml index b279b8dc..8fdb6394 100644 --- a/sample-kafka/pom.xml +++ b/sample-kafka/pom.xml @@ -10,11 +10,11 @@ UTF-8 UTF-8 - 5.3.16 - 2.5.10 + 5.3.19 + 2.6.7 1.7.36 2.17.2 - 3.2.1 + 3.3.0-SNAPSHOT embedded @@ -171,15 +171,4 @@ test - - - - consol-labs-snapshots - http://labs.consol.de/maven/snapshots-repository/ - - true - interval:10080 - - - diff --git a/sample-kafka/src/test/java/com/consol/citrus/samples/todolist/TodoListIT.java b/sample-kafka/src/test/java/com/consol/citrus/samples/todolist/TodoListIT.java index 62f5efed..ed9e7faf 100644 --- a/sample-kafka/src/test/java/com/consol/citrus/samples/todolist/TodoListIT.java +++ b/sample-kafka/src/test/java/com/consol/citrus/samples/todolist/TodoListIT.java @@ -16,6 +16,7 @@ package com.consol.citrus.samples.todolist; +import com.consol.citrus.TestActionBuilder; import com.consol.citrus.annotations.CitrusTest; import com.consol.citrus.http.client.HttpClient; import com.consol.citrus.kafka.endpoint.KafkaEndpoint; @@ -32,6 +33,7 @@ import static com.consol.citrus.actions.EchoAction.Builder.echo; import static com.consol.citrus.actions.ReceiveMessageAction.Builder.receive; import static com.consol.citrus.actions.SendMessageAction.Builder.send; +import static com.consol.citrus.container.RepeatOnErrorUntilTrue.Builder.repeatOnError; import static com.consol.citrus.dsl.XpathSupport.xpath; import static com.consol.citrus.http.actions.HttpActionBuilder.http; @@ -63,21 +65,31 @@ public void testAddTodoEntry() { .header(KafkaMessageHeaders.MESSAGE_KEY, "${todoName}") .body("{ \"title\": \"${todoName}\", \"description\": \"${todoDescription}\" }")); - $(http() - .client(todoClient) - .send() - .get("/todolist") - .message() - .accept(MediaType.TEXT_HTML_VALUE)); + $(repeatOnError().until((i, context) -> i > 5) + .actions( + getTodoEntries(), + verifyTodoEntry() + )); + } - $(http() - .client(todoClient) - .receive() - .response(HttpStatus.OK) - .message() - .type(MessageType.XHTML) - .validate(xpath() - .expression("(//xh:li[@class='list-group-item']/xh:span)[last()]", "${todoName}"))); + private TestActionBuilder getTodoEntries() { + return http() + .client(todoClient) + .send() + .get("/todolist") + .message() + .accept(MediaType.TEXT_HTML_VALUE); + } + + private TestActionBuilder verifyTodoEntry() { + return http() + .client(todoClient) + .receive() + .response(HttpStatus.OK) + .message() + .type(MessageType.XHTML) + .validate(xpath() + .expression("(//xh:li[@class='list-group-item']/xh:span)[last()]", "${todoName}")); } @Test diff --git a/sample-kubernetes/pom.xml b/sample-kubernetes/pom.xml index d033b185..ea2547e3 100644 --- a/sample-kubernetes/pom.xml +++ b/sample-kubernetes/pom.xml @@ -10,10 +10,10 @@ UTF-8 UTF-8 - 5.3.16 + 5.3.19 1.7.36 2.17.2 - 3.2.1 + 3.3.0-SNAPSHOT @@ -177,17 +177,6 @@ - - - consol-labs-snapshots - http://labs.consol.de/maven/snapshots-repository/ - - true - interval:10080 - - - - todo-app-pod diff --git a/sample-mail/pom.xml b/sample-mail/pom.xml index eee5517b..5b73f9d9 100644 --- a/sample-mail/pom.xml +++ b/sample-mail/pom.xml @@ -10,11 +10,11 @@ UTF-8 UTF-8 - 5.3.16 - 2.5.10 + 5.3.19 + 2.6.7 1.7.36 2.17.2 - 3.2.1 + 3.3.0-SNAPSHOT embedded @@ -175,15 +175,4 @@ test - - - - consol-labs-snapshots - http://labs.consol.de/maven/snapshots-repository/ - - true - interval:10080 - - - diff --git a/sample-message-store/pom.xml b/sample-message-store/pom.xml index 8f3595d7..187fe139 100644 --- a/sample-message-store/pom.xml +++ b/sample-message-store/pom.xml @@ -10,11 +10,11 @@ UTF-8 UTF-8 - 5.3.16 - 2.5.10 + 5.3.19 + 2.6.7 1.7.36 2.17.2 - 3.2.1 + 3.3.0-SNAPSHOT embedded @@ -163,15 +163,4 @@ test - - - - consol-labs-snapshots - http://labs.consol.de/maven/snapshots-repository/ - - true - interval:10080 - - - diff --git a/sample-reporting/pom.xml b/sample-reporting/pom.xml index c466e712..0d65a5fd 100644 --- a/sample-reporting/pom.xml +++ b/sample-reporting/pom.xml @@ -10,10 +10,11 @@ UTF-8 UTF-8 - 5.3.16 + 5.3.19 1.7.36 2.17.2 - 3.2.1 + 3.3.0-SNAPSHOT + 3.0.6 @@ -138,19 +139,8 @@ com.aventstack extentreports - 3.0.6 + ${extentreports.version} test - - - - consol-labs-snapshots - http://labs.consol.de/maven/snapshots-repository/ - - true - interval:10080 - - - diff --git a/sample-rmi/pom.xml b/sample-rmi/pom.xml index ab2c1078..86cb09c6 100644 --- a/sample-rmi/pom.xml +++ b/sample-rmi/pom.xml @@ -10,10 +10,10 @@ UTF-8 UTF-8 - 5.3.16 + 5.3.19 1.7.36 2.17.2 - 3.2.1 + 3.3.0-SNAPSHOT @@ -139,15 +139,4 @@ test - - - - consol-labs-snapshots - http://labs.consol.de/maven/snapshots-repository/ - - true - interval:10080 - - - diff --git a/sample-selenium/pom.xml b/sample-selenium/pom.xml index ca2b10c1..89b494dd 100644 --- a/sample-selenium/pom.xml +++ b/sample-selenium/pom.xml @@ -10,11 +10,11 @@ UTF-8 UTF-8 - 5.3.16 - 2.5.10 + 5.3.19 + 2.6.7 1.7.36 2.17.2 - 3.2.1 + 3.3.0-SNAPSHOT embedded @@ -163,15 +163,4 @@ test - - - - consol-labs-snapshots - http://labs.consol.de/maven/snapshots-repository/ - - true - interval:10080 - - - diff --git a/samples-cucumber/sample-cucumber-spring/pom.xml b/samples-cucumber/sample-cucumber-spring/pom.xml index d191c5d9..3d1f8b34 100644 --- a/samples-cucumber/sample-cucumber-spring/pom.xml +++ b/samples-cucumber/sample-cucumber-spring/pom.xml @@ -10,12 +10,12 @@ UTF-8 UTF-8 - 5.3.16 - 2.5.10 + 5.3.19 + 2.6.7 1.7.36 2.17.2 - 6.11.0 - 3.2.1 + 7.3.1 + 3.3.0-SNAPSHOT embedded @@ -173,52 +173,4 @@ test - - - - consol-labs-snapshots - http://labs.consol.de/maven/snapshots-repository/ - - true - interval:10080 - - - - - - - todo-app-embedded - - - system.under.test.mode - embedded - - - - - - org.springframework.boot - spring-boot-maven-plugin - - true - - - - pre-integration-test - - start - - - - post-integration-test - - stop - - - - - - - - diff --git a/samples-cucumber/sample-cucumber-spring/src/test/java/todo/EndpointConfig.java b/samples-cucumber/sample-cucumber-spring/src/test/java/todo/EndpointConfig.java index 7c3a15a7..330aa9aa 100644 --- a/samples-cucumber/sample-cucumber-spring/src/test/java/todo/EndpointConfig.java +++ b/samples-cucumber/sample-cucumber-spring/src/test/java/todo/EndpointConfig.java @@ -18,14 +18,17 @@ import com.consol.citrus.http.client.HttpClient; import com.consol.citrus.http.client.HttpClientBuilder; +import com.consol.citrus.samples.todolist.TodoAppAutoConfiguration; import com.consol.citrus.variable.GlobalVariables; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.Import; import org.springframework.context.annotation.PropertySource; /** * @author Christoph Deppisch */ +@Import(TodoAppAutoConfiguration.class) @Configuration @PropertySource("classpath:citrus.properties") public class EndpointConfig { diff --git a/samples-cucumber/sample-cucumber/pom.xml b/samples-cucumber/sample-cucumber/pom.xml index 4f21a112..fe67d09a 100644 --- a/samples-cucumber/sample-cucumber/pom.xml +++ b/samples-cucumber/sample-cucumber/pom.xml @@ -10,12 +10,12 @@ UTF-8 UTF-8 - 5.3.16 - 2.5.10 + 5.3.19 + 2.6.7 1.7.36 2.17.2 - 6.11.0 - 3.2.1 + 7.3.1 + 3.3.0-SNAPSHOT embedded @@ -167,52 +167,4 @@ test - - - - consol-labs-snapshots - http://labs.consol.de/maven/snapshots-repository/ - - true - interval:10080 - - - - - - - todo-app-embedded - - - system.under.test.mode - embedded - - - - - - org.springframework.boot - spring-boot-maven-plugin - - true - - - - pre-integration-test - - start - - - - post-integration-test - - stop - - - - - - - - diff --git a/samples-cucumber/sample-cucumber/src/test/java/todo/EndpointConfig.java b/samples-cucumber/sample-cucumber/src/test/java/todo/EndpointConfig.java index 7c3a15a7..330aa9aa 100644 --- a/samples-cucumber/sample-cucumber/src/test/java/todo/EndpointConfig.java +++ b/samples-cucumber/sample-cucumber/src/test/java/todo/EndpointConfig.java @@ -18,14 +18,17 @@ import com.consol.citrus.http.client.HttpClient; import com.consol.citrus.http.client.HttpClientBuilder; +import com.consol.citrus.samples.todolist.TodoAppAutoConfiguration; import com.consol.citrus.variable.GlobalVariables; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.Import; import org.springframework.context.annotation.PropertySource; /** * @author Christoph Deppisch */ +@Import(TodoAppAutoConfiguration.class) @Configuration @PropertySource("classpath:citrus.properties") public class EndpointConfig { diff --git a/samples-db/sample-jdbc-callable-statements/pom.xml b/samples-db/sample-jdbc-callable-statements/pom.xml index 9625fd8c..507eea5a 100644 --- a/samples-db/sample-jdbc-callable-statements/pom.xml +++ b/samples-db/sample-jdbc-callable-statements/pom.xml @@ -10,11 +10,11 @@ UTF-8 UTF-8 - 5.3.16 - 2.5.10 + 5.3.19 + 2.6.7 1.7.36 2.17.2 - 3.2.1 + 3.3.0-SNAPSHOT 0.1.4 embedded @@ -189,15 +189,4 @@ test - - - - consol-labs-snapshots - http://labs.consol.de/maven/snapshots-repository/ - - true - interval:10080 - - - diff --git a/samples-db/sample-jdbc-transactions/pom.xml b/samples-db/sample-jdbc-transactions/pom.xml index a3eef63a..28d80b20 100644 --- a/samples-db/sample-jdbc-transactions/pom.xml +++ b/samples-db/sample-jdbc-transactions/pom.xml @@ -10,11 +10,11 @@ UTF-8 UTF-8 - 5.3.16 - 2.5.10 + 5.3.19 + 2.6.7 1.7.36 2.17.2 - 3.2.1 + 3.3.0-SNAPSHOT 0.1.4 embedded @@ -190,15 +190,4 @@ test - - - - consol-labs-snapshots - http://labs.consol.de/maven/snapshots-repository/ - - true - interval:10080 - - - diff --git a/samples-db/sample-jdbc/pom.xml b/samples-db/sample-jdbc/pom.xml index bdb302d7..73fb5a52 100644 --- a/samples-db/sample-jdbc/pom.xml +++ b/samples-db/sample-jdbc/pom.xml @@ -10,11 +10,11 @@ UTF-8 UTF-8 - 5.3.16 - 2.5.10 + 5.3.19 + 2.6.7 1.7.36 2.17.2 - 3.2.1 + 3.3.0-SNAPSHOT 0.1.4 embedded @@ -189,15 +189,4 @@ test - - - - consol-labs-snapshots - http://labs.consol.de/maven/snapshots-repository/ - - true - interval:10080 - - - diff --git a/samples-db/sample-sql/pom.xml b/samples-db/sample-sql/pom.xml index 8ed9f10f..67a0e5c9 100644 --- a/samples-db/sample-sql/pom.xml +++ b/samples-db/sample-sql/pom.xml @@ -10,11 +10,11 @@ UTF-8 UTF-8 - 5.3.16 - 2.5.10 + 5.3.19 + 2.6.7 1.7.36 2.17.2 - 3.2.1 + 3.3.0-SNAPSHOT embedded @@ -177,15 +177,4 @@ test - - - - consol-labs-snapshots - http://labs.consol.de/maven/snapshots-repository/ - - true - interval:10080 - - - diff --git a/samples-ftp/sample-ftp/pom.xml b/samples-ftp/sample-ftp/pom.xml index 41a663dc..30f35857 100644 --- a/samples-ftp/sample-ftp/pom.xml +++ b/samples-ftp/sample-ftp/pom.xml @@ -10,10 +10,10 @@ UTF-8 UTF-8 - 5.3.16 + 5.3.19 1.7.36 2.17.2 - 3.2.1 + 3.3.0-SNAPSHOT @@ -134,15 +134,4 @@ test - - - - consol-labs-snapshots - http://labs.consol.de/maven/snapshots-repository/ - - true - interval:10080 - - - diff --git a/samples-ftp/sample-scp/pom.xml b/samples-ftp/sample-scp/pom.xml index 8d36fa47..f267c232 100644 --- a/samples-ftp/sample-scp/pom.xml +++ b/samples-ftp/sample-scp/pom.xml @@ -10,10 +10,10 @@ UTF-8 UTF-8 - 5.3.16 + 5.3.19 1.7.36 2.17.2 - 3.2.1 + 3.3.0-SNAPSHOT @@ -134,15 +134,4 @@ test - - - - consol-labs-snapshots - http://labs.consol.de/maven/snapshots-repository/ - - true - interval:10080 - - - diff --git a/samples-ftp/sample-sftp/pom.xml b/samples-ftp/sample-sftp/pom.xml index 6d3fbdea..c833f9ac 100644 --- a/samples-ftp/sample-sftp/pom.xml +++ b/samples-ftp/sample-sftp/pom.xml @@ -10,10 +10,10 @@ UTF-8 UTF-8 - 5.3.16 + 5.3.19 1.7.36 2.17.2 - 3.2.1 + 3.3.0-SNAPSHOT @@ -134,15 +134,4 @@ test - - - - consol-labs-snapshots - http://labs.consol.de/maven/snapshots-repository/ - - true - interval:10080 - - - diff --git a/samples-http/sample-http-basic-auth/pom.xml b/samples-http/sample-http-basic-auth/pom.xml index b059da7c..201d23b0 100644 --- a/samples-http/sample-http-basic-auth/pom.xml +++ b/samples-http/sample-http-basic-auth/pom.xml @@ -10,10 +10,10 @@ UTF-8 UTF-8 - 5.3.16 + 5.3.19 1.7.36 2.17.2 - 3.2.1 + 3.3.0-SNAPSHOT @@ -134,15 +134,4 @@ test - - - - consol-labs-snapshots - http://labs.consol.de/maven/snapshots-repository/ - - true - interval:10080 - - - diff --git a/samples-http/sample-http-form-data/pom.xml b/samples-http/sample-http-form-data/pom.xml index d19b5397..c2c50209 100644 --- a/samples-http/sample-http-form-data/pom.xml +++ b/samples-http/sample-http-form-data/pom.xml @@ -10,10 +10,10 @@ UTF-8 UTF-8 - 5.3.16 + 5.3.19 1.7.36 2.17.2 - 3.2.1 + 3.3.0-SNAPSHOT @@ -140,15 +140,4 @@ test - - - - consol-labs-snapshots - http://labs.consol.de/maven/snapshots-repository/ - - true - interval:10080 - - - diff --git a/samples-http/sample-http-loadtest/pom.xml b/samples-http/sample-http-loadtest/pom.xml index 5ec1b879..ff6e5fdc 100644 --- a/samples-http/sample-http-loadtest/pom.xml +++ b/samples-http/sample-http-loadtest/pom.xml @@ -10,11 +10,11 @@ UTF-8 UTF-8 - 5.3.16 - 2.5.10 + 5.3.19 + 2.6.7 1.7.36 2.17.2 - 3.2.1 + 3.3.0-SNAPSHOT embedded @@ -157,15 +157,4 @@ test - - - - consol-labs-snapshots - http://labs.consol.de/maven/snapshots-repository/ - - true - interval:10080 - - - diff --git a/samples-http/sample-http-query-param/pom.xml b/samples-http/sample-http-query-param/pom.xml index af8d29c0..ebbae0a2 100644 --- a/samples-http/sample-http-query-param/pom.xml +++ b/samples-http/sample-http-query-param/pom.xml @@ -10,10 +10,10 @@ UTF-8 UTF-8 - 5.3.16 + 5.3.19 1.7.36 2.17.2 - 3.2.1 + 3.3.0-SNAPSHOT @@ -128,15 +128,4 @@ test - - - - consol-labs-snapshots - http://labs.consol.de/maven/snapshots-repository/ - - true - interval:10080 - - - diff --git a/samples-http/sample-http-static-response/pom.xml b/samples-http/sample-http-static-response/pom.xml index dd97d627..b3545f73 100644 --- a/samples-http/sample-http-static-response/pom.xml +++ b/samples-http/sample-http-static-response/pom.xml @@ -10,10 +10,10 @@ UTF-8 UTF-8 - 5.3.16 + 5.3.19 1.7.36 2.17.2 - 3.2.1 + 3.3.0-SNAPSHOT @@ -134,15 +134,4 @@ test - - - - consol-labs-snapshots - http://labs.consol.de/maven/snapshots-repository/ - - true - interval:10080 - - - diff --git a/samples-http/sample-http/pom.xml b/samples-http/sample-http/pom.xml index eb75593a..5bb95a8b 100644 --- a/samples-http/sample-http/pom.xml +++ b/samples-http/sample-http/pom.xml @@ -10,11 +10,11 @@ UTF-8 UTF-8 - 5.3.16 - 2.5.10 + 5.3.19 + 2.6.7 1.7.36 2.17.2 - 3.2.1 + 3.3.0-SNAPSHOT embedded @@ -169,15 +169,4 @@ test - - - - consol-labs-snapshots - http://labs.consol.de/maven/snapshots-repository/ - - true - interval:10080 - - - diff --git a/samples-http/sample-https/pom.xml b/samples-http/sample-https/pom.xml index 07ca1f35..cb6ff5e7 100644 --- a/samples-http/sample-https/pom.xml +++ b/samples-http/sample-https/pom.xml @@ -10,10 +10,10 @@ UTF-8 UTF-8 - 5.3.16 + 5.3.19 1.7.36 2.17.2 - 3.2.1 + 3.3.0-SNAPSHOT @@ -139,15 +139,4 @@ test - - - - consol-labs-snapshots - http://labs.consol.de/maven/snapshots-repository/ - - true - interval:10080 - - - diff --git a/samples-http/sample-swagger/pom.xml b/samples-http/sample-swagger/pom.xml index f522c903..350b6b9b 100644 --- a/samples-http/sample-swagger/pom.xml +++ b/samples-http/sample-swagger/pom.xml @@ -10,11 +10,11 @@ UTF-8 UTF-8 - 5.3.16 - 2.5.10 + 5.3.19 + 2.6.7 1.7.36 2.17.2 - 3.2.1 + 3.3.0-SNAPSHOT embedded @@ -231,15 +231,4 @@ test - - - - consol-labs-snapshots - http://labs.consol.de/maven/snapshots-repository/ - - true - interval:10080 - - - diff --git a/samples-json/sample-databind/pom.xml b/samples-json/sample-databind/pom.xml index ff9c2ccc..3235dfab 100644 --- a/samples-json/sample-databind/pom.xml +++ b/samples-json/sample-databind/pom.xml @@ -10,11 +10,11 @@ UTF-8 UTF-8 - 5.3.16 - 2.5.10 + 5.3.19 + 2.6.7 1.7.36 2.17.2 - 3.2.1 + 3.3.0-SNAPSHOT embedded @@ -163,15 +163,4 @@ test - - - - consol-labs-snapshots - http://labs.consol.de/maven/snapshots-repository/ - - true - interval:10080 - - - diff --git a/samples-json/sample-json/pom.xml b/samples-json/sample-json/pom.xml index d94ce9c9..cb01003a 100644 --- a/samples-json/sample-json/pom.xml +++ b/samples-json/sample-json/pom.xml @@ -10,11 +10,11 @@ UTF-8 UTF-8 - 5.3.16 - 2.5.10 + 5.3.19 + 2.6.7 1.7.36 2.17.2 - 3.2.1 + 3.3.0-SNAPSHOT embedded @@ -163,15 +163,4 @@ test - - - - consol-labs-snapshots - http://labs.consol.de/maven/snapshots-repository/ - - true - interval:10080 - - - diff --git a/samples-junit/sample-junit/pom.xml b/samples-junit/sample-junit/pom.xml index 48392e9f..ed9970d7 100644 --- a/samples-junit/sample-junit/pom.xml +++ b/samples-junit/sample-junit/pom.xml @@ -10,11 +10,11 @@ UTF-8 UTF-8 - 5.3.16 - 2.5.10 + 5.3.19 + 2.6.7 1.7.36 2.17.2 - 3.2.1 + 3.3.0-SNAPSHOT embedded @@ -159,15 +159,4 @@ test - - - - consol-labs-snapshots - http://labs.consol.de/maven/snapshots-repository/ - - true - interval:10080 - - - diff --git a/samples-junit/sample-junit5/pom.xml b/samples-junit/sample-junit5/pom.xml index 11775b73..d9b487b5 100644 --- a/samples-junit/sample-junit5/pom.xml +++ b/samples-junit/sample-junit5/pom.xml @@ -10,12 +10,12 @@ UTF-8 UTF-8 - 5.3.16 - 2.5.10 + 5.3.19 + 2.6.7 1.7.36 2.17.2 5.7.0 - 3.2.1 + 3.3.0-SNAPSHOT embedded @@ -175,15 +175,4 @@ test - - - - consol-labs-snapshots - http://labs.consol.de/maven/snapshots-repository/ - - true - interval:10080 - - - diff --git a/samples-remote/sample-test-jar/pom.xml b/samples-remote/sample-test-jar/pom.xml index 9af37ef7..0bad9e67 100644 --- a/samples-remote/sample-test-jar/pom.xml +++ b/samples-remote/sample-test-jar/pom.xml @@ -10,11 +10,11 @@ UTF-8 UTF-8 - 5.3.16 - 2.5.10 + 5.3.19 + 2.6.7 1.7.36 2.17.2 - 3.2.1 + 3.3.0-SNAPSHOT embedded @@ -223,17 +223,6 @@ - - - consol-labs-snapshots - http://labs.consol.de/maven/snapshots-repository/ - - true - interval:10080 - - - - consol-labs-plugin-snapshots diff --git a/samples-remote/sample-test-war/pom.xml b/samples-remote/sample-test-war/pom.xml index 3ebd7ad2..55f12517 100644 --- a/samples-remote/sample-test-war/pom.xml +++ b/samples-remote/sample-test-war/pom.xml @@ -11,12 +11,12 @@ UTF-8 UTF-8 - 9.4.44.v20210927 - 5.3.16 - 2.5.10 + 9.4.46.v20220331 + 5.3.19 + 2.6.7 1.7.36 2.17.2 - 3.2.1 + 3.3.0-SNAPSHOT embedded @@ -200,17 +200,6 @@ - - - consol-labs-snapshots - http://labs.consol.de/maven/snapshots-repository/ - - true - interval:10080 - - - - consol-labs-plugin-snapshots diff --git a/samples-soap/sample-soap-attachment/pom.xml b/samples-soap/sample-soap-attachment/pom.xml index 1d6209ae..d02ed5a9 100644 --- a/samples-soap/sample-soap-attachment/pom.xml +++ b/samples-soap/sample-soap-attachment/pom.xml @@ -10,11 +10,11 @@ UTF-8 UTF-8 - 5.3.16 - 2.5.10 + 5.3.19 + 2.6.7 1.7.36 2.17.2 - 3.2.1 + 3.3.0-SNAPSHOT embedded @@ -157,15 +157,4 @@ test - - - - consol-labs-snapshots - http://labs.consol.de/maven/snapshots-repository/ - - true - interval:10080 - - - diff --git a/samples-soap/sample-soap-mtom/pom.xml b/samples-soap/sample-soap-mtom/pom.xml index cccd756a..e0111c92 100644 --- a/samples-soap/sample-soap-mtom/pom.xml +++ b/samples-soap/sample-soap-mtom/pom.xml @@ -10,10 +10,10 @@ UTF-8 UTF-8 - 5.3.16 + 5.3.19 1.7.36 2.17.2 - 3.2.1 + 3.3.0-SNAPSHOT @@ -134,15 +134,4 @@ test - - - - consol-labs-snapshots - http://labs.consol.de/maven/snapshots-repository/ - - true - interval:10080 - - - diff --git a/samples-soap/sample-soap-ssl/pom.xml b/samples-soap/sample-soap-ssl/pom.xml index 4e849b50..d037d3aa 100644 --- a/samples-soap/sample-soap-ssl/pom.xml +++ b/samples-soap/sample-soap-ssl/pom.xml @@ -10,10 +10,10 @@ UTF-8 UTF-8 - 5.3.16 + 5.3.19 1.7.36 2.17.2 - 3.2.1 + 3.3.0-SNAPSHOT @@ -145,15 +145,4 @@ test - - - - consol-labs-snapshots - http://labs.consol.de/maven/snapshots-repository/ - - true - interval:10080 - - - diff --git a/samples-soap/sample-soap-static-response/pom.xml b/samples-soap/sample-soap-static-response/pom.xml index c1d1ad36..9d1b6641 100644 --- a/samples-soap/sample-soap-static-response/pom.xml +++ b/samples-soap/sample-soap-static-response/pom.xml @@ -10,10 +10,10 @@ UTF-8 UTF-8 - 5.3.16 + 5.3.19 1.7.36 2.17.2 - 3.2.1 + 3.3.0-SNAPSHOT @@ -134,15 +134,4 @@ test - - - - consol-labs-snapshots - http://labs.consol.de/maven/snapshots-repository/ - - true - interval:10080 - - - diff --git a/samples-soap/sample-soap-wsaddressing/pom.xml b/samples-soap/sample-soap-wsaddressing/pom.xml index 9e995227..1d5ecf09 100644 --- a/samples-soap/sample-soap-wsaddressing/pom.xml +++ b/samples-soap/sample-soap-wsaddressing/pom.xml @@ -10,10 +10,10 @@ UTF-8 UTF-8 - 5.3.16 + 5.3.19 1.7.36 2.17.2 - 3.2.1 + 3.3.0-SNAPSHOT @@ -134,15 +134,4 @@ test - - - - consol-labs-snapshots - http://labs.consol.de/maven/snapshots-repository/ - - true - interval:10080 - - - diff --git a/samples-soap/sample-soap-wssecurity/pom.xml b/samples-soap/sample-soap-wssecurity/pom.xml index 83547e18..48ca477a 100644 --- a/samples-soap/sample-soap-wssecurity/pom.xml +++ b/samples-soap/sample-soap-wssecurity/pom.xml @@ -10,11 +10,12 @@ UTF-8 UTF-8 - 5.3.16 - 3.1.2 + 5.3.19 + 3.1.3 + 2.2.2 1.7.36 2.17.2 - 3.2.1 + 3.3.0-SNAPSHOT @@ -145,19 +146,8 @@ org.apache.wss4j wss4j-ws-security-dom - 2.2.2 + ${wss4j.version} test - - - - consol-labs-snapshots - http://labs.consol.de/maven/snapshots-repository/ - - true - interval:10080 - - - diff --git a/samples-soap/sample-soap/pom.xml b/samples-soap/sample-soap/pom.xml index 140234d0..107493b3 100644 --- a/samples-soap/sample-soap/pom.xml +++ b/samples-soap/sample-soap/pom.xml @@ -10,11 +10,11 @@ UTF-8 UTF-8 - 5.3.16 - 2.5.10 + 5.3.19 + 2.6.7 1.7.36 2.17.2 - 3.2.1 + 3.3.0-SNAPSHOT embedded @@ -157,15 +157,4 @@ test - - - - consol-labs-snapshots - http://labs.consol.de/maven/snapshots-repository/ - - true - interval:10080 - - - diff --git a/samples-soap/sample-wsdl/pom.xml b/samples-soap/sample-wsdl/pom.xml index 9279e69c..67d0ca30 100644 --- a/samples-soap/sample-wsdl/pom.xml +++ b/samples-soap/sample-wsdl/pom.xml @@ -10,11 +10,11 @@ UTF-8 UTF-8 - 5.3.16 - 2.5.10 + 5.3.19 + 2.6.7 1.7.36 2.17.2 - 3.2.1 + 3.3.0-SNAPSHOT embedded @@ -220,17 +220,6 @@ - - - consol-labs-snapshots - http://labs.consol.de/maven/snapshots-repository/ - - true - interval:10080 - - - - consol-labs-plugin-snapshots diff --git a/samples-testng/sample-dataprovider/pom.xml b/samples-testng/sample-dataprovider/pom.xml index e7cb046f..f91a2967 100644 --- a/samples-testng/sample-dataprovider/pom.xml +++ b/samples-testng/sample-dataprovider/pom.xml @@ -10,11 +10,11 @@ UTF-8 UTF-8 - 5.3.16 - 2.5.10 + 5.3.19 + 2.6.7 1.7.36 2.17.2 - 3.2.1 + 3.3.0-SNAPSHOT embedded @@ -163,15 +163,4 @@ test - - - - consol-labs-snapshots - http://labs.consol.de/maven/snapshots-repository/ - - true - interval:10080 - - - diff --git a/samples-testng/sample-testng/pom.xml b/samples-testng/sample-testng/pom.xml index 885b7ea7..8ddeaece 100644 --- a/samples-testng/sample-testng/pom.xml +++ b/samples-testng/sample-testng/pom.xml @@ -10,11 +10,11 @@ UTF-8 UTF-8 - 5.3.16 - 2.5.10 + 5.3.19 + 2.6.7 1.7.36 2.17.2 - 3.2.1 + 3.3.0-SNAPSHOT embedded @@ -157,15 +157,4 @@ test - - - - consol-labs-snapshots - http://labs.consol.de/maven/snapshots-repository/ - - true - interval:10080 - - - diff --git a/samples-xml/sample-oxm/README.md b/samples-xml/sample-oxm/README.md index c0c74752..27625afb 100644 --- a/samples-xml/sample-oxm/README.md +++ b/samples-xml/sample-oxm/README.md @@ -11,35 +11,23 @@ The [todo-list](../todo-app/README.md) sample application provides a REST API fo We call this API with object mapping in Citrus so that we do not need to write message payload JSON or XML structures but use the model objects directly in our test cases. -We need to include the Spring oxm module in the dependencies: - -```xml - - org.springframework - spring-oxm - ${spring.version} - test - -``` - -Also we need to provide a marshaller component in our Spring configuration: +First we need to provide a marshaller component in our Spring configuration: ```java @Bean public Marshaller marshaller() { - Jaxb2Marshaller marshaller = new Jaxb2Marshaller(); - marshaller.setContextPath("com.consol.citrus.samples.todolist.model"); - return marshaller; + return new Jaxb2Marshaller("com.consol.citrus.samples.todolist.model"); } ``` -Please note that the marshaller supports model object classes in package **com.consol.citrus.samples.todolist.model**. +Citrus provides the Jaxb2 marshaller out-of-the-box. You can just use this in your tests to deal with XML payloads. +Please note that the marshaller supports model object classes in package **com.consol.citrus.samples.todolist.model**. That is all for configuration, now we can use model objects as message payload in the test cases. ```java @Autowired -private Jaxb2Marshaller marshaller; +private Marshaller marshaller; $(http() .client(todoClient) @@ -67,7 +55,36 @@ $(http() ``` The validation callback gets the model object as first method parameter. You can now add some validation logic with assertions on the model object. - + +Using Spring Oxm marshallers +--------- + +In case you want to use a different marshaller implementation for instance those provided by Spring Oxm module you can do so, too. + +We need to include the Spring oxm module in the dependencies: + +```xml + + org.springframework + spring-oxm + ${spring.version} + test + +``` + +Then you are able to create a bean with the Spring Oxm marshaller. + +```java +@Bean +public Marshaller marshaller() { + Jaxb2Marshaller marshaller = new Jaxb2Marshaller(); + marshaller.setContextPath("com.consol.citrus.samples.todolist.model"); + return new MarshallerAdapter(marshaller); + } +``` + +The Citrus Spring module provides a marshaller adapter that you can use to wrap the Spring Oxm marshaller implementation in order to meet the Citrus marshaller type. + Run --------- diff --git a/samples-xml/sample-oxm/pom.xml b/samples-xml/sample-oxm/pom.xml index 66413b2f..d1d441a8 100644 --- a/samples-xml/sample-oxm/pom.xml +++ b/samples-xml/sample-oxm/pom.xml @@ -10,11 +10,11 @@ UTF-8 UTF-8 - 5.3.16 - 2.5.10 + 5.3.19 + 2.6.7 1.7.36 2.17.2 - 3.2.1 + 3.3.0-SNAPSHOT embedded @@ -163,15 +163,4 @@ test - - - - consol-labs-snapshots - http://labs.consol.de/maven/snapshots-repository/ - - true - interval:10080 - - - diff --git a/samples-xml/sample-oxm/src/test/java/com/consol/citrus/samples/todolist/EndpointConfig.java b/samples-xml/sample-oxm/src/test/java/com/consol/citrus/samples/todolist/EndpointConfig.java index e6c0bd4a..bc6d5331 100644 --- a/samples-xml/sample-oxm/src/test/java/com/consol/citrus/samples/todolist/EndpointConfig.java +++ b/samples-xml/sample-oxm/src/test/java/com/consol/citrus/samples/todolist/EndpointConfig.java @@ -18,11 +18,11 @@ import com.consol.citrus.dsl.endpoint.CitrusEndpoints; import com.consol.citrus.http.client.HttpClient; +import com.consol.citrus.xml.Jaxb2Marshaller; +import com.consol.citrus.xml.Marshaller; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; -import org.springframework.oxm.Marshaller; -import org.springframework.oxm.jaxb.Jaxb2Marshaller; /** * @author Christoph Deppisch @@ -42,8 +42,6 @@ public HttpClient todoClient() { @Bean public Marshaller marshaller() { - Jaxb2Marshaller marshaller = new Jaxb2Marshaller(); - marshaller.setContextPath("com.consol.citrus.samples.todolist.model"); - return marshaller; + return new Jaxb2Marshaller("com.consol.citrus.samples.todolist.model"); } } diff --git a/samples-xml/sample-oxm/src/test/java/com/consol/citrus/samples/todolist/TodoListIT.java b/samples-xml/sample-oxm/src/test/java/com/consol/citrus/samples/todolist/TodoListIT.java index 13aa17d9..d8feb3d0 100644 --- a/samples-xml/sample-oxm/src/test/java/com/consol/citrus/samples/todolist/TodoListIT.java +++ b/samples-xml/sample-oxm/src/test/java/com/consol/citrus/samples/todolist/TodoListIT.java @@ -26,10 +26,10 @@ import com.consol.citrus.samples.todolist.model.TodoEntry; import com.consol.citrus.testng.spring.TestNGCitrusSpringSupport; import com.consol.citrus.validation.xml.XmlMarshallingValidationProcessor; +import com.consol.citrus.xml.Jaxb2Marshaller; import org.apache.http.entity.ContentType; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; -import org.springframework.oxm.jaxb.Jaxb2Marshaller; import org.testng.Assert; import org.testng.annotations.Test; diff --git a/samples-xml/sample-xhtml/pom.xml b/samples-xml/sample-xhtml/pom.xml index 8e504583..03d7ea54 100644 --- a/samples-xml/sample-xhtml/pom.xml +++ b/samples-xml/sample-xhtml/pom.xml @@ -10,11 +10,11 @@ UTF-8 UTF-8 - 5.3.16 - 2.5.10 + 5.3.19 + 2.6.7 1.7.36 2.17.2 - 3.2.1 + 3.3.0-SNAPSHOT embedded @@ -163,15 +163,4 @@ test - - - - consol-labs-snapshots - http://labs.consol.de/maven/snapshots-repository/ - - true - interval:10080 - - - diff --git a/samples-xml/sample-xml/pom.xml b/samples-xml/sample-xml/pom.xml index d38c649a..64b0693c 100644 --- a/samples-xml/sample-xml/pom.xml +++ b/samples-xml/sample-xml/pom.xml @@ -10,11 +10,11 @@ UTF-8 UTF-8 - 5.3.16 - 2.5.10 + 5.3.19 + 2.6.7 1.7.36 2.17.2 - 3.2.1 + 3.3.0-SNAPSHOT embedded @@ -163,15 +163,4 @@ test - - - - consol-labs-snapshots - http://labs.consol.de/maven/snapshots-repository/ - - true - interval:10080 - - - diff --git a/todo-app/pom.xml b/todo-app/pom.xml index e1280fa5..99da80df 100644 --- a/todo-app/pom.xml +++ b/todo-app/pom.xml @@ -10,18 +10,20 @@ UTF-8 UTF-8 - 5.3.16 - 2.5.10 - 2.8.3 - 5.16.3 - 3.2.1 + 5.3.19 + 2.6.7 + 2.8.6 + 5.17.0 + 3.3.0-SNAPSHOT 1.7.36 2.17.2 - 2.12.6 + 2.13.2.2 + 2.13.2 2.3.3 1.6.7 2.0.3 2.0.2 + 2.12.2 true @@ -104,7 +106,7 @@ xerces xercesImpl - 2.12.1 + ${xerces.version} @@ -299,7 +301,7 @@ com.fasterxml.jackson.core jackson-databind - ${jackson.version} + ${jackson.databind.version} @@ -309,14 +311,9 @@ - io.springfox - springfox-swagger2 - 2.5.0 - - - io.swagger - swagger-core - 1.5.16 + org.springdoc + springdoc-openapi-ui + 1.6.8 @@ -333,12 +330,12 @@ org.webjars jquery - 2.1.4 + 3.5.1 org.webjars bootstrap - 3.3.5 + 4.6.1 diff --git a/todo-app/src/main/java/com/consol/citrus/samples/todolist/TodoApplication.java b/todo-app/src/main/java/com/consol/citrus/samples/todolist/TodoApplication.java index f6276a75..82a12632 100644 --- a/todo-app/src/main/java/com/consol/citrus/samples/todolist/TodoApplication.java +++ b/todo-app/src/main/java/com/consol/citrus/samples/todolist/TodoApplication.java @@ -16,15 +16,12 @@ package com.consol.citrus.samples.todolist; +import io.swagger.v3.oas.models.OpenAPI; +import io.swagger.v3.oas.models.info.Info; +import io.swagger.v3.oas.models.info.License; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.context.annotation.Bean; -import springfox.documentation.builders.ApiInfoBuilder; -import springfox.documentation.builders.PathSelectors; -import springfox.documentation.service.ApiInfo; -import springfox.documentation.spi.DocumentationType; -import springfox.documentation.spring.web.plugins.Docket; -import springfox.documentation.swagger2.annotations.EnableSwagger2; /** * @author Christoph Deppisch @@ -37,7 +34,6 @@ "com.consol.citrus.samples.todolist.soap", "com.consol.citrus.samples.todolist.web" }) -@EnableSwagger2 public class TodoApplication { public static void main(String[] args) { @@ -45,21 +41,11 @@ public static void main(String[] args) { } @Bean - public Docket todoApi() { - return new Docket(DocumentationType.SWAGGER_2) - .useDefaultResponseMessages(false) - .apiInfo(apiInfo()) - .select() - .paths(PathSelectors.regex("/api.*")) - .build(); - } - - private ApiInfo apiInfo() { - return new ApiInfoBuilder() - .title("TodoList API") - .description("REST API for todo application") - .license("Apache License Version 2.0") - .version("2.0") - .build(); + public OpenAPI todoApi() { + return new OpenAPI() + .info(new Info().title("TodoList API") + .description("REST API for todo application") + .version("2.0") + .license(new License().name("Apache 2.0"))); } } diff --git a/todo-app/src/main/java/com/consol/citrus/samples/todolist/web/JmsReportController.java b/todo-app/src/main/java/com/consol/citrus/samples/todolist/web/JmsReportController.java index c55f5adb..3e80a7e9 100644 --- a/todo-app/src/main/java/com/consol/citrus/samples/todolist/web/JmsReportController.java +++ b/todo-app/src/main/java/com/consol/citrus/samples/todolist/web/JmsReportController.java @@ -1,16 +1,20 @@ package com.consol.citrus.samples.todolist.web; +import java.util.stream.Collectors; + import com.consol.citrus.samples.todolist.jms.TodoJmsReportProducer; import com.consol.citrus.samples.todolist.model.TodoEntry; import com.consol.citrus.samples.todolist.service.TodoListService; -import io.swagger.annotations.*; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.responses.ApiResponses; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.http.HttpStatus; import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.*; - -import java.util.stream.Collectors; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.ResponseStatus; /** * @author Christoph Deppisch @@ -26,9 +30,9 @@ public class JmsReportController { @Autowired private TodoListService todoListService; - @ApiOperation(notes = "Send Jms reporting.", value = "Send Jms reporting", nickname = "sendJmsReport" ) + @Operation(description = "Send Jms reporting.", summary = "Send Jms reporting", operationId = "sendJmsReport" ) @ApiResponses({ - @ApiResponse(code = 200, message = "OK") + @ApiResponse(responseCode = "200", description = "OK") }) @RequestMapping(value = "/done", method = RequestMethod.GET) @ResponseStatus(HttpStatus.OK) diff --git a/todo-app/src/main/java/com/consol/citrus/samples/todolist/web/KafkaReportController.java b/todo-app/src/main/java/com/consol/citrus/samples/todolist/web/KafkaReportController.java index bf41277b..e97b473c 100644 --- a/todo-app/src/main/java/com/consol/citrus/samples/todolist/web/KafkaReportController.java +++ b/todo-app/src/main/java/com/consol/citrus/samples/todolist/web/KafkaReportController.java @@ -1,16 +1,20 @@ package com.consol.citrus.samples.todolist.web; +import java.util.stream.Collectors; + import com.consol.citrus.samples.todolist.kafka.TodoKafkaReportProducer; import com.consol.citrus.samples.todolist.model.TodoEntry; import com.consol.citrus.samples.todolist.service.TodoListService; -import io.swagger.annotations.*; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.responses.ApiResponses; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.http.HttpStatus; import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.*; - -import java.util.stream.Collectors; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.ResponseStatus; /** * @author Christoph Deppisch @@ -26,9 +30,9 @@ public class KafkaReportController { @Autowired private TodoListService todoListService; - @ApiOperation(notes = "Send Kafka reporting.", value = "Send Kafka reporting", nickname = "sendKafkaReport" ) + @Operation(description = "Send Kafka reporting.", summary = "Send Kafka reporting", operationId = "sendKafkaReport" ) @ApiResponses({ - @ApiResponse(code = 200, message = "OK") + @ApiResponse(responseCode = "200", description = "OK") }) @RequestMapping(value = "/done", method = RequestMethod.GET) @ResponseStatus(HttpStatus.OK) diff --git a/todo-app/src/main/java/com/consol/citrus/samples/todolist/web/ReportingController.java b/todo-app/src/main/java/com/consol/citrus/samples/todolist/web/ReportingController.java index 775fc458..b43c0cd1 100644 --- a/todo-app/src/main/java/com/consol/citrus/samples/todolist/web/ReportingController.java +++ b/todo-app/src/main/java/com/consol/citrus/samples/todolist/web/ReportingController.java @@ -17,11 +17,15 @@ package com.consol.citrus.samples.todolist.web; import com.consol.citrus.samples.todolist.service.ReportingService; -import io.swagger.annotations.*; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.responses.ApiResponses; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.*; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.ResponseStatus; /** * @author Christoph Deppisch @@ -33,9 +37,9 @@ public class ReportingController { @Autowired private ReportingService reportingService; - @ApiOperation(notes = "Send mail reporting.", value = "Send mail reporting", nickname = "sendMailReport" ) + @Operation(description = "Send mail reporting.", summary = "Send mail reporting", operationId = "sendMailReport" ) @ApiResponses({ - @ApiResponse(code = 200, message = "OK") + @ApiResponse(responseCode = "200", description = "OK") }) @RequestMapping(value = "/mail", method = RequestMethod.GET) @ResponseStatus(HttpStatus.OK) diff --git a/todo-app/src/main/java/com/consol/citrus/samples/todolist/web/TodoController.java b/todo-app/src/main/java/com/consol/citrus/samples/todolist/web/TodoController.java index 904dedd0..7e84a1f3 100644 --- a/todo-app/src/main/java/com/consol/citrus/samples/todolist/web/TodoController.java +++ b/todo-app/src/main/java/com/consol/citrus/samples/todolist/web/TodoController.java @@ -16,15 +16,23 @@ package com.consol.citrus.samples.todolist.web; +import java.util.UUID; + import com.consol.citrus.samples.todolist.model.TodoEntry; import com.consol.citrus.samples.todolist.service.TodoListService; -import io.swagger.annotations.*; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.responses.ApiResponses; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.*; - -import java.util.UUID; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.bind.annotation.ResponseStatus; /** * @author Christoph Deppisch @@ -36,48 +44,48 @@ public class TodoController { @Autowired private TodoListService todoListService; - @ApiOperation(notes = "Returns a todo entry. Unknown todo id will simulate API error conditions", value = "Find todo entry by ID", nickname = "getEntryById" ) + @Operation(description = "Returns a todo entry. Unknown todo id will simulate API error conditions", summary = "Find todo entry by ID", operationId = "getEntryById" ) @ApiResponses({ - @ApiResponse(code = 200, message = "OK", response = TodoEntry.class), - @ApiResponse(code = 404, message = "Todo entry not found") + @ApiResponse(responseCode = "200", description = "OK"), + @ApiResponse(responseCode = "404", description = "Todo entry not found") }) @RequestMapping(value = "/{id}", method = RequestMethod.GET) @ResponseBody @ResponseStatus(HttpStatus.OK) - public TodoEntry getEntry(@ApiParam(value = "ID of todo entry that needs to be fetched", required = true) @PathVariable(value = "id") UUID id) { + public TodoEntry getEntry(@Parameter(description = "ID of todo entry that needs to be fetched", required = true) @PathVariable(value = "id") UUID id) { return todoListService.getEntry(id); } - @ApiOperation(notes = "Sets todo entry status. Unknown todo id will simulate API error conditions", value = "Set todo entry status", nickname = "setEntryStatus" ) + @Operation(description = "Sets todo entry status. Unknown todo id will simulate API error conditions", summary = "Set todo entry status", operationId = "setEntryStatus" ) @ApiResponses({ - @ApiResponse(code = 200, message = "OK"), - @ApiResponse(code = 404, message = "Todo entry not found") + @ApiResponse(responseCode = "200", description = "OK"), + @ApiResponse(responseCode = "404", description = "Todo entry not found") }) @RequestMapping(value = "/{id}", method = RequestMethod.PUT) @ResponseStatus(HttpStatus.OK) - public void setEntryStatus(@ApiParam(value = "ID of todo entry that needs to be updated", required = true) @PathVariable(value = "id") UUID id, - @ApiParam(value = "Status to set", required = true) @RequestParam(value = "done") boolean done) { + public void setEntryStatus(@Parameter(description = "ID of todo entry that needs to be updated", required = true) @PathVariable(value = "id") UUID id, + @Parameter(description = "Status to set", required = true) @RequestParam(value = "done") boolean done) { todoListService.setStatus(id, done); } - @ApiOperation(notes = "Delete todo entries identified by its title", value = "Delete todo entries by title", nickname = "deleteEntryByTitle" ) + @Operation(description = "Delete todo entries identified by its title", summary = "Delete todo entries by title", operationId = "deleteEntryByTitle" ) @ApiResponses({ - @ApiResponse(code = 200, message = "OK") + @ApiResponse(responseCode = "200", description = "OK") }) @RequestMapping(method = RequestMethod.DELETE) @ResponseStatus(HttpStatus.OK) - public void deleteEntryByTitle(@ApiParam(value = "Title to identify entries that should be deleted", required = true) @RequestParam(value = "title") String title) { + public void deleteEntryByTitle(@Parameter(description = "Title to identify entries that should be deleted", required = true) @RequestParam(value = "title") String title) { todoListService.deleteEntry(title); } - @ApiOperation(notes = "Delete todo entry identified by given id. Unknown todo id will simulate API error conditions", value = "Delete todo entry by id", nickname = "deleteEntryById" ) + @Operation(description = "Delete todo entry identified by given id. Unknown todo id will simulate API error conditions", summary = "Delete todo entry by id", operationId = "deleteEntryById" ) @ApiResponses({ - @ApiResponse(code = 200, message = "OK"), - @ApiResponse(code = 404, message = "Todo entry not found") + @ApiResponse(responseCode = "200", description = "OK"), + @ApiResponse(responseCode = "404", description = "Todo entry not found") }) @RequestMapping(value = "/{id}", method = RequestMethod.DELETE) @ResponseStatus(HttpStatus.OK) - public void deleteEntry(@ApiParam(value = "ID of todo entry that needs to be deleted", required = true) @PathVariable(value = "id") UUID id) { + public void deleteEntry(@Parameter(description = "ID of todo entry that needs to be deleted", required = true) @PathVariable(value = "id") UUID id) { todoListService.deleteEntry(id); } } diff --git a/todo-app/src/main/java/com/consol/citrus/samples/todolist/web/TodoListController.java b/todo-app/src/main/java/com/consol/citrus/samples/todolist/web/TodoListController.java index 6a087ef9..22d1ceb1 100644 --- a/todo-app/src/main/java/com/consol/citrus/samples/todolist/web/TodoListController.java +++ b/todo-app/src/main/java/com/consol/citrus/samples/todolist/web/TodoListController.java @@ -16,12 +16,14 @@ package com.consol.citrus.samples.todolist.web; +import java.util.List; + import com.consol.citrus.samples.todolist.model.TodoEntry; import com.consol.citrus.samples.todolist.service.TodoListService; -import io.swagger.annotations.ApiOperation; -import io.swagger.annotations.ApiParam; -import io.swagger.annotations.ApiResponse; -import io.swagger.annotations.ApiResponses; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.responses.ApiResponses; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.stereotype.Controller; @@ -32,8 +34,6 @@ import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseStatus; -import java.util.List; - /** * @author Christoph Deppisch */ @@ -44,9 +44,9 @@ public class TodoListController { @Autowired private TodoListService todoListService; - @ApiOperation(notes = "Returns all available todo entries.", value = "List todo entries", nickname = "listTodoEntries" ) + @Operation(description = "Returns all available todo entries.", summary = "List todo entries", operationId = "listTodoEntries" ) @ApiResponses({ - @ApiResponse(code = 200, message = "OK", response = TodoEntry[].class) + @ApiResponse(responseCode = "200", description = "OK") }) @RequestMapping(method = RequestMethod.GET) @ResponseBody @@ -60,20 +60,20 @@ public List listWithLimit(@PathVariable(value = "limit") final int li return todoListService.getAllEntries(limit); } - @ApiOperation(notes = "Adds new todo entry.", value = "Add todo entry", nickname = "addTodoEntry" ) + @Operation(description = "Adds new todo entry.", summary = "Add todo entry", operationId = "addTodoEntry" ) @ApiResponses({ - @ApiResponse(code = 200, message = "OK", response = String.class) + @ApiResponse(responseCode = "200", description = "OK") }) @RequestMapping(method = RequestMethod.POST) @ResponseBody - public String add(@ApiParam(value = "Todo entry to be added", required = true) @RequestBody TodoEntry entry) { + public String add(@Parameter(description = "Todo entry to be added", required = true) @RequestBody TodoEntry entry) { todoListService.addEntry(entry); return entry.getId().toString(); } - @ApiOperation(notes = "Delete all todo entries.", value = "Delete all todo entries", nickname = "deleteTodoEntries" ) + @Operation(description = "Delete all todo entries.", summary = "Delete all todo entries", operationId = "deleteTodoEntries" ) @ApiResponses({ - @ApiResponse(code = 200, message = "OK") + @ApiResponse(responseCode = "200", description = "OK") }) @RequestMapping(method = RequestMethod.DELETE) @ResponseStatus(HttpStatus.OK) @@ -81,9 +81,9 @@ public void clear() { todoListService.clear(); } - @ApiOperation(notes = "Gets number of available todo entries.", value = "Gets number of todo entries", nickname = "getTodoEntryCount" ) + @Operation(description = "Gets number of available todo entries.", summary = "Gets number of todo entries", operationId = "getTodoEntryCount" ) @ApiResponses({ - @ApiResponse(code = 200, message = "OK", response = Integer.class) + @ApiResponse(responseCode = "200", description = "OK") }) @RequestMapping(value = "/count", method = RequestMethod.GET) @ResponseBody diff --git a/todo-app/src/main/resources/application.properties b/todo-app/src/main/resources/application.properties index 5d980391..f3c15144 100644 --- a/todo-app/src/main/resources/application.properties +++ b/todo-app/src/main/resources/application.properties @@ -1,4 +1,4 @@ -spring.resources.chain.enabled=true +spring.web.resources.chain.enabled=true spring.profiles.active=dev @@ -18,4 +18,7 @@ todo.jdbc.username=sa todo.jdbc.password= spring.kafka.consumer.group-id=todo -spring.kafka.consumer.auto-offset-reset=earliest \ No newline at end of file +spring.kafka.consumer.auto-offset-reset=earliest + +springdoc.packagesToScan=com.consol.citrus.samples.todolist +springdoc.pathsToMatch=/api/** diff --git a/todo-app/src/main/resources/static/index.html b/todo-app/src/main/resources/static/index.html index 742b94f2..3d85589d 100644 --- a/todo-app/src/main/resources/static/index.html +++ b/todo-app/src/main/resources/static/index.html @@ -1,10 +1,9 @@ - - - - + + + diff --git a/todo-app/src/main/resources/templates/todo.html b/todo-app/src/main/resources/templates/todo.html index 5b0e0037..1a79cf14 100644 --- a/todo-app/src/main/resources/templates/todo.html +++ b/todo-app/src/main/resources/templates/todo.html @@ -1,10 +1,9 @@ - - - - + + +