Skip to content

Commit 070c15f

Browse files
committed
Update docs
1 parent a463d22 commit 070c15f

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

docs/add-new-api.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ Request definitions are slighly different from other definitions.
4444
It is required that the request definition is named `Request`.
4545
A request definition is an interface and should contains three top level keys:
4646

47+
- `urls`: the URL paths templates and allowed HTTP methods
4748
- `path_parts`: the path parameters (eg: `indices`, `id`...)
4849
- `query_parameters`: the query parameters (eg: `timeout`, `pipeline`...)
4950
- `body`: the body parameters (eg: `query` or user defined entities)
@@ -67,6 +68,12 @@ Following you can find a template valid for any request definition.
6768
* @availability stack since=1.2.3 stability=stable|beta|experimental
6869
*/
6970
interface Request extends RequestBase {
71+
urls: [
72+
{
73+
path: "/path/with/{parts}"
74+
methods: ["POST"]
75+
}
76+
]
7077
path_parts: {
7178

7279
}
@@ -86,6 +93,12 @@ In some cases, the request could take one or more generics, in such case the def
8693
* @availability stack since=1.2.3 stability=stable|beta|experimental
8794
*/
8895
interface Request<Generic> extends RequestBase {
96+
urls: [
97+
{
98+
path: "/path/with/{parts}"
99+
methods: ["POST"]
100+
}
101+
]
89102
path_parts: {
90103

91104
}

0 commit comments

Comments
 (0)