Skip to content

Commit

Permalink
fix: Upgrade json-schema-traverse and openapi3-ts to new major versions.
Browse files Browse the repository at this point in the history
  • Loading branch information
jwalton committed May 14, 2021
1 parent 4fa005f commit e53dcca
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@
"events-listener": "^1.1.0",
"glob": "^7.1.3",
"json-ptr": "^2.2.0",
"json-schema-traverse": "^0.4.1",
"json-schema-traverse": "^1.0.0",
"lodash": "^4.17.11",
"openapi3-ts": "^1.2.0",
"openapi3-ts": "^2.0.1",
"promise-breaker": "^5.0.0",
"pump": "^3.0.0",
"qs": "^6.6.0",
Expand Down
2 changes: 1 addition & 1 deletion src/utils/stringToStream.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Readable } from 'stream';

export default function stringToStream(str: string, encoding: string = 'utf-8') {
export default function stringToStream(str: string, encoding: BufferEncoding = 'utf-8') {
return new Readable({
read() {
this.push(str, encoding);
Expand Down
3 changes: 2 additions & 1 deletion test/oas3/OperationTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { ExegesisOptions } from '../../src';
import { compileOptions } from '../../src/options';
import FakeExegesisContext from '../fixtures/FakeExegesisContext';
import { Readable, Transform } from 'stream';
import { ResponseObject } from 'openapi3-ts';

chai.use(chaiAsPromised);
const { expect } = chai;
Expand Down Expand Up @@ -584,7 +585,7 @@ describe('oas3 Operation', function () {
});

describe('validate response body', function () {
const DEFAULT_RESPONSE = {
const DEFAULT_RESPONSE: ResponseObject = {
description: 'Unexpected error',
content: {
'application/json': {
Expand Down
3 changes: 2 additions & 1 deletion test/oas3/ResponsesTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@ import Responses from '../../src/oas3/Responses';
import { compileOptions } from '../../src/options';
import { makeOpenApiDoc } from '../fixtures';
import stringToStream from '../../src/utils/stringToStream';
import { ResponsesObject } from 'openapi3-ts';

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

const DEFAULT_RESPONSE = {
const DEFAULT_RESPONSE: ResponsesObject = {
200: {
description: '',
content: {
Expand Down

0 comments on commit e53dcca

Please sign in to comment.