Skip to content

Commit e53dcca

Browse files
committed
fix: Upgrade json-schema-traverse and openapi3-ts to new major versions.
1 parent 4fa005f commit e53dcca

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,9 @@
8585
"events-listener": "^1.1.0",
8686
"glob": "^7.1.3",
8787
"json-ptr": "^2.2.0",
88-
"json-schema-traverse": "^0.4.1",
88+
"json-schema-traverse": "^1.0.0",
8989
"lodash": "^4.17.11",
90-
"openapi3-ts": "^1.2.0",
90+
"openapi3-ts": "^2.0.1",
9191
"promise-breaker": "^5.0.0",
9292
"pump": "^3.0.0",
9393
"qs": "^6.6.0",

src/utils/stringToStream.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Readable } from 'stream';
22

3-
export default function stringToStream(str: string, encoding: string = 'utf-8') {
3+
export default function stringToStream(str: string, encoding: BufferEncoding = 'utf-8') {
44
return new Readable({
55
read() {
66
this.push(str, encoding);

test/oas3/OperationTest.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import { ExegesisOptions } from '../../src';
1010
import { compileOptions } from '../../src/options';
1111
import FakeExegesisContext from '../fixtures/FakeExegesisContext';
1212
import { Readable, Transform } from 'stream';
13+
import { ResponseObject } from 'openapi3-ts';
1314

1415
chai.use(chaiAsPromised);
1516
const { expect } = chai;
@@ -584,7 +585,7 @@ describe('oas3 Operation', function () {
584585
});
585586

586587
describe('validate response body', function () {
587-
const DEFAULT_RESPONSE = {
588+
const DEFAULT_RESPONSE: ResponseObject = {
588589
description: 'Unexpected error',
589590
content: {
590591
'application/json': {

test/oas3/ResponsesTest.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@ import Responses from '../../src/oas3/Responses';
77
import { compileOptions } from '../../src/options';
88
import { makeOpenApiDoc } from '../fixtures';
99
import stringToStream from '../../src/utils/stringToStream';
10+
import { ResponsesObject } from 'openapi3-ts';
1011

1112
chai.use(chaiAsPromised);
1213
const { expect } = chai;
1314

14-
const DEFAULT_RESPONSE = {
15+
const DEFAULT_RESPONSE: ResponsesObject = {
1516
200: {
1617
description: '',
1718
content: {

0 commit comments

Comments
 (0)