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 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
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
Allow an option to dump contracts as files for the given ContractConverter. In other words, if you have contracts written in e,g, groovy and yml, by providing a FQN of org.springframework.cloud.contract.verifier.converter.YamlContractConverter, you will be able to dump all files in a folder in a yml format.
fixes gh-793