Commit Graph

2189 Commits

Author SHA1 Message Date
Marcin Grzejszczak
33c4c2a89d Trying to make the docs look nicer 2018-04-02 23:58:12 +02:00
Marcin Grzejszczak
9fe8362c89 Removed the explicit setting of pact-jvm-model 2018-04-02 23:43:35 +02:00
Marcin Grzejszczak
cd665420b2 Merge branch '1.2.x' 2018-04-02 23:27:30 +02:00
Marcin Grzejszczak
8c87ed16bf Added docker modules in deploy profile 2018-04-02 23:27:21 +02:00
Marcin Grzejszczak
6402e14f3c Added support for Stub Runner and Pact Broker
fixes gh-191
commit 533f1d3d0e8f6dcd37677bfef555fc2ea86bc1b1
Author: Tim Ysewyn <Tim.Ysewyn@me.com>
Date:   Wed Mar 7 15:56:48 2018 +0100

    Upgraded pact-jvm-model to 3.5.13
2018-04-02 22:50:40 +02:00
Tim Ysewyn
de529e222e Support for Pact v3 (#569)
* Upgraded pact-jvm-model to 3.5.13
* Enhanced the conversion of Spring Cloud contracts to Pact contracts using the v3 spec.
Introduces breaking change returning a list of `Pact`s instead of one.
* Enhanced the conversion of Pact contracts using the v3 spec tp Spring Cloud contracts.
* Implemented conversion of Pact v3 messaging to/from Spring Cloud contracts
* Updated code based on comments in the PR
* Added null matcher
* Added missing null matcher conversion from SCC to Pact
* Added number, integer and decimal matchers
* Added support for multiple matchers for the same json path.
Currently only the AND rule logic is supported.
* Added value generator functionality
* Refactored `stubMatchers` and `testMatchers` to support multiple types of "matcher groups", eg. header, path & query
* Refactored e37a8c5d82f96da6e1a698331afc62e6cf747bd6 in favor of a less invasive change using deprecation
* Added header matcher conversion
* Add/updated the ASF license header
* Fixed an issue with the header matchers while updating the documentation
* Updated the documentation
* Made some last minute changes to the `bodyMatchers`: `byNull()` isn't supported by WireMock

Closes #583
Fixes #595
2018-04-02 22:06:51 +02:00
Marcin Grzejszczak
ff8fd0a16c Added props to @AutoConfigureStubRunner 2018-04-01 15:45:32 +02:00
Marcin Grzejszczak
ea0409060d Merge branch '1.2.x' 2018-03-31 18:46:19 +02:00
Marcin Grzejszczak
625780615c Bump remaining wiremock versions 2018-03-31 18:46:05 +02:00
Marcin Grzejszczak
84a7cff1c6 Merge branch '1.2.x' 2018-03-31 18:45:27 +02:00
Marcin Grzejszczak
9aa1eab483 Bumped wiremock to 2.16.0; fixes gh-600 2018-03-31 18:43:39 +02:00
Marcin Grzejszczak
0084058078 Fixed the env var / sys prop setting 2018-03-31 17:58:45 +02:00
Marcin Grzejszczak
87daa9890f Fixed the env var / sys prop setting 2018-03-31 17:53:41 +02:00
Marcin Grzejszczak
b238a3e835 Added logging messages 2018-03-31 17:41:30 +02:00
Marcin Grzejszczak
c36c630412 Trying to fix the build 2018-03-31 17:29:47 +02:00
Marcin Grzejszczak
0fe31ce3a5 Git Stub Downloader (#596)
when stubsMode is set to LOCAL or REMOTE, and repositoryRoot starts with git:// we can clone the provided git repository, and search for the folder with stubs for the given artifact. So if the git repo has a folder structure of groupid/artifactid/version (where group id is either dot or slash separated), then we will provide a path to that repository for the stub runner to harvest the stubs

- externalized versions
- added more debugging messages
- added ContractProjectUpdater that updates the project containing contracts from SCM. ATM supports only git
- added ResourceResolver that retrieves the ProtocolResolvers. It does it via spring.factories entries containing StubDownloaderBuilder. SDP extends ProtocolResovler.
added StubRunner.properties map, that will contain any properties that will be later used by any StubDownloader implementations
- added PUBLISH_STUBS_TO_SCM env var for Docker, so that publishStubsToScm task gets called
- updated docs

Breaking:

- StubDownloaderBuilder extends ProtocolResovler. By default the ProtocolResolver methods return null.
- stubRunnerOptions.stubRepositoryRoot is a Resource not a String
- generateWireMockClientStubs Gradle task got removed
- if folder with contracts has a subfolder called contracts, we will pick contracts from the subfolder

fixes #580
2018-03-31 09:35:00 +02:00
buildmaster
766cd59f64 Bumping versions to 1.2.5.BUILD-SNAPSHOT after release 2018-03-27 00:44:45 +00:00
buildmaster
ce62f7f77a Going back to snapshots 2018-03-27 00:44:43 +00:00
buildmaster
71061a7d7f Update SNAPSHOT to 1.2.4.RELEASE 2018-03-27 00:33:17 +00:00
Marcin Grzejszczak
1e0ea34c91 Parametrized and bumped rest assured; fixes gh-597
(cherry picked from commit f6a8f49)
2018-03-25 13:16:16 +02:00
Axel Hodler
663e1929d8 Extend matchers (#598)
* Added anyHttpsUrl DslProperty

* Added anyPositiveInt DslProperty
2018-03-25 13:03:59 +02:00
Marcin Grzejszczak
f6a8f49795 Parametrized and bumped rest assured; fixes gh-597 2018-03-25 11:13:15 +02:00
Marcin Grzejszczak
01e682044c Iterate over stub runner downloader builders
with this change we try to retrieve a list of builders of stub runner downloaders. The idea is that if a builder can't build a stub runner downloader, it returns null. If a stub runner downloader can't download an artifact it returns null. That way we can iterate over builders and try to point to unpacked stubs when applicable. No longer do we pick only one applicatble builder. We pick the first matching one.
2018-03-23 10:47:50 +01:00
buildmaster
b9740e900d Going back to snapshots 2018-03-22 23:54:47 +00:00
buildmaster
501fefd389 Update SNAPSHOT to 2.0.0.M8 2018-03-22 23:52:03 +00:00
Marcin Grzejszczak
63e32fdf1f Added UrlResource support for WireMock config; fixes gh-591 2018-03-22 11:14:30 +01:00
Devon D'Apuzzo
1f51191327 Make headers matches in generated jUnit code escape regex '\'s. (#592)
+ Update tests to reflect desired behavior.
2018-03-21 20:49:14 +01:00
Marcin Grzejszczak
811a28deb1 Added documentation with a explicit mode sample and web app context sample; fixes gh-370 2018-03-21 16:26:42 +01:00
Marcin Grzejszczak
00eed691fd Merge branch '1.2.x' 2018-03-21 16:03:57 +01:00
Marcin Grzejszczak
841a7bdfca Added a test for regular expressions in wiremock stubs; fixes gh-449 2018-03-21 16:03:49 +01:00
Marcin Grzejszczak
419c2d1b85 Added missing additional spring configuration; fixes gh-566 2018-03-21 15:41:56 +01:00
Marcin Grzejszczak
a4e79d380f Fixed accidentally pasted code 2018-03-21 15:17:54 +01:00
Marcin Grzejszczak
736f56a93b Added tests for optional fields with nulls 2018-03-21 15:00:39 +01:00
Marcin Grzejszczak
297ee8e2ea Changed the Groovy equals & hashcode usage to manual one
there's a bug in Groovy with autogenerated hashCode and byte arrays
to fix it we've migrated from the AST to manual hashcode and equals generation

fixes gh-546
2018-03-21 14:03:06 +01:00
Marcin Grzejszczak
0078230492 Merge branch '1.2.x' 2018-03-21 11:35:42 +01:00
Marcin Grzejszczak
4e08f77996 escapes all generated strings by Xeger so that the code is java compatible
related to gh-589

fixes gh-588
2018-03-21 11:35:29 +01:00
Marcin Grzejszczak
f70c1dbfdd Added support for patterns inside GStrings in URL
related to gh-589

fixes gh-588
2018-03-21 10:54:24 +01:00
Marcin Grzejszczak
cd07f6d42b Xeger can cause stackoverflow and doesn't understand \d \w \s
fixes gh-589, fixes gh-590
2018-03-21 10:53:30 +01:00
Marcin Grzejszczak
561c2d30ec Merge branch '1.2.x' 2018-03-21 09:14:07 +01:00
Marcin Grzejszczak
f57cefc68a Ensured that regular expressions are generated properly; fixes gh-587 2018-03-21 09:13:19 +01:00
mfeygelson
4d72a2744e Support pattern properties in messaging contracts (#564)
(cherry picked from commit c4ab647)
2018-03-21 08:29:40 +01:00
Marcin Grzejszczak
18d0827fa7 Merge branch '1.2.x' 2018-03-20 21:14:22 +01:00
Marcin Grzejszczak
67019774e1 Fixed missing conversion of messaging patterns to java
without this change patterns were not escaped the way they should

fixes gh-587
2018-03-20 21:08:24 +01:00
Marcin Grzejszczak
b70106e7bc Merge branch '1.2.x' 2018-03-20 14:17:20 +01:00
Marcin Grzejszczak
c7250a8d62 Added support for RoutingKey in AMQP stub messages
fixed via @KazuoD suggestion

fixes gh-585
2018-03-20 14:17:05 +01:00
Marcin Grzejszczak
5476e1d127 Allow parametrization of generated contract names
with this change we accept all the placeholder values that are acceptible by RestDocs

fixes gh-452
2018-03-20 11:38:49 +01:00
Marcin Grzejszczak
8a9527b600 Fixed the docs 2018-03-19 16:34:38 +01:00
Marcin Grzejszczak
54cff1f19c Merge branch '1.2.x' 2018-03-19 16:33:29 +01:00
Marcin Grzejszczak
8ad4865fb5 Fixed the docs 2018-03-19 16:33:22 +01:00
Marcin Grzejszczak
60d45b5ad3 Merge branch '1.2.x' 2018-03-19 16:32:15 +01:00