Skip to content

Commit a96179a

Browse files
fix: generate new README using docgen
1 parent 2bd1585 commit a96179a

File tree

16 files changed

+413
-222
lines changed

16 files changed

+413
-222
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ version: 2.1
44
setup: true
55

66
orbs:
7-
gravitee: gravitee-io/gravitee@4.12.1
7+
gravitee: gravitee-io/gravitee@4.14.1
88

99
# our single workflow, that triggers the setup job defined above, filters on tag and branches are needed otherwise
1010
# some workflow and job will not be triggered for tags (default CircleCI behavior)

.docgen/before-gateway-options.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
### System proxy
2+
3+
If the option `useSystemProxy` is checked, proxy information will be read from `JVM_OPTS`, or from the `gravitee.yml` file if `JVM_OPTS` is not set.
4+
5+
For example:

.docgen/errors.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
rows:
2+
- data:
3+
key: "CALLOUT_EXIT_ON_ERROR"
4+
- data:
5+
key: "CALLOUT_HTTP_ERROR"

.docgen/examples.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
genExamples: []
2+
3+
rawExamples:
4+
- title: API with basic callout
5+
templateRef: v4-api-proxy
6+
language: json
7+
properties:
8+
phase: request
9+
file: .docgen/examples/callout.json
10+
- title: API CRD with basic callout
11+
templateRef: v4-api-crd-proxy
12+
language: yaml
13+
properties:
14+
phase: request
15+
file: .docgen/examples/callout.yaml

.docgen/examples/callout.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"method": "GET",
3+
"url": "https://api.gravitee.io/echo",
4+
"headers": [
5+
{
6+
"name": "X-Gravitee-Request-Id",
7+
"value": "{#request.id}"
8+
}
9+
],
10+
"variables": [
11+
{
12+
"name": "my-server",
13+
"value": "{#jsonPath(#calloutResponse.content, '$.headers.X-Forwarded-Server')}"
14+
}
15+
],
16+
"exitOnError": true
17+
}

.docgen/examples/callout.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
method: GET
2+
url: https://api.gravitee.io/echo
3+
headers:
4+
- name: X-Gravitee-Request-Id
5+
value: "{#request.id}"
6+
variables:
7+
- name: my-server
8+
value: "{#jsonPath(#calloutResponse.content, '$.headers.X-Forwarded-Server')}"
9+
exitOnError: true

.docgen/gateway-config.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
before: .docgen/before-gateway-options.md
2+
snippets:
3+
- title: "gravitee.yml"
4+
description: Gateway level configuration of the http client
5+
language: YAML
6+
content: >-
7+
system:
8+
proxy:
9+
type: HTTP # HTTP, SOCK4, SOCK5
10+
host: localhost
11+
port: 3128
12+
username: user
13+
password: secret

.docgen/matrix.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
rows:
2+
- data:
3+
plugin: 4.x
4+
apim: 4.4.x to latest
5+
- data:
6+
plugin: 3.x
7+
apim: 4.0.x to 4.3.x
8+
- data:
9+
plugin: 2.x
10+
apim: 3.18.x to 3.20.x
11+
deprecated: true
12+
- data:
13+
plugin: 1.15.x and upper
14+
apim: 3.15.x to 3.17.x
15+
deprecated: true
16+
- data:
17+
plugin: 1.13.x to 1.14.x
18+
apim: 3.10.x to 3.14.x
19+
deprecated: true
20+
- data:
21+
plugin: Up to 1.12.x
22+
apim: Up to 3.9.x
23+
deprecated: true

.docgen/overview.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
You can use the `callout-http` policy to invoke an HTTP(S) URL and place a subset, or all, of the content in
2+
one or more variables of the request execution context.
3+
4+
This can be useful if you need some data from an external service and want to inject it during request
5+
processing.
6+
7+
The result of the callout is placed in a variable called `calloutResponse` and is only available during policy
8+
execution. If no variable is configured the result of the callout is no longer available.
9+

.github/CODEOWNERS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
# Default
22
* @gravitee-io/apim @gravitee-io/am
3+
/.docgen/ @gravitee-io/tech-writers
4+
/docs/ @gravitee-io/tech-writers
5+
README.md @gravitee-io/tech-writers

0 commit comments

Comments
 (0)