File tree 12 files changed +43
-20
lines changed
api_generator/src/renderers/render_types
12 files changed +43
-20
lines changed Original file line number Diff line number Diff line change 2
2
3
3
Inspired by [ Keep a Changelog] ( https://keepachangelog.com/en/1.0.0/ )
4
4
5
+
5
6
## [ Unreleased]
6
7
### Added
7
8
### Dependencies
@@ -11,6 +12,10 @@ Inspired by [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
11
12
### Fixed
12
13
### Security
13
14
15
+ ## [ 3.5.1]
16
+ ### Fixed
17
+ - Api Generator: fix HEAD request boolean response type ([ #1006 ] ( https://github.com/opensearch-project/opensearch-js/pull/1006 ) )
18
+
14
19
## [ 3.5.0]
15
20
### Added
16
21
### Dependencies
Original file line number Diff line number Diff line change @@ -34,7 +34,9 @@ export interface Exists_Request extends Global.Params {
34
34
version_type ?: Common . VersionType ;
35
35
}
36
36
37
- export type Exists_Response = boolean
37
+ export interface Exists_Response extends ApiResponse {
38
+ body : Exists_ResponseBody ;
39
+ }
38
40
39
- export type Exists_ResponseBody = Record < string , any >
41
+ export type Exists_ResponseBody = boolean
40
42
Original file line number Diff line number Diff line change @@ -33,7 +33,9 @@ export interface ExistsSource_Request extends Global.Params {
33
33
version_type ?: Common . VersionType ;
34
34
}
35
35
36
- export type ExistsSource_Response = boolean
36
+ export interface ExistsSource_Response extends ApiResponse {
37
+ body : ExistsSource_ResponseBody ;
38
+ }
37
39
38
- export type ExistsSource_ResponseBody = Record < string , any >
40
+ export type ExistsSource_ResponseBody = boolean
39
41
Original file line number Diff line number Diff line change @@ -19,7 +19,9 @@ import * as Global from '../_types/_global'
19
19
20
20
export type Ping_Request = Global . Params & Record < string , any >
21
21
22
- export type Ping_Response = boolean
22
+ export interface Ping_Response extends ApiResponse {
23
+ body : Ping_ResponseBody ;
24
+ }
23
25
24
- export type Ping_ResponseBody = Record < string , any >
26
+ export type Ping_ResponseBody = boolean
25
27
Original file line number Diff line number Diff line change @@ -25,7 +25,9 @@ export interface Cluster_ExistsComponentTemplate_Request extends Global.Params {
25
25
name : Common . Name ;
26
26
}
27
27
28
- export type Cluster_ExistsComponentTemplate_Response = boolean
28
+ export interface Cluster_ExistsComponentTemplate_Response extends ApiResponse {
29
+ body : Cluster_ExistsComponentTemplate_ResponseBody ;
30
+ }
29
31
30
- export type Cluster_ExistsComponentTemplate_ResponseBody = Record < string , any >
32
+ export type Cluster_ExistsComponentTemplate_ResponseBody = boolean
31
33
Original file line number Diff line number Diff line change @@ -29,7 +29,9 @@ export interface Indices_Exists_Request extends Global.Params {
29
29
local ?: boolean ;
30
30
}
31
31
32
- export type Indices_Exists_Response = boolean
32
+ export interface Indices_Exists_Response extends ApiResponse {
33
+ body : Indices_Exists_ResponseBody ;
34
+ }
33
35
34
- export type Indices_Exists_ResponseBody = Record < string , any >
36
+ export type Indices_Exists_ResponseBody = boolean
35
37
Original file line number Diff line number Diff line change @@ -27,7 +27,9 @@ export interface Indices_ExistsAlias_Request extends Global.Params {
27
27
name : Common . Names ;
28
28
}
29
29
30
- export type Indices_ExistsAlias_Response = boolean
30
+ export interface Indices_ExistsAlias_Response extends ApiResponse {
31
+ body : Indices_ExistsAlias_ResponseBody ;
32
+ }
31
33
32
- export type Indices_ExistsAlias_ResponseBody = Record < string , any >
34
+ export type Indices_ExistsAlias_ResponseBody = boolean
33
35
Original file line number Diff line number Diff line change @@ -26,7 +26,9 @@ export interface Indices_ExistsIndexTemplate_Request extends Global.Params {
26
26
name : Common . Name ;
27
27
}
28
28
29
- export type Indices_ExistsIndexTemplate_Response = boolean
29
+ export interface Indices_ExistsIndexTemplate_Response extends ApiResponse {
30
+ body : Indices_ExistsIndexTemplate_ResponseBody ;
31
+ }
30
32
31
- export type Indices_ExistsIndexTemplate_ResponseBody = Record < string , any >
33
+ export type Indices_ExistsIndexTemplate_ResponseBody = boolean
32
34
Original file line number Diff line number Diff line change @@ -26,7 +26,9 @@ export interface Indices_ExistsTemplate_Request extends Global.Params {
26
26
name : Common . Names ;
27
27
}
28
28
29
- export type Indices_ExistsTemplate_Response = boolean
29
+ export interface Indices_ExistsTemplate_Response extends ApiResponse {
30
+ body : Indices_ExistsTemplate_ResponseBody ;
31
+ }
30
32
31
- export type Indices_ExistsTemplate_ResponseBody = Record < string , any >
33
+ export type Indices_ExistsTemplate_ResponseBody = boolean
32
34
Original file line number Diff line number Diff line change @@ -21,7 +21,9 @@ export interface Ism_ExistsPolicy_Request extends Global.Params {
21
21
policy_id : string ;
22
22
}
23
23
24
- export type Ism_ExistsPolicy_Response = boolean
24
+ export interface Ism_ExistsPolicy_Response extends ApiResponse {
25
+ body : Ism_ExistsPolicy_ResponseBody ;
26
+ }
25
27
26
- export type Ism_ExistsPolicy_ResponseBody = any
28
+ export type Ism_ExistsPolicy_ResponseBody = boolean
27
29
Original file line number Diff line number Diff line change @@ -53,12 +53,12 @@ export default class FunctionTypesContainer extends TypesContainer {
53
53
}
54
54
55
55
#build_response ( ) : Schema {
56
- if ( this . _func . http_verbs . has ( 'HEAD' ) ) return { type : 'boolean' }
57
56
const schema = { properties : { body : { $ref : this . create_ref ( 'response_body' ) } } , required : [ 'body' ] }
58
57
return { allOf : [ schema , { $ref : 'ApiResponse' } ] }
59
58
}
60
59
61
60
#build_response_body ( ) : Schema {
61
+ if ( this . _func . http_verbs . has ( 'HEAD' ) ) return { type : 'boolean' }
62
62
const body = this . _func . response_body
63
63
if ( body == null ) return { type : 'object' }
64
64
if ( body . ref_obj != null ) return body . ref_obj
Original file line number Diff line number Diff line change 36
36
" LICENSE.txt"
37
37
],
38
38
"homepage" : " https://www.opensearch.org/" ,
39
- "version" : " 3.5.0 " ,
39
+ "version" : " 3.5.1 " ,
40
40
"versionCanary" : " 7.10.0-canary.6" ,
41
41
"keywords" : [
42
42
" opensearch" ,
You can’t perform that action at this time.
0 commit comments