Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor example code snippet fixes #323

Merged
merged 3 commits into from
Dec 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading