Skip to content

Commit

Permalink
Add json specs; rename value -> values
Browse files Browse the repository at this point in the history
  • Loading branch information
kderusso committed Jul 24, 2023
1 parent 2fc00d7 commit b764c28
Show file tree
Hide file tree
Showing 6 changed files with 139 additions and 2 deletions.
2 changes: 1 addition & 1 deletion output/typescript/types.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

31 changes: 31 additions & 0 deletions specification/_json_spec/query_ruleset.delete.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"query_ruleset.delete": {
"documentation": {
"url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-query-ruleset.html",
"description": "Deletes a query ruleset."
},
"stability": "experimental",
"visibility": "public",
"headers": {
"accept": [
"application/json"
]
},
"url": {
"paths": [
{
"path": "/_query_rules/{ruleset_id}",
"methods": [
"DELETE"
],
"parts": {
"ruleset_id": {
"type": "string",
"description": "The unique identifier of the query ruleset to delete"
}
}
}
]
}
}
}
31 changes: 31 additions & 0 deletions specification/_json_spec/query_ruleset.get.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"query_ruleset.get": {
"documentation": {
"url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/get-query-ruleset.html",
"description": "Returns the details about a query ruleset."
},
"stability": "experimental",
"visibility": "public",
"headers": {
"accept": [
"application/json"
]
},
"url": {
"paths": [
{
"path": "/_query_rules/{ruleset_id}",
"methods": [
"GET"
],
"parts": {
"ruleset_id": {
"type": "string",
"description": "The unique identifier of the query ruleset"
}
}
}
]
}
}
}
37 changes: 37 additions & 0 deletions specification/_json_spec/query_ruleset.list.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"query_ruleset.list": {
"documentation": {
"url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/list-query-rulesets.html",
"description": "Lists query rulesets."
},
"stability": "experimental",
"visibility": "public",
"headers": {
"accept": [
"application/json"
]
},
"url": {
"paths": [
{
"path": "/_query_rules",
"methods": [
"GET"
]
}
]
},
"params": {
"from": {
"type": "int",
"default": 0,
"description": "Starting offset (default: 0)"
},
"size": {
"type": "int",
"default": 100,
"description": "specifies a max number of results to get (default: 100)"
}
}
}
}
38 changes: 38 additions & 0 deletions specification/_json_spec/query_ruleset.put.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"query_ruleset.put": {
"documentation": {
"url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/put-query-ruleset.html",
"description": "Creates or updates a query ruleset."
},
"stability": "experimental",
"visibility": "public",
"headers": {
"accept": [
"application/json"
],
"content_type": [
"application/json"
]
},
"url": {
"paths": [
{
"path": "/_query_rules/{ruleset_id}",
"methods": [
"PUT"
],
"parts": {
"ruleset_id": {
"type": "string",
"description": "The unique identifier of the ruleset to be created or updated."
}
}
}
]
},
"body": {
"description": "The query ruleset configuration, including `rules`",
"required": true
}
}
}
2 changes: 1 addition & 1 deletion specification/query_rules/_types/QueryRuleset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export enum QueryRuleType {
export class QueryRuleCriteria {
type: QueryRuleCriteriaType
metadata: string
values: object[]
values: (string | number)[]
}

export enum QueryRuleCriteriaType {
Expand Down

0 comments on commit b764c28

Please sign in to comment.