X-Git-Url: https://juplo.de/gitweb/?a=blobdiff_plain;f=spring-consumer%2Ftarget%2Fpacts%2FSpringConsumer-Siren%20Order%20Provider.json;h=ac6731a86dbadfd0f799f5ae876f4d31e18e22ba;hb=e501ce1146a39908c7b9b93869552fc6c6c88812;hp=323956d6c19eb4ffabcd84dfc4e7d2875e2d8b53;hpb=22c9dfa1b5034c66dcce3dbbb74551c40cdb2e03;p=demos%2Fexample-siren diff --git a/spring-consumer/target/pacts/SpringConsumer-Siren Order Provider.json b/spring-consumer/target/pacts/SpringConsumer-Siren Order Provider.json index 323956d..ac6731a 100644 --- a/spring-consumer/target/pacts/SpringConsumer-Siren Order Provider.json +++ b/spring-consumer/target/pacts/SpringConsumer-Siren Order Provider.json @@ -11,24 +11,80 @@ }, "response": { "body": { + "actions": [ + { + "href": "http://localhost:8080/1234", + "method": "PUT", + "name": "update" + } + ], + "entities": [ + ] }, - "headers": { - "Content-Type": "application/vnd.siren+json" + "generators": { + "body": { + "$[0].href": { + "example": "http://localhost:8080/1234", + "regex": ".*\\/(\\Q1234\\E)$", + "type": "MockServerURL" + } + } }, - "status": 200 - } - }, - { - "description": "get root", - "request": { - "method": "GET", - "path": "/" - }, - "response": { "headers": { "Content-Type": "application/vnd.siren+json" }, + "matchingRules": { + "body": { + "$.actions": { + "combine": "AND", + "matchers": [ + { + "match": "arrayContains", + "variants": [ + { + "generators": { + "$.href": { + "example": "http://localhost:8080/1234", + "regex": ".*\\/(\\Q1234\\E)$", + "type": "MockServerURL" + } + }, + "index": 0, + "rules": { + "$.href": { + "combine": "AND", + "matchers": [ + { + "match": "regex", + "regex": ".*\\/(\\Q1234\\E)$" + } + ] + }, + "$.method": { + "combine": "AND", + "matchers": [ + { + "match": "type" + } + ] + }, + "$.name": { + "combine": "AND", + "matchers": [ + { + "match": "type" + } + ] + } + } + } + ] + } + ] + } + } + }, "status": 200 } }