Skip to content

Commit

Permalink
Merge pull request #110 from bavix/iao-docs
Browse files Browse the repository at this point in the history
[2.6] update docs
  • Loading branch information
rez1dent3 committed Jan 12, 2024
2 parents cb63e6f + 00f9afa commit 2ba4760
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 4 deletions.
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ This service is a fork of the service [tokopedia/gripmock](https://github.com/to
- Updated all deprecated dependencies [tokopedia#64](https://github.com/tokopedia/gripmock/issues/64);
- Add yaml as json alternative for static stab's;
- Add endpoint for healthcheck (/api/health/liveness, /api/health/readiness);
- Add feature ignoreArrayOrder [bavix#108](https://github.com/bavix/gripmock/issues/108);
- Add support headers [tokopedia#144](https://github.com/tokopedia/gripmock/issues/144);
- Add grpc error code [tokopedia#125](https://github.com/tokopedia/gripmock/issues/125);
- Added gzip encoding support for grpc server [tokopedia#134](https://github.com/tokopedia/gripmock/pull/134);
Expand Down Expand Up @@ -140,6 +141,24 @@ Nested fields are allowed for input matching too for all JSON data types. (`stri
<br>
**Gripmock** recursively goes over the fields and tries to match with given input.
<br>
**ignoreArrayOrder** Disables sorting check inside arrays.
```yaml
- service: MicroService
method: SayHello
input:
ignoreArrayOrder: true # disable sort checking
equals:
v1:
- {{ uuid2base64 "77465064-a0ce-48a3-b7e4-d50f88e55093" }}
- {{ uuid2base64 "99aebcf2-b56d-4923-9266-ab72bf5b9d0b" }}
- {{ uuid2base64 "5659bec5-dda5-4e87-bef4-e9e37c60eb1c" }}
- {{ uuid2base64 "ab0ed195-6ac5-4006-a98b-6978c6ed1c6b" }}
output:
data:
code: 1000
```
Without this flag, the order of the transmitted values is important to us.

**equals** will match the exact field name and value of input into expected stub. example stub JSON:
```json
{
Expand Down
11 changes: 7 additions & 4 deletions docs/_sidebar.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,11 @@

[//]: # ( - [Purge stubs]&#40;sdk-stubs-purge&#41;)

- Specs
- [stub server](specs-stub-server)
- [protoc-gen-gripmock](specs-protoc-gen-gripmock)
- [protogen](specs-protogen)
[//]: # (- Specs)

[//]: # ( - [stub server]&#40;specs-stub-server&#41;)

[//]: # ( - [protoc-gen-gripmock]&#40;specs-protoc-gen-gripmock&#41;)

[//]: # ( - [protogen]&#40;specs-protogen&#41;)

19 changes: 19 additions & 0 deletions docs/matching-rule-input.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,25 @@ Nested fields are allowed for input matching too for all JSON data types. (`stri
<br>
**Gripmock** recursively goes over the fields and tries to match with given input.
<br>

**ignoreArrayOrder** Disables sorting check inside arrays.
```yaml
- service: MicroService
method: SayHello
input:
ignoreArrayOrder: true # disable sort checking
equals:
v1:
- {{ uuid2base64 "77465064-a0ce-48a3-b7e4-d50f88e55093" }}
- {{ uuid2base64 "99aebcf2-b56d-4923-9266-ab72bf5b9d0b" }}
- {{ uuid2base64 "5659bec5-dda5-4e87-bef4-e9e37c60eb1c" }}
- {{ uuid2base64 "ab0ed195-6ac5-4006-a98b-6978c6ed1c6b" }}
output:
data:
code: 1000
```
Without this flag, the order of the transmitted values is important to us.

**equals** will match the exact field name and value of input into expected stub. example stub JSON:
```json
{
Expand Down

0 comments on commit 2ba4760

Please sign in to comment.