Skip to content

Commit

Permalink
fixes #908 API Aggregation cookbook examples (#909)
Browse files Browse the repository at this point in the history
  • Loading branch information
grootpiano committed Jan 28, 2023
1 parent 9bdd365 commit bdcf93d
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions doc/cookbook/api-aggregation.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,12 @@ filters:
kind: ResponseBuilder
template: |
statusCode: 200
body: "[{{.responses.demo1.Body}}, {{.responses.demo2.Body}}, {{.responses.demo3.Body}}]"
body: |
[{{.responses.demo1.Body}}, {{.responses.demo2.Body}}, {{.responses.demo3.Body}}]
' | egctl object create
```

1. Creating an HTTPServer for forwarding the traffic to this pipeline.
2. Creating an HTTPServer for forwarding the traffic to this pipeline.

``` bash
echo '
Expand Down Expand Up @@ -147,7 +148,8 @@ filters:
kind: ResponseBuilder
template: |
statusCode: 200
body: "{{mergeObject .responses.demo1.JSONBody .responses.demo2.JSONBody .responses.demo3.JSONBody | toRawJson}}"
body: |
{{mergeObject .responses.demo1.JSONBody .responses.demo2.JSONBody .responses.demo3.JSONBody | toRawJson}}
' | egctl object update
```

Expand Down Expand Up @@ -181,6 +183,8 @@ flow:
namespace: demo3
- filter: proxy-demo1
namespace: demo1
jumpIf:
serverError: "proxy-demo2"
- filter: proxy-demo2
namespace: demo2
- filter: proxy-demo3
Expand Down

0 comments on commit bdcf93d

Please sign in to comment.