@devlearning/swagger-generator 1.1.23 → 1.1.24

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.
@@ -148,7 +148,7 @@ export abstract class ${className} {
148
148
  protected abstract _handleRequest<T>(request: T): T;
149
149
  protected abstract _handleMultipart<T>(request: T): FormData;
150
150
  protected abstract _handleResponse<T>(response: T): T;
151
- protected abstract _handleError(error: any, obs: any): Observable<never>;
151
+ protected abstract _handleError(error: any, obs: any, skipErrorHandling: boolean): Observable<never>;
152
152
  `;
153
153
  }
154
154
  }
@@ -1,4 +1,3 @@
1
- export declare const API_PRE = "import { HttpClient } from '@angular/common/http';\nimport { Observable, catchError, map } from 'rxjs';\nimport * as Models from './model.autogenerated';\nimport { HttpHeaders } from \"@angular/common/http\";\n\nexport const httpOptions = {\n headers: new HttpHeaders({ 'Content-Type': 'application/json' }),\n};\n\nexport const httpOptionsMultipart = {};\n\nexport abstract class ApiAutogeneratedService {\n constructor(\n public _http: HttpClient,\n public _baseUrl: string,\n ) { }\n\n protected abstract _momentToString(moment: moment.Moment): string;\n protected abstract _handleRequest<T>(request: T): T;\n protected abstract _handleMultipart<T>(request: T): FormData;\n protected abstract _handleResponse<T>(response: T): T;\n protected abstract _handleError<T>(error: any, obs: Observable<T>, skipErrorHandling: boolean): Observable<never>;\n";
2
1
  export declare const API_POST = "}";
3
2
  export declare const MODEL_PRE = "import * as moment from 'moment';\n ";
4
3
  export declare const MODEL_POST = "\n";
@@ -1,26 +1,3 @@
1
- export const API_PRE = `import { HttpClient } from '@angular/common/http';
2
- import { Observable, catchError, map } from 'rxjs';
3
- import * as Models from './model.autogenerated';
4
- import { HttpHeaders } from "@angular/common/http";
5
-
6
- export const httpOptions = {
7
- headers: new HttpHeaders({ 'Content-Type': 'application/json' }),
8
- };
9
-
10
- export const httpOptionsMultipart = {};
11
-
12
- export abstract class ApiAutogeneratedService {
13
- constructor(
14
- public _http: HttpClient,
15
- public _baseUrl: string,
16
- ) { }
17
-
18
- protected abstract _momentToString(moment: moment.Moment): string;
19
- protected abstract _handleRequest<T>(request: T): T;
20
- protected abstract _handleMultipart<T>(request: T): FormData;
21
- protected abstract _handleResponse<T>(response: T): T;
22
- protected abstract _handleError<T>(error: any, obs: Observable<T>, skipErrorHandling: boolean): Observable<never>;
23
- `;
24
1
  export const API_POST = `}`;
25
2
  export const MODEL_PRE = `import * as moment from 'moment';
26
3
  `;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devlearning/swagger-generator",
3
- "version": "1.1.23",
3
+ "version": "1.1.24",
4
4
  "description": "Swagger generator apis and models for Angular and NextJS",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -1,5 +1,5 @@
1
1
  import fs from 'fs';
2
- import { API_POST, API_PRE } from './constants.js';
2
+ import { API_POST } from './constants.js';
3
3
  import { ApiDto } from '../../models/api-dto.js';
4
4
  import { Utils } from '../utils.js';
5
5
  import { ParameterDto } from '../../models/parameter-dto.js';
@@ -182,7 +182,7 @@ export abstract class ${className} {
182
182
  protected abstract _handleRequest<T>(request: T): T;
183
183
  protected abstract _handleMultipart<T>(request: T): FormData;
184
184
  protected abstract _handleResponse<T>(response: T): T;
185
- protected abstract _handleError(error: any, obs: any): Observable<never>;
185
+ protected abstract _handleError(error: any, obs: any, skipErrorHandling: boolean): Observable<never>;
186
186
  `;
187
187
  }
188
188
  }
@@ -1,28 +1,3 @@
1
- export const API_PRE =
2
- `import { HttpClient } from '@angular/common/http';
3
- import { Observable, catchError, map } from 'rxjs';
4
- import * as Models from './model.autogenerated';
5
- import { HttpHeaders } from "@angular/common/http";
6
-
7
- export const httpOptions = {
8
- headers: new HttpHeaders({ 'Content-Type': 'application/json' }),
9
- };
10
-
11
- export const httpOptionsMultipart = {};
12
-
13
- export abstract class ApiAutogeneratedService {
14
- constructor(
15
- public _http: HttpClient,
16
- public _baseUrl: string,
17
- ) { }
18
-
19
- protected abstract _momentToString(moment: moment.Moment): string;
20
- protected abstract _handleRequest<T>(request: T): T;
21
- protected abstract _handleMultipart<T>(request: T): FormData;
22
- protected abstract _handleResponse<T>(response: T): T;
23
- protected abstract _handleError<T>(error: any, obs: Observable<T>, skipErrorHandling: boolean): Observable<never>;
24
- `;
25
-
26
1
  export const API_POST =
27
2
  `}`;
28
3