Skip to content

Commit

Permalink
fix: revert to openapi-generator 4.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
gnuletik committed May 12, 2020
1 parent 7d738c7 commit 94ef375
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 48 deletions.
2 changes: 1 addition & 1 deletion .openapi-generator/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.3.1
4.3.0
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ api: $(spec-openapi)
docker run --rm \
-v ${PWD}:/local \
--user "$$(id -u):$$(id -g)" \
openapitools/openapi-generator-cli:v4.3.1 generate \
openapitools/openapi-generator-cli:v4.3.0 generate \
-i /local/$(spec-openapi) \
-g typescript-fetch \
-c /local/$(generator-config) \
Expand Down
17 changes: 7 additions & 10 deletions src/apis/TimesideApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@ import {
AnnotationTrack,
AnnotationTrackFromJSON,
AnnotationTrackToJSON,
AnyType,
AnyTypeFromJSON,
AnyTypeToJSON,
AuthToken,
AuthTokenFromJSON,
AuthTokenToJSON,
Expand Down Expand Up @@ -361,7 +358,7 @@ export interface UpdateTaskRequest {
}

/**
*
* no description
*/
export class TimesideApi extends runtime.BaseAPI {

Expand Down Expand Up @@ -1117,7 +1114,7 @@ export class TimesideApi extends runtime.BaseAPI {

/**
*/
async listCsrfTokensRaw(): Promise<runtime.ApiResponse<Array<AnyType>>> {
async listCsrfTokensRaw(): Promise<runtime.ApiResponse<Array<object>>> {
const queryParameters: runtime.HTTPQuery = {};

const headerParameters: runtime.HTTPHeaders = {};
Expand All @@ -1129,12 +1126,12 @@ export class TimesideApi extends runtime.BaseAPI {
query: queryParameters,
});

return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(AnyTypeFromJSON));
return new runtime.JSONApiResponse<any>(response);
}

/**
*/
async listCsrfTokens(): Promise<Array<AnyType>> {
async listCsrfTokens(): Promise<Array<object>> {
const response = await this.listCsrfTokensRaw();
return await response.value();
}
Expand Down Expand Up @@ -2127,7 +2124,7 @@ export class TimesideApi extends runtime.BaseAPI {
/**
* PNG rendering of 2D numerical data (example: a spectrogram).
*/
async retrieveResultVisualizationRaw(requestParameters: RetrieveResultVisualizationRequest): Promise<runtime.ApiResponse<AnyType>> {
async retrieveResultVisualizationRaw(requestParameters: RetrieveResultVisualizationRequest): Promise<runtime.ApiResponse<object>> {
if (requestParameters.uuid === null || requestParameters.uuid === undefined) {
throw new runtime.RequiredError('uuid','Required parameter requestParameters.uuid was null or undefined when calling retrieveResultVisualization.');
}
Expand All @@ -2143,13 +2140,13 @@ export class TimesideApi extends runtime.BaseAPI {
query: queryParameters,
});

return new runtime.JSONApiResponse(response, (jsonValue) => AnyTypeFromJSON(jsonValue));
return new runtime.JSONApiResponse<any>(response);
}

/**
* PNG rendering of 2D numerical data (example: a spectrogram).
*/
async retrieveResultVisualization(requestParameters: RetrieveResultVisualizationRequest): Promise<AnyType> {
async retrieveResultVisualization(requestParameters: RetrieveResultVisualizationRequest): Promise<object> {
const response = await this.retrieveResultVisualizationRaw(requestParameters);
return await response.value();
}
Expand Down
12 changes: 2 additions & 10 deletions src/models/Item.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,21 +87,13 @@ export interface Item {
*/
readonly audioDuration?: number;
/**
* Provider's URI of the audio source.
*
* e.g. for Deezer preview: http://www.deezer.com/track/4763165
*
* e.g. for YouTube: https://www.youtube.com/watch?v=oRdxUFDoQe0
* Provider\'s URI of the audio source. e.g. for Deezer preview: http://www.deezer.com/track/4763165 e.g. for YouTube: https://www.youtube.com/watch?v=oRdxUFDoQe0
* @type {string}
* @memberof Item
*/
externalUri?: string;
/**
* Provider's id of the audio source.
*
* e.g. for Deezer preview: 4763165
*
* e.g. for YouTube: oRdxUFDoQe0
* Provider\'s id of the audio source. e.g. for Deezer preview: 4763165 e.g. for YouTube: oRdxUFDoQe0
* @type {string}
* @memberof Item
*/
Expand Down
15 changes: 2 additions & 13 deletions src/models/Result.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,7 @@ export interface Result {
*/
preset?: string | null;
/**
* Status of the task giving the result:
*
* failed: 0
*
* draft: 1
*
* pending: 2
*
* running: 3
*
* done: 4
* Status of the task giving the result: failed: 0 draft: 1 pending: 2 running: 3 done: 4
* @type {number}
* @memberof Result
*/
Expand All @@ -72,8 +62,7 @@ export interface Result {
*/
hdf5?: Blob;
/**
* Non numerical result stored in a file
* (image, transcoded audio, etc.)
* Non numerical result stored in a file (image, transcoded audio, etc.)
* @type {Blob}
* @memberof Result
*/
Expand Down
12 changes: 1 addition & 11 deletions src/models/Task.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,7 @@ export interface Task {
*/
selection?: string | null;
/**
* Task's status:
*
* failed: 0
*
* draft: 1
*
* pending: 2
*
* running: 3
*
* done: 4
* Task\'s status: failed: 0 draft: 1 pending: 2 running: 3 done: 4
* @type {number}
* @memberof Task
*/
Expand Down
4 changes: 2 additions & 2 deletions src/runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export class BaseAPI {
// do not handle correctly sometimes.
url += '?' + this.configuration.queryParamsStringify(context.query);
}
const body = ((typeof FormData !== "undefined" && context.body instanceof FormData) || context.body instanceof URLSearchParams || isBlob(context.body))
const body = (context.body instanceof FormData || context.body instanceof URLSearchParams || isBlob(context.body))
? context.body
: JSON.stringify(context.body);

Expand Down Expand Up @@ -193,7 +193,7 @@ export class Configuration {
}

export type Json = any;
export type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD';
export type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS';
export type HTTPHeaders = { [key: string]: string };
export type HTTPQuery = { [key: string]: string | number | null | boolean | Array<string | number | null | boolean> | HTTPQuery };
export type HTTPBody = Json | FormData | URLSearchParams;
Expand Down

0 comments on commit 94ef375

Please sign in to comment.