From a77970c864d1d08d7892b1921d37fc5798817cd6 Mon Sep 17 00:00:00 2001 From: Raymond Feng Date: Sat, 8 Sep 2018 21:14:52 -0700 Subject: [PATCH] fix(rest): use direct import to work around a TS bug See https://github.com/Microsoft/TypeScript/issues/26985 --- packages/rest/package.json | 1 + packages/rest/src/keys.ts | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/rest/package.json b/packages/rest/package.json index 726e156e5a01..1c79edef6470 100644 --- a/packages/rest/package.json +++ b/packages/rest/package.json @@ -42,6 +42,7 @@ "js-yaml": "^3.11.0", "lodash": "^4.17.5", "openapi-schema-to-json-schema": "^2.1.0", + "openapi3-ts": "^1.0.0", "parseurl": "^1.3.2", "path-to-regexp": "^2.2.0", "qs": "^6.5.2", diff --git a/packages/rest/src/keys.ts b/packages/rest/src/keys.ts index 647cedaa7de9..b2d85b34a3af 100644 --- a/packages/rest/src/keys.ts +++ b/packages/rest/src/keys.ts @@ -5,7 +5,12 @@ import {CoreBindings} from '@loopback/core'; import {BindingKey, Context} from '@loopback/context'; -import {OpenApiSpec} from '@loopback/openapi-v3-types'; + +/** + * See https://github.com/Microsoft/TypeScript/issues/26985 + */ +// import {OpenApiSpec} from '@loopback/openapi-v3-types'; +import {OpenAPIObject as OpenApiSpec} from 'openapi3-ts'; import {HttpHandler} from './http-handler'; import {SequenceHandler} from './sequence';