X-Git-Url: http://juplo.de/gitweb/?a=blobdiff_plain;f=spring-consumer%2Ftarget%2Fpacts%2FSpringConsumer-SirenOrderProvider.json;h=a8f8b03d80852e55e0e79ed459465cabafc94694;hb=refs%2Fheads%2Fmaster;hp=1d1fbd35e2962d1c5f147fc0e972d6a4403ab90f;hpb=2faa2b692bd69773d5d60299b835de06c999991d;p=demos%2Fexample-siren diff --git a/spring-consumer/target/pacts/SpringConsumer-SirenOrderProvider.json b/spring-consumer/target/pacts/SpringConsumer-SirenOrderProvider.json index 1d1fbd3..a8f8b03 100644 --- a/spring-consumer/target/pacts/SpringConsumer-SirenOrderProvider.json +++ b/spring-consumer/target/pacts/SpringConsumer-SirenOrderProvider.json @@ -3,6 +3,27 @@ "name": "SpringConsumer" }, "interactions": [ + { + "description": "delete order", + "request": { + "matchingRules": { + "path": { + "combine": "AND", + "matchers": [ + { + "match": "regex", + "regex": "/orders/\\d+" + } + ] + } + }, + "method": "DELETE", + "path": "/orders/1234" + }, + "response": { + "status": 200 + } + }, { "description": "get all orders", "request": { @@ -65,12 +86,12 @@ }, "$.entities[*][0].href": { "example": "http://localhost:8080/orders/1234", - "regex": ".*\\/(\\Qorders\\E\\/\\Q1234\\E)$", + "regex": ".*\\/(\\Qorders\\E\\/\\d+)$", "type": "MockServerURL" }, "$.entities[*][1].href": { "example": "http://localhost:8080/orders/1234", - "regex": ".*\\/(\\Qorders\\E\\/\\Q1234\\E)$", + "regex": ".*\\/(\\Qorders\\E\\/\\d+)$", "type": "MockServerURL" }, "$.links[0].href": { @@ -103,7 +124,7 @@ "generators": { "$.href": { "example": "http://localhost:8080/orders/1234", - "regex": ".*\\/(\\Qorders\\E\\/\\Q1234\\E)$", + "regex": ".*\\/(\\Qorders\\E\\/\\d+)$", "type": "MockServerURL" } }, @@ -114,23 +135,7 @@ "matchers": [ { "match": "regex", - "regex": ".*\\/(\\Qorders\\E\\/\\Q1234\\E)$" - } - ] - }, - "$.method": { - "combine": "AND", - "matchers": [ - { - "match": "type" - } - ] - }, - "$.name": { - "combine": "AND", - "matchers": [ - { - "match": "type" + "regex": ".*\\/(\\Qorders\\E\\/\\d+)$" } ] } @@ -140,7 +145,7 @@ "generators": { "$.href": { "example": "http://localhost:8080/orders/1234", - "regex": ".*\\/(\\Qorders\\E\\/\\Q1234\\E)$", + "regex": ".*\\/(\\Qorders\\E\\/\\d+)$", "type": "MockServerURL" } }, @@ -151,23 +156,7 @@ "matchers": [ { "match": "regex", - "regex": ".*\\/(\\Qorders\\E\\/\\Q1234\\E)$" - } - ] - }, - "$.method": { - "combine": "AND", - "matchers": [ - { - "match": "type" - } - ] - }, - "$.name": { - "combine": "AND", - "matchers": [ - { - "match": "type" + "regex": ".*\\/(\\Qorders\\E\\/\\d+)$" } ] } @@ -207,6 +196,54 @@ }, "status": 200 } + }, + { + "description": "get root", + "request": { + "method": "GET", + "path": "/" + }, + "response": { + "body": { + "class": [ + "representation" + ], + "links": [ + { + "href": "http://localhost:8080/orders", + "rel": [ + "orders" + ] + } + ] + }, + "generators": { + "body": { + "$.links[0].href": { + "example": "http://localhost:8080/orders", + "regex": ".*\\/(\\Qorders\\E)$", + "type": "MockServerURL" + } + } + }, + "headers": { + "Content-Type": "application/vnd.siren+json" + }, + "matchingRules": { + "body": { + "$.links[0].href": { + "combine": "AND", + "matchers": [ + { + "match": "regex", + "regex": ".*\\/(\\Qorders\\E)$" + } + ] + } + } + }, + "status": 200 + } } ], "metadata": {