Skip to content

Commit d6715fd

Browse files
author
svolkov
committed
bump: update dependencies to latest versions
1 parent 39019b0 commit d6715fd

39 files changed

+208
-204
lines changed

CHANGELOG.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# next release
22

3+
Internal:
4+
5+
- Update `prettier`(`2.0.0`), `swagger2openapi`(`5.4.0`) dependencies
6+
37
# 1.6.0
48

59
Features:
@@ -42,9 +46,9 @@ Breaking Changes:
4246
Features:
4347
- `-d, --default-as-success` option. Allows to use "default" status codes as success response type
4448
- `-r, --responses` option. Response declarations in request rescription
45-
This option adds comments of the possible responses from request
49+
Thisoptionaddscommentsofthepossibleresponsesfromrequest
4650
![responses comments](./assets/changelog_assets/responses-comments.jpg)
47-
Also typings for `.catch()` callback
51+
Alsotypingsfor`.catch()` callback
4852
![responses catch types](./assets/changelog_assets/responses-catch-types.jpg)
4953
- Improve response body type definitions
5054
- Types for bad responses

package-lock.json

Lines changed: 50 additions & 50 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@
3535
"js-yaml": "^3.13.1",
3636
"lodash": "^4.17.15",
3737
"mustache": "^4.0.0",
38-
"swagger2openapi": "^5.3.4",
39-
"prettier": "^2.0.0"
38+
"prettier": "^2.0.0",
39+
"swagger2openapi": "^5.4.0"
4040
},
4141
"bin": {
4242
"swagger-typescript-api": "index.js",

tests/generated/v2.0/adafruit.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -333,8 +333,8 @@ export class Api<SecurityDataType> {
333333

334334
private addQueryParams(query?: RequestQueryParamsType): string {
335335
const fixedQuery = query || {};
336-
const keys = Object.keys(fixedQuery).filter(key => "undefined" !== typeof fixedQuery[key]);
337-
return keys.length === 0 ? "" : `?${keys.map(key => this.addQueryParam(fixedQuery, key)).join("&")}`;
336+
const keys = Object.keys(fixedQuery).filter((key) => "undefined" !== typeof fixedQuery[key]);
337+
return keys.length === 0 ? "" : `?${keys.map((key) => this.addQueryParam(fixedQuery, key)).join("&")}`;
338338
}
339339

340340
private mergeRequestOptions(params: RequestParams, securityParams?: RequestParams): RequestParams {
@@ -353,8 +353,8 @@ export class Api<SecurityDataType> {
353353
private safeParseResponse = <T = any, E = any>(response: Response): Promise<T> =>
354354
response
355355
.json()
356-
.then(data => data)
357-
.catch(e => response.text);
356+
.then((data) => data)
357+
.catch((e) => response.text);
358358

359359
public request = <T = any, E = any>(
360360
path: string,
@@ -368,7 +368,7 @@ export class Api<SecurityDataType> {
368368
...this.mergeRequestOptions(params, (secureByDefault || secure) && this.securityWorker(this.securityData)),
369369
method,
370370
body: body ? JSON.stringify(body) : null,
371-
}).then(async response => {
371+
}).then(async (response) => {
372372
const data = await this.safeParseResponse<T, E>(response);
373373
if (!response.ok) throw data;
374374
return data;

tests/generated/v2.0/another-example.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,8 @@ export class Api<SecurityDataType> {
152152

153153
private addQueryParams(query?: RequestQueryParamsType): string {
154154
const fixedQuery = query || {};
155-
const keys = Object.keys(fixedQuery).filter(key => "undefined" !== typeof fixedQuery[key]);
156-
return keys.length === 0 ? "" : `?${keys.map(key => this.addQueryParam(fixedQuery, key)).join("&")}`;
155+
const keys = Object.keys(fixedQuery).filter((key) => "undefined" !== typeof fixedQuery[key]);
156+
return keys.length === 0 ? "" : `?${keys.map((key) => this.addQueryParam(fixedQuery, key)).join("&")}`;
157157
}
158158

159159
private mergeRequestOptions(params: RequestParams, securityParams?: RequestParams): RequestParams {
@@ -172,8 +172,8 @@ export class Api<SecurityDataType> {
172172
private safeParseResponse = <T = any, E = any>(response: Response): Promise<T> =>
173173
response
174174
.json()
175-
.then(data => data)
176-
.catch(e => response.text);
175+
.then((data) => data)
176+
.catch((e) => response.text);
177177

178178
public request = <T = any, E = any>(
179179
path: string,
@@ -187,7 +187,7 @@ export class Api<SecurityDataType> {
187187
...this.mergeRequestOptions(params, (secureByDefault || secure) && this.securityWorker(this.securityData)),
188188
method,
189189
body: body ? JSON.stringify(body) : null,
190-
}).then(async response => {
190+
}).then(async (response) => {
191191
const data = await this.safeParseResponse<T, E>(response);
192192
if (!response.ok) throw data;
193193
return data;

tests/generated/v2.0/api-with-examples.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ export class Api<SecurityDataType> {
6363
private safeParseResponse = <T = any, E = any>(response: Response): Promise<T> =>
6464
response
6565
.json()
66-
.then(data => data)
67-
.catch(e => response.text);
66+
.then((data) => data)
67+
.catch((e) => response.text);
6868

6969
public request = <T = any, E = any>(
7070
path: string,
@@ -78,7 +78,7 @@ export class Api<SecurityDataType> {
7878
...this.mergeRequestOptions(params, (secureByDefault || secure) && this.securityWorker(this.securityData)),
7979
method,
8080
body: body ? JSON.stringify(body) : null,
81-
}).then(async response => {
81+
}).then(async (response) => {
8282
const data = await this.safeParseResponse<T, E>(response);
8383
if (!response.ok) throw data;
8484
return data;

tests/generated/v2.0/authentiq.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,8 @@ export class Api<SecurityDataType> {
128128

129129
private addQueryParams(query?: RequestQueryParamsType): string {
130130
const fixedQuery = query || {};
131-
const keys = Object.keys(fixedQuery).filter(key => "undefined" !== typeof fixedQuery[key]);
132-
return keys.length === 0 ? "" : `?${keys.map(key => this.addQueryParam(fixedQuery, key)).join("&")}`;
131+
const keys = Object.keys(fixedQuery).filter((key) => "undefined" !== typeof fixedQuery[key]);
132+
return keys.length === 0 ? "" : `?${keys.map((key) => this.addQueryParam(fixedQuery, key)).join("&")}`;
133133
}
134134

135135
private mergeRequestOptions(params: RequestParams, securityParams?: RequestParams): RequestParams {
@@ -148,8 +148,8 @@ export class Api<SecurityDataType> {
148148
private safeParseResponse = <T = any, E = any>(response: Response): Promise<T> =>
149149
response
150150
.json()
151-
.then(data => data)
152-
.catch(e => response.text);
151+
.then((data) => data)
152+
.catch((e) => response.text);
153153

154154
public request = <T = any, E = any>(
155155
path: string,
@@ -163,7 +163,7 @@ export class Api<SecurityDataType> {
163163
...this.mergeRequestOptions(params, (secureByDefault || secure) && this.securityWorker(this.securityData)),
164164
method,
165165
body: body ? JSON.stringify(body) : null,
166-
}).then(async response => {
166+
}).then(async (response) => {
167167
const data = await this.safeParseResponse<T, E>(response);
168168
if (!response.ok) throw data;
169169
return data;

tests/generated/v2.0/example1.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ export class Api<SecurityDataType> {
8585

8686
private addQueryParams(query?: RequestQueryParamsType): string {
8787
const fixedQuery = query || {};
88-
const keys = Object.keys(fixedQuery).filter(key => "undefined" !== typeof fixedQuery[key]);
89-
return keys.length === 0 ? "" : `?${keys.map(key => this.addQueryParam(fixedQuery, key)).join("&")}`;
88+
const keys = Object.keys(fixedQuery).filter((key) => "undefined" !== typeof fixedQuery[key]);
89+
return keys.length === 0 ? "" : `?${keys.map((key) => this.addQueryParam(fixedQuery, key)).join("&")}`;
9090
}
9191

9292
private mergeRequestOptions(params: RequestParams, securityParams?: RequestParams): RequestParams {
@@ -105,8 +105,8 @@ export class Api<SecurityDataType> {
105105
private safeParseResponse = <T = any, E = any>(response: Response): Promise<T> =>
106106
response
107107
.json()
108-
.then(data => data)
109-
.catch(e => response.text);
108+
.then((data) => data)
109+
.catch((e) => response.text);
110110

111111
public request = <T = any, E = any>(
112112
path: string,
@@ -120,7 +120,7 @@ export class Api<SecurityDataType> {
120120
...this.mergeRequestOptions(params, (secureByDefault || secure) && this.securityWorker(this.securityData)),
121121
method,
122122
body: body ? JSON.stringify(body) : null,
123-
}).then(async response => {
123+
}).then(async (response) => {
124124
const data = await this.safeParseResponse<T, E>(response);
125125
if (!response.ok) throw data;
126126
return data;

tests/generated/v2.0/furkot-example.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,8 @@ export class Api<SecurityDataType> {
140140
private safeParseResponse = <T = any, E = any>(response: Response): Promise<T> =>
141141
response
142142
.json()
143-
.then(data => data)
144-
.catch(e => response.text);
143+
.then((data) => data)
144+
.catch((e) => response.text);
145145

146146
public request = <T = any, E = any>(
147147
path: string,
@@ -155,7 +155,7 @@ export class Api<SecurityDataType> {
155155
...this.mergeRequestOptions(params, (secureByDefault || secure) && this.securityWorker(this.securityData)),
156156
method,
157157
body: body ? JSON.stringify(body) : null,
158-
}).then(async response => {
158+
}).then(async (response) => {
159159
const data = await this.safeParseResponse<T, E>(response);
160160
if (!response.ok) throw data;
161161
return data;

0 commit comments

Comments
 (0)