Skip to content

Commit

Permalink
fix(api-client): File, Blob, Date and Object types are not imported f…
Browse files Browse the repository at this point in the history
…rom models

fixes #27

Signed-off-by: Vojtech Masek <vojtech.masek@flowup.cz>
  • Loading branch information
vmasek committed Mar 12, 2018
1 parent c8f2bbf commit 37e358b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/helper.ts
@@ -1,6 +1,6 @@
import { Spec as Swagger } from 'swagger-schema-official';

const BASIC_TS_TYPE_REGEX = /^string|number|integer|boolean|undefined|any|object$/i;
const BASIC_TS_TYPE_REGEX = /^string|number|integer|boolean|null|undefined|any|Object|Date|File|Blob$/;

export function camelCase(text: string = '', lowerFirstLetter: boolean = true): string {
text = removeDuplicateWords(text);
Expand Down
4 changes: 2 additions & 2 deletions tests/esquare/api/api-client.service.ts
Expand Up @@ -158,7 +158,7 @@ export class APIClient {
return this.sendRequest<models.ImportHistoryItem[]>('GET', path, options);
}

uploadFile(templateId: number, file: models.File, options?: HttpOptions): Observable<any> {
uploadFile(templateId: number, file: File, options?: HttpOptions): Observable<any> {
const path = `/report/wizard/uploadfile/${templateId}`;
options = {...this.options, ...options};

Expand Down Expand Up @@ -231,7 +231,7 @@ export class APIClient {
return this.sendRequest<any>('POST', path, options);
}

overrideImport(id: number, description: string, file: models.File, options?: HttpOptions): Observable<any> {
overrideImport(id: number, description: string, file: File, options?: HttpOptions): Observable<any> {
const path = `/report/wizard/${id}/override`;
options = {...this.options, ...options};

Expand Down

0 comments on commit 37e358b

Please sign in to comment.