Commit Graph

3290 Commits

Author SHA1 Message Date
Marcin Grzejszczak
8bbe6945ce Merge branch '2.0.x' 2019-02-12 10:48:22 +01:00
Marcin Grzejszczak
d27020bfdf Updated sdkman java version 2019-02-12 10:48:14 +01:00
Marcin Grzejszczak
8ce80e6e7f Applied checkstyle rules 2019-02-08 18:20:59 +01:00
Marcin Grzejszczak
8610626e60 Added recursive check for empty arrays; fixes gh-727 2019-01-29 11:27:08 +01:00
buildmaster
0cb549b8e7 Bumping versions 2019-01-25 14:01:10 +00:00
Marcin Grzejszczak
d65886e035 Updated code for 2.1.x version 2019-01-24 17:57:46 +01:00
Marcin Grzejszczak
13ce788acf Merge branch '2.0.x' 2019-01-24 17:55:18 +01:00
Marcin Grzejszczak
e8f774f874 Fixed the unnecessary isEmpty generation; fixes gh-727 2019-01-24 17:55:04 +01:00
Marcin Grzejszczak
55f648fc85 Migrated to non snapshot versions for classpath tests 2019-01-23 11:00:12 +01:00
buildmaster
6597c6eec2 Bumping versions to 2.1.1.BUILD-SNAPSHOT after release 2019-01-22 20:46:19 +00:00
buildmaster
1314163825 Going back to snapshots 2019-01-22 20:46:18 +00:00
buildmaster
cd239d8c39 Update SNAPSHOT to 2.1.0.RELEASE 2019-01-22 20:39:11 +00:00
Marcin Grzejszczak
d8f5986115 Removed snapshot versions 2019-01-22 20:31:10 +01:00
Marcin Grzejszczak
8ebc749d2f Fixed the way regex entries are generated for message bodies; fixes gh-858 2019-01-22 09:14:08 +01:00
Marcin Grzejszczak
a2d6137340 Fixed the way regex entries are generated for message bodies
fixes gh-858
2019-01-22 09:13:16 +01:00
Marcin Grzejszczak
38b1ebae2f Added a test case for message and regex; fixes gh-858 2019-01-22 08:44:51 +01:00
Marcin Grzejszczak
9561627003 Updated JDK in Docker images 2019-01-22 08:15:17 +01:00
Marcin Grzejszczak
42329bcacb Updated JDK in Docker images 2019-01-22 08:14:53 +01:00
Olga Maciaszek-Sharma
313d5ef586 Fix WebFlux usage section in docs. Remove unused method (#857)
Remove unused method and implementation for processing xml body verification (class is package-
scope, so not backwards incompatible change).
2019-01-21 18:51:35 +01:00
Marcin Grzejszczak
414404d0ae Intellij is hanging all the time 2019-01-21 16:52:36 +01:00
Marcin Grzejszczak
941e56cdce Bumped Build 2019-01-21 14:13:09 +01:00
Marcin Grzejszczak
281bd653ae Bumped Boot to 2.1.2.RELEASE 2019-01-21 13:34:49 +01:00
Marcin Grzejszczak
d41d79b887 Added javadocs 2019-01-20 22:42:36 +01:00
Marcin Grzejszczak
0d0d2ea11c Shouldn't always parse each object
without this change, when a body is parsed and it contains a JSON in a JSON, then we parse it. That's because our logic hasn't actually ever considered that one can have a valid JSON string in a JSON.

with this change we're introducing a parsing closure. When we know that the body is a Map and we know that we're parsing a JSON, then we don't want to parse any Strings inside that map. We assume that the users know what they do, so if an element in the map is a String, then we just pass it.

fixes gh-652
2019-01-20 22:23:34 +01:00
Marcin Grzejszczak
1eed5c606d Merge branch '2.0.x' 2019-01-20 20:33:57 +01:00
Marcin Grzejszczak
fb1e081dda Added a test and docs on how to add all stubs from the classpath; fixes gh-591 2019-01-20 20:33:49 +01:00
Marcin Grzejszczak
d50ddf15c5 Merge branch '2.0.x' 2019-01-20 13:06:15 +01:00
Marcin Grzejszczak
7f1b14a292 Escaping new lines for json; fixes gh-802 2019-01-20 13:05:08 +01:00
Olga Maciaszek-Sharma
6c3caddb7b Add xml support (#855)
* Start working on generating stub requests from Xml.

* Start implementing matching by xpath.

* Handle xml request body matchers.

* Merge branch 'master' into add-xml-support

* Implement analysing xmls and converting nodes to matchers.

* Handle attributes in xml analysis and generate stubs with xml body matchers.

* Make XmlToXPathsConverter statically compiled.

* Start extracting json test generation logic out of the MethodBodyBuilder.

* Fix extracted JsonBodyVerificationBuilder. Fix processing attributes
from xml while generating stubs. Fix and adjust tests to recent changes.

* Merge branch 'master' into add-xml-support

# Conflicts:
#	spring-cloud-contract-verifier/src/main/groovy/org/springframework/cloud/contract/verifier/builder/MethodBodyBuilder.groovy
#	spring-cloud-contract-verifier/src/main/groovy/org/springframework/cloud/contract/verifier/converter/ContractsToYaml.groovy
#	spring-cloud-contract-verifier/src/main/groovy/org/springframework/cloud/contract/verifier/dsl/wiremock/WireMockRequestStubStrategy.groovy
#	spring-cloud-contract-verifier/src/main/groovy/org/springframework/cloud/contract/verifier/util/JsonToJsonPathsConverter.groovy
#	spring-cloud-contract-verifier/src/test/groovy/org/springframework/cloud/contract/verifier/converter/YamlContractConverterSpec.groovy

* Implement test generation for XML body matchers. Start implementing handling XML lists in assertions.

* Fix generating list element assertions and regex body matcher assertions.
Move XML-assert lib content to project sources. Add tests.

* Fix recognising XML content from String body. Minor refactoring.

* Adjust yaml contracts to new xml handling.

* Add tests for handling XML with yaml contracts. Handle incorrect request
matchers processing.

* Minor refactoring.

* Add docs.

* Fix docs.

* Fixes after code review.

* Switch to apache commons logger in `XmlAsserter`.
2019-01-18 20:16:19 +01:00
Marcin Grzejszczak
5d8015aa0f Merge branch '2.0.x' 2019-01-18 16:28:07 +01:00
Marcin Grzejszczak
03a4303a10 Not causing an exception when context is broken; fixes gh-833 2019-01-18 16:28:00 +01:00
Marcin Grzejszczak
ab452206f9 Should provide an option to remove folders that are not empty in Windows; fixes gh-834 2019-01-18 16:15:31 +01:00
Marcin Grzejszczak
4a127e7785 Removed unnecessary duplicated call to rest doc's document method; fixes gh-816 2019-01-15 17:36:25 +01:00
Marcin Grzejszczak
122ae70851 Fixed build 2019-01-15 15:25:34 +01:00
Marcin Grzejszczak
15e511251e Merge branch '2.0.x' 2019-01-15 15:16:38 +01:00
Marcin Grzejszczak
85e8e869b7 Ensures that we don't try to remove root element from json; fixes gh-844 2019-01-15 15:16:29 +01:00
Marcin Grzejszczak
4846e00014 Merge branch '2.0.x' 2019-01-15 14:59:10 +01:00
Marcin Grzejszczak
9d0f859f3d Fixed unnecessary escaping of strings; fixes gh-851 2019-01-15 14:58:55 +01:00
Marcin Grzejszczak
9d538b7393 Fixes folder names for generated tests
without this change the generated tests reference a package that is not actually resolved to a proper folder. That's because we're not escaping the folder name properly
with this change we ensure that all folders have good name

fixes gh-836
fixes gh-850
2019-01-14 20:19:01 +01:00
Spencer Gibb
4b028ea48a Bumps spring cloud build to 2.1.2.BUILD-SNAPSHOT 2019-01-12 12:58:47 -05:00
Marcin Grzejszczak
6de903368a Added support for additional configuration of HTTP Server stubs
without this change it's hard to add HTTPs support for the stubs ran by stub runner. It's close to impossible to alter the default configuration of HTTP server stubs at all (e.g. lower the logging level of WireMock stubs etc.)
    with this change we allow to pass a class as a property to stub runner either via annotation, JUnit rule / extension or just system properties. That way the configurer will be applied at runtime for WireMock stubs (implementors of custom HTTP server stubs will need to perform some additional work to allow this)

    fixes gh-742
2019-01-11 13:47:40 +01:00
Marcin Grzejszczak
66f7e9329e Updated docs; fixes gh-846 2019-01-10 16:50:48 +01:00
Marcin Grzejszczak
ea65ae3553 Added latest version support for git storage
without this change you always have to pass the concrete version for git based storage
with this change we support passing of a latests version

fixes gh-745
2019-01-10 16:04:32 +01:00
Marcin Grzejszczak
e12b0b74b6 Migrated the destination for Pact to meta-data 2019-01-08 15:08:51 +01:00
Stephan
70adb02ec9 Workaround for missing message destination in message-pacts: Description field is used. 2019-01-08 14:59:52 +01:00
Marcin Grzejszczak
7b0b264d4b Fixed the broken build 2019-01-07 20:35:21 +01:00
Marcin Grzejszczak
a4c423edee Merge branch '2.0.x' 2019-01-07 18:01:15 +01:00
Marcin Grzejszczak
16e5f1bd19 Fixed wrong sub-arrays isEmpty assertion; fixes gh-797 2019-01-07 17:58:44 +01:00
Marcin Grzejszczak
2fdb9901c5 Merge branch '2.0.x' 2019-01-04 17:26:36 +01:00
Marcin Grzejszczak
69d990f3a1 Added spring-boot-starter-web for stub runner boot
fixes gh-840
2019-01-04 17:26:19 +01:00