Skip to content

Commit

Permalink
Merge pull request #323 from picimako/documentation-fixes
Browse files Browse the repository at this point in the history
Minor example code snippet fixes
  • Loading branch information
leeturner authored Dec 27, 2024
2 parents 541eb3a + 6d5aa0c commit d373da0
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 16 deletions.
17 changes: 8 additions & 9 deletions _docs/request-matching.md
Original file line number Diff line number Diff line change
Expand Up @@ -241,8 +241,7 @@ JSON:
{
"request": {
"urlPathTemplate": "/contacts/{contactId}/addresses/{addressId}"
"method" : "GET",

"method" : "GET"
},
"response" : {
"status" : 200
Expand Down Expand Up @@ -1682,11 +1681,11 @@ stubFor(get(urlPathEqualTo("/things"))

```java
// There must be 3 values of id exactly whose values conform to the match expressions
stubFor(get(urlPathEqualTo("/things"))
stubFor(get(urlPathEqualTo("/things"))
.withQueryParam("id", havingExactly(
equalTo("1"),
containing("2"),
notContaining("3")
equalTo("1"),
containing("2"),
notContaining("3")
)).willReturn(ok()));
```

Expand Down Expand Up @@ -1761,9 +1760,9 @@ stubFor(get(urlPathEqualTo("/things"))
//values of id must conform to the match expressions
stubFor(get(urlPathEqualTo("/things"))
.withQueryParam("id", including(
equalTo("1"),
containing("2"),
notContaining("3")
equalTo("1"),
containing("2"),
notContaining("3")
)).willReturn(ok()));
```

Expand Down
14 changes: 7 additions & 7 deletions _docs/response-templating.md
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ The input XML can alternatively be supplied inline, or as a variable:
{% raw %}

```handlebars
{{formatXml '{"foo":true,"bar":{"baz":false}}'}}
{{formatXml ' <foo> <bar>wh</bar> </foo> '}}
{{#assign 'someXml'}} <foo> <bar>wh</bar> </foo> {{/assign}}
{{formatXml someXml format='compact'}}
Expand Down Expand Up @@ -807,25 +807,25 @@ Given these two objects:

```handlebars
{{#assign 'object1'}}
{
{
"id": 456,
"forename": "Robert",
"surname": "Smith",
"address": {
"number": "12"
"number": "12"
},
"hobbies": [ "chess", "football" ]
}
}
{{/assign}}
{{#assign 'object2'}}
{
{
"forename": "Robert",
"nickname": "Bob",
"address": {
"street": "High Street"
"street": "High Street"
},
"hobbies": [ "rugby" ]
}
}
{{/assign}}
```

Expand Down

0 comments on commit d373da0

Please sign in to comment.