Last active
October 14, 2020 11:30
-
-
Save cpoliver/02a560ffd35810c1a6e8fd5bbe4b5b20 to your computer and use it in GitHub Desktop.
openapi-typescript-codegen at sign bug
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* istanbul ignore file */ | |
/* tslint:disable */ | |
/* eslint-disable */ | |
import type { Application } from '../models/Application'; | |
import { request as __request } from '../core/request'; | |
export class ApplicationsService { | |
/** | |
* Gets all Applications. | |
* @param id | |
* @param select Limits the properties returned in the result. | |
* @param expand Indicates the related entities to be represented inline. The maximum depth is 2. | |
* @param filter Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions. | |
* @param orderby Specifies the order in which items are returned. The maximum number of expressions is 5. | |
* @param top Limits the number of items returned from a collection. | |
* @param skip Excludes the specified number of items of the queried collection from the result. | |
* @param count Indicates whether the total count of items within a collection are returned in the result. | |
* @result any Success | |
* @throws ApiError | |
*/ | |
public static async getApplications({ | |
id, | |
select, | |
expand, | |
filter, | |
orderby, | |
top, | |
skip, | |
count = false, | |
}: { | |
id: string, | |
select?: string, | |
expand?: string, | |
filter?: string, | |
orderby?: string, | |
top?: number, | |
skip?: number, | |
count?: boolean, | |
} | |
): Promise<{ | |
readonly @odata.context?: string, | |
readonly @odata.count?: number, | |
readonly value?: Array<Application>, | |
}> { | |
const result = await __request({ | |
method: 'GET', | |
path: `/api/tenancies/${id}/applications`, | |
query: { | |
'$select': select, | |
'$expand': expand, | |
'$filter': filter, | |
'$orderby': orderby, | |
'$top': top, | |
'$skip': skip, | |
'$count': count, | |
}, | |
errors: { | |
400: `Bad request`, | |
401: `Unauthorized`, | |
403: `Forbidden`, | |
406: `Not acceptable`, | |
500: `Internal server error`, | |
}, | |
}); | |
return result.body; | |
} | |
/** | |
* Create Application. | |
* @param id | |
* @param requestBody | |
* @result any Success | |
* @throws ApiError | |
*/ | |
public static async postApplicationsService({ | |
id, | |
requestBody, | |
}: { | |
id: string, | |
requestBody?: Application, | |
} | |
): Promise<{ | |
readonly @odata.context?: string, | |
}> { | |
const result = await __request({ | |
method: 'POST', | |
path: `/api/tenancies/${id}/applications`, | |
body: requestBody, | |
errors: { | |
400: `Bad request`, | |
401: `Unauthorized`, | |
403: `Forbidden`, | |
406: `Not acceptable`, | |
500: `Internal server error`, | |
}, | |
}); | |
return result.body; | |
} | |
/** | |
* Get Application. | |
* @param id | |
* @param childId | |
* @param select Limits the properties returned in the result. | |
* @param expand Indicates the related entities to be represented inline. The maximum depth is 2. | |
* @result any Success | |
* @throws ApiError | |
*/ | |
public static async getApplication({ | |
id, | |
childId, | |
select, | |
expand, | |
}: { | |
id: string, | |
childId: string, | |
select?: string, | |
expand?: string, | |
} | |
): Promise<{ | |
readonly @odata.context?: string, | |
}> { | |
const result = await __request({ | |
method: 'GET', | |
path: `/api/tenancies/${id}/applications/${childId}`, | |
query: { | |
'$select': select, | |
'$expand': expand, | |
}, | |
errors: { | |
400: `Bad request`, | |
401: `Unauthorized`, | |
403: `Forbidden`, | |
406: `Not acceptable`, | |
500: `Internal server error`, | |
}, | |
}); | |
return result.body; | |
} | |
/** | |
* Update Application. | |
* @param id | |
* @param childId | |
* @param requestBody | |
* @result any Success | |
* @throws ApiError | |
*/ | |
public static async patchApplicationsService({ | |
id, | |
childId, | |
requestBody, | |
}: { | |
id: string, | |
childId: string, | |
requestBody?: Application, | |
} | |
): Promise<{ | |
readonly @odata.context?: string, | |
}> { | |
const result = await __request({ | |
method: 'PATCH', | |
path: `/api/tenancies/${id}/applications/${childId}`, | |
body: requestBody, | |
errors: { | |
400: `Bad request`, | |
401: `Unauthorized`, | |
403: `Forbidden`, | |
406: `Not acceptable`, | |
500: `Internal server error`, | |
}, | |
}); | |
return result.body; | |
} | |
/** | |
* Deletes the Application. | |
* @param id | |
* @param childId | |
* @result any Success | |
* @throws ApiError | |
*/ | |
public static async deleteApplicationsService({ | |
id, | |
childId, | |
}: { | |
id: string, | |
childId: string, | |
} | |
): Promise<any> { | |
const result = await __request({ | |
method: 'DELETE', | |
path: `/api/tenancies/${id}/applications/${childId}`, | |
errors: { | |
400: `Bad request`, | |
401: `Unauthorized`, | |
403: `Forbidden`, | |
406: `Not acceptable`, | |
500: `Internal server error`, | |
}, | |
}); | |
return result.body; | |
} | |
/** | |
* Restores the deleted Application. | |
* @param id | |
* @param childId | |
* @result any Success | |
* @throws ApiError | |
*/ | |
public static async restoreApplication({ | |
id, | |
childId, | |
}: { | |
id: string, | |
childId: string, | |
} | |
): Promise<{ | |
readonly @odata.context?: string, | |
}> { | |
const result = await __request({ | |
method: 'POST', | |
path: `/api/tenancies/${id}/applications/${childId}/restoreapplication`, | |
errors: { | |
401: `Unauthorized`, | |
403: `Forbidden`, | |
}, | |
}); | |
return result.body; | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* istanbul ignore file */ | |
/* tslint:disable */ | |
/* eslint-disable */ | |
import type { Application } from '../models/Application'; | |
import { request as __request } from '../core/request'; | |
export class ApplicationsService { | |
/** | |
* Gets all Applications. | |
* @param id | |
* @param select Limits the properties returned in the result. | |
* @param expand Indicates the related entities to be represented inline. The maximum depth is 2. | |
* @param filter Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions. | |
* @param orderby Specifies the order in which items are returned. The maximum number of expressions is 5. | |
* @param top Limits the number of items returned from a collection. | |
* @param skip Excludes the specified number of items of the queried collection from the result. | |
* @param count Indicates whether the total count of items within a collection are returned in the result. | |
* @result any Success | |
* @throws ApiError | |
*/ | |
public static async getApplications({ | |
id, | |
select, | |
expand, | |
filter, | |
orderby, | |
top, | |
skip, | |
count = false, | |
}: { | |
id: string, | |
select?: string, | |
expand?: string, | |
filter?: string, | |
orderby?: string, | |
top?: number, | |
skip?: number, | |
count?: boolean, | |
} | |
): Promise<{ | |
readonly "@odata.context"?: string, | |
readonly "@odata.count"?: number, | |
readonly value?: Array<Application>, | |
}> { | |
const result = await __request({ | |
method: 'GET', | |
path: `/api/tenancies/${id}/applications`, | |
query: { | |
'$select': select, | |
'$expand': expand, | |
'$filter': filter, | |
'$orderby': orderby, | |
'$top': top, | |
'$skip': skip, | |
'$count': count, | |
}, | |
errors: { | |
400: `Bad request`, | |
401: `Unauthorized`, | |
403: `Forbidden`, | |
406: `Not acceptable`, | |
500: `Internal server error`, | |
}, | |
}); | |
return result.body; | |
} | |
/** | |
* Create Application. | |
* @param id | |
* @param requestBody | |
* @result any Success | |
* @throws ApiError | |
*/ | |
public static async postApplicationsService({ | |
id, | |
requestBody, | |
}: { | |
id: string, | |
requestBody?: Application, | |
} | |
): Promise<{ | |
readonly "@odata.context"?: string, | |
}> { | |
const result = await __request({ | |
method: 'POST', | |
path: `/api/tenancies/${id}/applications`, | |
body: requestBody, | |
errors: { | |
400: `Bad request`, | |
401: `Unauthorized`, | |
403: `Forbidden`, | |
406: `Not acceptable`, | |
500: `Internal server error`, | |
}, | |
}); | |
return result.body; | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"paths": { | |
"/api/tenancies/{id}/applications": { | |
"get": { | |
"tags": ["Applications"], | |
"summary": "Gets all Applications.", | |
"operationId": "getApplications", | |
"parameters": [ | |
{ | |
"$ref": "#/components/parameters/id" | |
}, | |
{ | |
"$ref": "#/components/parameters/odata-select" | |
}, | |
{ | |
"$ref": "#/components/parameters/odata-expand" | |
}, | |
{ | |
"$ref": "#/components/parameters/odata-filter" | |
}, | |
{ | |
"$ref": "#/components/parameters/odata-orderby" | |
}, | |
{ | |
"$ref": "#/components/parameters/odata-top" | |
}, | |
{ | |
"$ref": "#/components/parameters/odata-skip" | |
}, | |
{ | |
"$ref": "#/components/parameters/odata-count" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Success", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"@odata.context": { | |
"type": "string", | |
"readOnly": true | |
}, | |
"@odata.count": { | |
"type": "integer", | |
"format": "int32", | |
"readOnly": true | |
}, | |
"value": { | |
"type": "array", | |
"items": { | |
"$ref": "#/components/schemas/Application" | |
}, | |
"readOnly": true | |
} | |
} | |
} | |
} | |
} | |
}, | |
"401": { | |
"description": "Unauthorized" | |
}, | |
"403": { | |
"description": "Forbidden" | |
}, | |
"400": { | |
"description": "Bad request" | |
}, | |
"406": { | |
"description": "Not acceptable" | |
}, | |
"500": { | |
"description": "Internal server error" | |
} | |
}, | |
"security": [ | |
{ | |
"OAuth2": ["iac-api:root"] | |
} | |
] | |
}, | |
"post": { | |
"tags": ["Applications"], | |
"summary": "Create Application.", | |
"parameters": [ | |
{ | |
"$ref": "#/components/parameters/id" | |
} | |
], | |
"requestBody": { | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/Application" | |
} | |
} | |
} | |
}, | |
"responses": { | |
"201": { | |
"description": "Success", | |
"content": { | |
"application/json": { | |
"schema": { | |
"allOf": [ | |
{ | |
"type": "object", | |
"properties": { | |
"@odata.context": { | |
"type": "string", | |
"readOnly": true | |
} | |
} | |
}, | |
{ | |
"$ref": "#/components/schemas/Application" | |
} | |
] | |
} | |
} | |
} | |
}, | |
"401": { | |
"description": "Unauthorized" | |
}, | |
"403": { | |
"description": "Forbidden" | |
}, | |
"400": { | |
"description": "Bad request" | |
}, | |
"406": { | |
"description": "Not acceptable" | |
}, | |
"500": { | |
"description": "Internal server error" | |
} | |
}, | |
"security": [ | |
{ | |
"OAuth2": ["iac-api:root"] | |
} | |
] | |
} | |
}, | |
}, | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment