Skip to content

Commit 2cf715f

Browse files
authored
Validate indices.delete_index_template API (#379)
1 parent d4c35c8 commit 2cf715f

File tree

5 files changed

+117
-4
lines changed

5 files changed

+117
-4
lines changed

output/schema/schema.json

Lines changed: 55 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3931,10 +3931,17 @@
39313931
"description": "Deletes an index template.",
39323932
"docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html",
39333933
"name": "indices.delete_index_template",
3934-
"request": null,
3934+
"request": {
3935+
"name": "IndicesDeleteIndexTemplateRequest",
3936+
"namespace": "indices.delete_index_template"
3937+
},
39353938
"requestBodyRequired": false,
3936-
"response": null,
3937-
"stability": "stable",
3939+
"response": {
3940+
"name": "IndicesDeleteIndexTemplateResponse",
3941+
"namespace": "indices.delete_index_template"
3942+
},
3943+
"since": "7.8.0",
3944+
"stability": "TODO",
39383945
"urls": [
39393946
{
39403947
"methods": [
@@ -66159,6 +66166,51 @@
6615966166
},
6616066167
"properties": []
6616166168
},
66169+
{
66170+
"attachedBehaviors": [
66171+
"CommonQueryParameters"
66172+
],
66173+
"inherits": {
66174+
"type": {
66175+
"name": "RequestBase",
66176+
"namespace": "_types"
66177+
}
66178+
},
66179+
"kind": "request",
66180+
"name": {
66181+
"name": "IndicesDeleteIndexTemplateRequest",
66182+
"namespace": "indices.delete_index_template"
66183+
},
66184+
"path": [
66185+
{
66186+
"description": "The name of the template",
66187+
"name": "name",
66188+
"required": true,
66189+
"type": {
66190+
"kind": "instance_of",
66191+
"type": {
66192+
"name": "Name",
66193+
"namespace": "_types"
66194+
}
66195+
}
66196+
}
66197+
],
66198+
"query": []
66199+
},
66200+
{
66201+
"inherits": {
66202+
"type": {
66203+
"name": "AcknowledgedResponseBase",
66204+
"namespace": "_types"
66205+
}
66206+
},
66207+
"kind": "interface",
66208+
"name": {
66209+
"name": "IndicesDeleteIndexTemplateResponse",
66210+
"namespace": "indices.delete_index_template"
66211+
},
66212+
"properties": []
66213+
},
6616266214
{
6616366215
"attachedBehaviors": [
6616466216
"CommonQueryParameters"

output/schema/validation-errors.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@
416416
},
417417
"indices.delete_index_template": {
418418
"request": [
419-
"Missing request & response"
419+
"Endpoint has \"@stability: TODO"
420420
],
421421
"response": []
422422
},

output/typescript/types.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6570,6 +6570,13 @@ export interface IndicesDeleteDataStreamIndicesDeleteDataStreamRequest extends R
65706570
export interface IndicesDeleteDataStreamIndicesDeleteDataStreamResponse extends AcknowledgedResponseBase {
65716571
}
65726572

6573+
export interface IndicesDeleteIndexTemplateIndicesDeleteIndexTemplateRequest extends RequestBase {
6574+
name: Name
6575+
}
6576+
6577+
export interface IndicesDeleteIndexTemplateIndicesDeleteIndexTemplateResponse extends AcknowledgedResponseBase {
6578+
}
6579+
65736580
export interface IndicesDeleteIndicesDeleteRequest extends RequestBase {
65746581
index: Indices
65756582
allow_no_indices?: boolean
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
/*
2+
* Licensed to Elasticsearch B.V. under one or more contributor
3+
* license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright
5+
* ownership. Elasticsearch B.V. licenses this file to you under
6+
* the Apache License, Version 2.0 (the "License"); you may
7+
* not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
20+
import { RequestBase } from '@_types/Base'
21+
import { Name } from '@_types/common'
22+
23+
/**
24+
* @rest_spec_name indices.delete_index_template
25+
* @since 7.8.0
26+
* @stability TODO
27+
*/
28+
export interface IndicesDeleteIndexTemplateRequest extends RequestBase {
29+
path_parts: {
30+
name: Name
31+
}
32+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/*
2+
* Licensed to Elasticsearch B.V. under one or more contributor
3+
* license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright
5+
* ownership. Elasticsearch B.V. licenses this file to you under
6+
* the Apache License, Version 2.0 (the "License"); you may
7+
* not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
20+
import { AcknowledgedResponseBase } from '@_types/Base'
21+
22+
export class IndicesDeleteIndexTemplateResponse extends AcknowledgedResponseBase {}

0 commit comments

Comments
 (0)