Commit Graph

649 Commits

Author SHA1 Message Date
Marcin Grzejszczak
036bb73c73 Merge branch '2.1.x' 2019-03-22 12:42:10 +01:00
Marcin Grzejszczak
74e65ec724 License 2019-03-22 12:42:00 +01:00
Marcin Grzejszczak
39be0aef0e Merge branch '2.1.x' 2019-03-22 11:42:28 +01:00
Marcin Grzejszczak
55a0ae86c5 Fixed https 2019-03-22 11:41:20 +01:00
Marcin Grzejszczak
5fe9299461 Fixed checkstyle 2019-03-11 19:56:09 +01:00
Marcin Grzejszczak
fbea35edf4 Hoxton 2019-03-08 17:07:28 +01:00
buildmaster
029312f814 Bumping versions to 2.1.2.BUILD-SNAPSHOT after release 2019-03-05 20:30:55 +00:00
buildmaster
73c0122a79 Going back to snapshots 2019-03-05 20:30:54 +00:00
buildmaster
be3dd56cd8 Update SNAPSHOT to 2.1.1.RELEASE 2019-03-05 20:21:45 +00:00
Marcin Grzejszczak
9c62f3bd82 Merge branch '2.0.x' 2019-02-26 15:03:54 +01:00
Marcin Grzejszczak
6d3877fe8c Allows localhost to be there in the URL pattern; fixes gh-896 2019-02-26 12:17:42 +01:00
buildmaster
0b77c0d704 Bumping versions to 2.0.4.BUILD-SNAPSHOT after release 2019-02-22 20:47:28 +00:00
buildmaster
3db5ceca54 Going back to snapshots 2019-02-22 20:47:27 +00:00
buildmaster
8d5a771683 Update SNAPSHOT to 2.0.3.RELEASE 2019-02-22 20:38:31 +00:00
Marcin Grzejszczak
dfb3202dd1 Ensures that non-transactional channel is an option for AmqpStubMessages; fixes gh-859 2019-02-21 15:46:11 +01:00
Marcin Grzejszczak
dc9a6589e1 Fixed escaping of headers; fixes gh-892 2019-02-19 14:56:33 +01:00
Olga Maciaszek-Sharma
d9a3762ab2 Merge remote-tracking branch 'origin/master'
# Conflicts:
#	spring-cloud-contract-verifier/src/main/groovy/org/springframework/cloud/contract/verifier/util/ContentUtils.groovy
#	spring-cloud-contract-verifier/src/test/groovy/org/springframework/cloud/contract/verifier/util/ContentUtilsSpec.groovy
2019-02-13 13:27:55 +01:00
Olga Maciaszek-Sharma
60dd61e332 Merge branch '2.0.x'
# Conflicts:
#	docker/spring-cloud-contract-docker/Dockerfile
#	docker/spring-cloud-contract-stub-runner-docker/Dockerfile
#	spring-cloud-contract-verifier/src/main/groovy/org/springframework/cloud/contract/verifier/util/ContentUtils.groovy
2019-02-13 13:23:31 +01:00
Olga Maciaszek-Sharma
431dd7aabb Minor refactoring. 2019-02-13 13:16:57 +01:00
konstantinshevchuk
59954d1da0 Default handler for XmlSlurper (#879)
* Default handler for XmlSlurper
2019-02-13 13:02:05 +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
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
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
8ebc749d2f Fixed the way regex entries are generated for message bodies; fixes gh-858 2019-01-22 09:14:08 +01:00
Marcin Grzejszczak
38b1ebae2f Added a test case for message and regex; fixes gh-858 2019-01-22 08:44:51 +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
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
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
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
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
56fbc11f62 Allows passing of regex type (#832)
without this change if one does $(regex("[0-9]")) we have no knowledge of whether the result should be text or a number. What we do ATM is we always generate a String
with this change once can pass the type of regular expression and we will generate the concrete value of that given type

fixes gh-768
2018-12-28 16:29:32 +01:00
Marcin Grzejszczak
58bf533462 Fixed invalid yaml contract name setting 2018-12-27 11:54:51 +01:00
Marcin Grzejszczak
59e5f8b1eb Convert Contract Definitions to YAML (#827)
without this change, if you're using some external libraries and you reference them in your DSL, those libraries need to also be used on the consumer side.

with this change, you can set the contractsToYaml property of the plugin, that will convert the contract definitions into YAML, and then generate tests and stubs. We will store the original contract definitions under the originals folder.

fixes #744
2018-12-27 11:14:31 +01:00
buildmaster
e6640350bc Going back to snapshots 2018-12-20 21:43:00 +00:00
buildmaster
f47d0d3406 Update SNAPSHOT to 2.1.0.RC3 2018-12-20 21:37:41 +00:00
Marcin Grzejszczak
9c7c896115 Assert size of collections on the request side; fixes gh-824 2018-12-20 14:53:38 +01:00