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
* 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`.
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
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
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