Skip to content

Commit fdd8c0e

Browse files
committed
Add json specs; rename value -> values
1 parent 58a8900 commit fdd8c0e

File tree

6 files changed

+139
-2
lines changed

6 files changed

+139
-2
lines changed

output/typescript/types.ts

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"query_ruleset.delete": {
3+
"documentation": {
4+
"url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-query-ruleset.html",
5+
"description": "Deletes a query ruleset."
6+
},
7+
"stability": "experimental",
8+
"visibility": "public",
9+
"headers": {
10+
"accept": [
11+
"application/json"
12+
]
13+
},
14+
"url": {
15+
"paths": [
16+
{
17+
"path": "/_query_rules/{ruleset_id}",
18+
"methods": [
19+
"DELETE"
20+
],
21+
"parts": {
22+
"ruleset_id": {
23+
"type": "string",
24+
"description": "The unique identifier of the query ruleset to delete"
25+
}
26+
}
27+
}
28+
]
29+
}
30+
}
31+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"query_ruleset.get": {
3+
"documentation": {
4+
"url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/get-query-ruleset.html",
5+
"description": "Returns the details about a query ruleset."
6+
},
7+
"stability": "experimental",
8+
"visibility": "public",
9+
"headers": {
10+
"accept": [
11+
"application/json"
12+
]
13+
},
14+
"url": {
15+
"paths": [
16+
{
17+
"path": "/_query_rules/{ruleset_id}",
18+
"methods": [
19+
"GET"
20+
],
21+
"parts": {
22+
"ruleset_id": {
23+
"type": "string",
24+
"description": "The unique identifier of the query ruleset"
25+
}
26+
}
27+
}
28+
]
29+
}
30+
}
31+
}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
"query_ruleset.list": {
3+
"documentation": {
4+
"url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/list-query-rulesets.html",
5+
"description": "Lists query rulesets."
6+
},
7+
"stability": "experimental",
8+
"visibility": "public",
9+
"headers": {
10+
"accept": [
11+
"application/json"
12+
]
13+
},
14+
"url": {
15+
"paths": [
16+
{
17+
"path": "/_query_rules",
18+
"methods": [
19+
"GET"
20+
]
21+
}
22+
]
23+
},
24+
"params": {
25+
"from": {
26+
"type": "int",
27+
"default": 0,
28+
"description": "Starting offset (default: 0)"
29+
},
30+
"size": {
31+
"type": "int",
32+
"default": 100,
33+
"description": "specifies a max number of results to get (default: 100)"
34+
}
35+
}
36+
}
37+
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"query_ruleset.put": {
3+
"documentation": {
4+
"url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/put-query-ruleset.html",
5+
"description": "Creates or updates a query ruleset."
6+
},
7+
"stability": "experimental",
8+
"visibility": "public",
9+
"headers": {
10+
"accept": [
11+
"application/json"
12+
],
13+
"content_type": [
14+
"application/json"
15+
]
16+
},
17+
"url": {
18+
"paths": [
19+
{
20+
"path": "/_query_rules/{ruleset_id}",
21+
"methods": [
22+
"PUT"
23+
],
24+
"parts": {
25+
"ruleset_id": {
26+
"type": "string",
27+
"description": "The unique identifier of the ruleset to be created or updated."
28+
}
29+
}
30+
}
31+
]
32+
},
33+
"body": {
34+
"description": "The query ruleset configuration, including `rules`",
35+
"required": true
36+
}
37+
}
38+
}

specification/query_rules/_types/QueryRuleset.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export enum QueryRuleType {
5050
export class QueryRuleCriteria {
5151
type: QueryRuleCriteriaType
5252
metadata: string
53-
values: object[]
53+
values: (string | number)[]
5454
}
5555

5656
export enum QueryRuleCriteriaType {

0 commit comments

Comments
 (0)