Skip to content

Commit c7d54b6

Browse files
committed
split indices.get_alias for clarity, handle NotFoundAliases with previous comit
1 parent 97cd4a6 commit c7d54b6

File tree

2 files changed

+37
-11
lines changed

2 files changed

+37
-11
lines changed

specification/indices/get_alias/IndicesGetAliasResponse.ts

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,10 @@
1919

2020
import { ErrorResponseBase } from '@_types/Base'
2121
import { IndexName } from '@_types/common'
22-
import { AliasDefinition } from '@indices/_types/AliasDefinition'
23-
import { AdditionalProperties } from '@spec_utils/behaviors'
22+
import {
23+
IndexAliases,
24+
NotFoundAliases
25+
} from '@indices/get_alias/_types/response'
2426
import { Dictionary } from '@spec_utils/Dictionary'
2527

2628
export class Response {
@@ -33,12 +35,3 @@ export class Response {
3335
}
3436
]
3537
}
36-
37-
export class IndexAliases {
38-
aliases: Dictionary<string, AliasDefinition>
39-
}
40-
41-
class NotFoundAliases implements AdditionalProperties<string, IndexAliases> {
42-
error: string
43-
status: number
44-
}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
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 { AliasDefinition } from '@indices/_types/AliasDefinition'
21+
import { AdditionalProperties } from '@spec_utils/behaviors'
22+
import { Dictionary } from '@spec_utils/Dictionary'
23+
24+
export class IndexAliases {
25+
aliases: Dictionary<string, AliasDefinition>
26+
}
27+
28+
export class NotFoundAliases
29+
implements AdditionalProperties<string, IndexAliases>
30+
{
31+
error: string
32+
status: number
33+
}

0 commit comments

Comments
 (0)