Skip to content

Commit

Permalink
Updated README
Browse files Browse the repository at this point in the history
  • Loading branch information
jcdietrich committed Apr 16, 2024
1 parent 5cef129 commit 58eab2d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,9 @@ Mock definition:
"host": "example.com",
"method": "GET|POST|PUT|PATCH|...",
"path": "/your/path/:variable",
"pathVariables": {
"variable": "\\d*"
},
"queryStringParameters": {
"name": ["value"],
"name": ["value", "value"]
Expand Down Expand Up @@ -201,6 +204,7 @@ A core feature of Mmock is the ability to return canned HTTP responses for reque
* *host*: Request http host. (without port)
* *method*: Request http method. It allows more than one separated by pipes "|" **Mandatory**
* *path*: Resource identifier. It allows :value matching. **Mandatory**
* *pathVariables*: A map of path variables to regexp that they need to match against. { "value": "\\d*" }
* *queryStringParameters*: Array of query strings. It allows more than one value for the same key.
* *headers*: Array of headers. It allows more than one value for the same key. **Case sensitive!**
* *cookies*: Array of cookies.
Expand Down Expand Up @@ -228,6 +232,7 @@ Query strings and headers support also global matches (*) in the header/paramete
Regexp matching is available for:
- body
- query strings
- path variables

See https://pkg.go.dev/regexp/syntax for regexp syntax

Expand Down Expand Up @@ -627,6 +632,7 @@ You can always disable this behavior adding the following flag `-server-statisti
- Support Regular Expressions for Field Values in JSON Request Body thanks to [@rosspatil](https://github.com/rosspatil)
- Improved logging with levels thanks to [@jcdietrich](https://github.com/jcdietrich) [@jdietrich-tc](https://github.com/jdietrich-tc)
- Support for Regular Expressions for QueryStringParameters [@jcdietrich](https://github.com/jcdietrich) [@jdietrich-tc](https://github.com/jdietrich-tc)
- Support for Regular Expressions for Path Variables [@jcdietrich](https://github.com/jcdietrich) [@jdietrich-tc](https://github.com/jdietrich-tc)

### Contributing

Expand Down

0 comments on commit 58eab2d

Please sign in to comment.