"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": {
},
"$.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": {
"generators": {
"$.href": {
"example": "http://localhost:8080/orders/1234",
- "regex": ".*\\/(\\Qorders\\E\\/\\Q1234\\E)$",
+ "regex": ".*\\/(\\Qorders\\E\\/\\d+)$",
"type": "MockServerURL"
}
},
"matchers": [
{
"match": "regex",
- "regex": ".*\\/(\\Qorders\\E\\/\\Q1234\\E)$"
- }
- ]
- },
- "$.method": {
- "combine": "AND",
- "matchers": [
- {
- "match": "type"
- }
- ]
- },
- "$.name": {
- "combine": "AND",
- "matchers": [
- {
- "match": "type"
+ "regex": ".*\\/(\\Qorders\\E\\/\\d+)$"
}
]
}
"generators": {
"$.href": {
"example": "http://localhost:8080/orders/1234",
- "regex": ".*\\/(\\Qorders\\E\\/\\Q1234\\E)$",
+ "regex": ".*\\/(\\Qorders\\E\\/\\d+)$",
"type": "MockServerURL"
}
},
"matchers": [
{
"match": "regex",
- "regex": ".*\\/(\\Qorders\\E\\/\\Q1234\\E)$"
- }
- ]
- },
- "$.method": {
- "combine": "AND",
- "matchers": [
- {
- "match": "type"
- }
- ]
- },
- "$.name": {
- "combine": "AND",
- "matchers": [
- {
- "match": "type"
+ "regex": ".*\\/(\\Qorders\\E\\/\\d+)$"
}
]
}
},
"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": {