@devlearning/swagger-generator 0.0.26 → 0.0.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  export const API_PRE = `import { HttpClient } from '@angular/common/http';
2
2
  import { Observable, catchError, map } from 'rxjs';
3
- import { httpOptions } from 'src/app/core/utils/http-options';
3
+ import { httpOptions, httpOptionsMultipart } from 'src/app/core/utils/http-options';
4
4
  import * as Models from './model.autogenerated';
5
5
 
6
6
  export abstract class ApiAutogeneratedService {
@@ -11,6 +11,7 @@ export abstract class ApiAutogeneratedService {
11
11
 
12
12
  protected abstract _momentToString(moment: moment.Moment): string;
13
13
  protected abstract _handleRequest<T>(request: T): T;
14
+ protected abstract _handleMultipart<T>(request: T): T;
14
15
  protected abstract _handleResponse<T>(response: T): T;
15
16
  protected abstract _handleError(error: any, obs: any): Observable<never>;
16
17
  `;
package/dist/generator.js CHANGED
@@ -37,7 +37,7 @@ export class Generator {
37
37
  `;
38
38
  }
39
39
  else if (isMultiPart) {
40
- prepareRequestString = ` const wrappedRequest = this._handleMultipart(request);
40
+ prepareRequestString = `const wrappedRequest = this._handleMultipart(request);
41
41
  `;
42
42
  httpOptions = 'httpOptionsMultipart';
43
43
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devlearning/swagger-generator",
3
- "version": "0.0.26",
3
+ "version": "0.0.29",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -1,7 +1,7 @@
1
1
  export const API_PRE =
2
2
  `import { HttpClient } from '@angular/common/http';
3
3
  import { Observable, catchError, map } from 'rxjs';
4
- import { httpOptions } from 'src/app/core/utils/http-options';
4
+ import { httpOptions, httpOptionsMultipart } from 'src/app/core/utils/http-options';
5
5
  import * as Models from './model.autogenerated';
6
6
 
7
7
  export abstract class ApiAutogeneratedService {
@@ -12,6 +12,7 @@ export abstract class ApiAutogeneratedService {
12
12
 
13
13
  protected abstract _momentToString(moment: moment.Moment): string;
14
14
  protected abstract _handleRequest<T>(request: T): T;
15
+ protected abstract _handleMultipart<T>(request: T): T;
15
16
  protected abstract _handleResponse<T>(response: T): T;
16
17
  protected abstract _handleError(error: any, obs: any): Observable<never>;
17
18
  `;
package/src/generator.ts CHANGED
@@ -48,7 +48,7 @@ export class Generator {
48
48
  prepareRequestString = `const wrappedRequest = this._handleRequest(request);
49
49
  `;
50
50
  } else if (isMultiPart) {
51
- prepareRequestString = ` const wrappedRequest = this._handleMultipart(request);
51
+ prepareRequestString = `const wrappedRequest = this._handleMultipart(request);
52
52
  `;
53
53
  httpOptions = 'httpOptionsMultipart';
54
54
  }