X-Git-Url: https://juplo.de/gitweb/?a=blobdiff_plain;f=spring-consumer%2Ftarget%2Fpacts%2FSpringConsumer-Siren%20Order%20Provider.json;h=ae1e66d08675c1df91e5b2efa86678f6a11f9147;hb=d9dcdbe4ecf53103212af0045ea8599f90a4e45e;hp=1b6384744614285c323c6bda6c2a493fe70a41ae;hpb=c4518c1bc18bcd594fe1a2b79be399877ce1c9b5;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 1b63847..ae1e66d 100644 --- a/spring-consumer/target/pacts/SpringConsumer-Siren Order Provider.json +++ b/spring-consumer/target/pacts/SpringConsumer-Siren Order Provider.json @@ -13,15 +13,47 @@ "body": { "actions": [ { - "foo": "string" + "href": "http://localhost:8080/1234", + "method": "PUT", + "name": "update" + }, + { + "href": "http://localhost:8080/1234", + "method": "DELETE", + "name": "delete" + } + ], + "class": [ + "entity" + ], + "entities": [ + + ], + "links": [ + { + "href": "http://localhost:8080/orders", + "rel": [ + "self" + ] } ] }, "generators": { "body": { - "$[0].foo": { - "size": 20, - "type": "RandomString" + "$.links[0].href": { + "example": "http://localhost:8080/orders", + "regex": ".*\\/(\\Qorders\\E)$", + "type": "MockServerURL" + }, + "$[0].href": { + "example": "http://localhost:8080/1234", + "regex": ".*\\/(\\Q1234\\E)$", + "type": "MockServerURL" + }, + "$[1].href": { + "example": "http://localhost:8080/1234", + "regex": ".*\\/(\\Q1234\\E)$", + "type": "MockServerURL" } } }, @@ -38,14 +70,69 @@ "variants": [ { "generators": { - "$.foo": { - "size": 20, - "type": "RandomString" + "$.href": { + "example": "http://localhost:8080/1234", + "regex": ".*\\/(\\Q1234\\E)$", + "type": "MockServerURL" } }, "index": 0, "rules": { - "$.foo": { + "$.href": { + "combine": "AND", + "matchers": [ + { + "match": "regex", + "regex": ".*\\/(\\Q1234\\E)$" + } + ] + }, + "$.method": { + "combine": "AND", + "matchers": [ + { + "match": "type" + } + ] + }, + "$.name": { + "combine": "AND", + "matchers": [ + { + "match": "type" + } + ] + } + } + }, + { + "generators": { + "$.href": { + "example": "http://localhost:8080/1234", + "regex": ".*\\/(\\Q1234\\E)$", + "type": "MockServerURL" + } + }, + "index": 1, + "rules": { + "$.href": { + "combine": "AND", + "matchers": [ + { + "match": "regex", + "regex": ".*\\/(\\Q1234\\E)$" + } + ] + }, + "$.method": { + "combine": "AND", + "matchers": [ + { + "match": "type" + } + ] + }, + "$.name": { "combine": "AND", "matchers": [ { @@ -58,24 +145,20 @@ ] } ] + }, + "$.links[0].href": { + "combine": "AND", + "matchers": [ + { + "match": "regex", + "regex": ".*\\/(\\Qorders\\E)$" + } + ] } } }, "status": 200 } - }, - { - "description": "get root", - "request": { - "method": "GET", - "path": "/" - }, - "response": { - "headers": { - "Content-Type": "application/vnd.siren+json" - }, - "status": 200 - } } ], "metadata": {