Skip to content

Allow empty object responses #451

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion compiler/model/build-model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ function compileClassOrInterfaceDeclaration (declaration: ClassDeclaration | Int
} else {
type.body = { kind: 'value', value: property.valueOf }
}
} else if (property.properties.length > 0) {
} else {
type.body = { kind: 'properties', properties: property.properties }
}
} else {
Expand Down
27 changes: 22 additions & 5 deletions output/schema/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -85695,7 +85695,14 @@
},
{
"body": {
"kind": "no_body"
"kind": "properties",
"properties": []
},
"inherits": {
"type": {
"name": "AcknowledgedResponseBase",
"namespace": "_types"
}
},
"kind": "response",
"name": {
Expand Down Expand Up @@ -88730,7 +88737,14 @@
},
{
"body": {
"kind": "no_body"
"kind": "properties",
"properties": []
},
"inherits": {
"type": {
"name": "AcknowledgedResponseBase",
"namespace": "_types"
}
},
"kind": "response",
"name": {
Expand Down Expand Up @@ -122954,7 +122968,8 @@
},
{
"body": {
"kind": "no_body"
"kind": "properties",
"properties": []
},
"kind": "response",
"name": {
Expand Down Expand Up @@ -124262,7 +124277,8 @@
},
{
"body": {
"kind": "no_body"
"kind": "properties",
"properties": []
},
"kind": "response",
"name": {
Expand Down Expand Up @@ -124317,7 +124333,8 @@
},
{
"body": {
"kind": "no_body"
"kind": "properties",
"properties": []
},
"kind": "response",
"name": {
Expand Down
15 changes: 10 additions & 5 deletions output/typescript/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8493,7 +8493,8 @@ export interface IndicesDeleteAliasRequest extends RequestBase {
timeout?: Time
}

export type IndicesDeleteAliasResponse = boolean
export interface IndicesDeleteAliasResponse extends AcknowledgedResponseBase {
}

export interface IndicesDeleteDataStreamRequest extends RequestBase {
name: DataStreamName
Expand Down Expand Up @@ -8832,7 +8833,8 @@ export interface IndicesPutAliasRequest extends RequestBase {
}
}

export type IndicesPutAliasResponse = boolean
export interface IndicesPutAliasResponse extends AcknowledgedResponseBase {
}

export interface IndicesPutIndexTemplateIndexTemplateMapping {
aliases?: Record<IndexName, IndicesAlias>
Expand Down Expand Up @@ -12802,7 +12804,8 @@ export interface SecurityChangePasswordRequest extends RequestBase {
}
}

export type SecurityChangePasswordResponse = boolean
export interface SecurityChangePasswordResponse {
}

export interface SecurityClearApiKeyCacheRequest extends RequestBase {
ids?: Ids
Expand Down Expand Up @@ -12957,14 +12960,16 @@ export interface SecurityDisableUserRequest extends RequestBase {
refresh?: Refresh
}

export type SecurityDisableUserResponse = boolean
export interface SecurityDisableUserResponse {
}

export interface SecurityEnableUserRequest extends RequestBase {
username: Username
refresh?: Refresh
}

export type SecurityEnableUserResponse = boolean
export interface SecurityEnableUserResponse {
}

export interface SecurityGetApiKeyApiKey {
creation: long
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,6 @@
* under the License.
*/

export class Response {}
import { AcknowledgedResponseBase } from '@_types/Base'

export class Response extends AcknowledgedResponseBase {}
4 changes: 3 additions & 1 deletion specification/indices/put_alias/IndicesPutAliasResponse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,6 @@
* under the License.
*/

export class Response {}
import { AcknowledgedResponseBase } from '@_types/Base'

export class Response extends AcknowledgedResponseBase {}
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,6 @@
* under the License.
*/

export class Response {}
export class Response {
body: {}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,6 @@
* under the License.
*/

export class Response {}
export class Response {
body: {}
}