Skip to content

Commit

Permalink
fix(rest): use direct import to work around a TS bug
Browse files Browse the repository at this point in the history
  • Loading branch information
raymondfeng committed Sep 9, 2018
1 parent be1f42b commit dfab96d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions packages/rest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
9 changes: 7 additions & 2 deletions packages/rest/src/keys.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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} from 'openapi3-ts';

import {HttpHandler} from './http-handler';
import {SequenceHandler} from './sequence';
Expand Down Expand Up @@ -75,7 +80,7 @@ export namespace RestBindings {
/**
* Binding key for setting and injecting an OpenAPI spec
*/
export const API_SPEC = BindingKey.create<OpenApiSpec>('rest.apiSpec');
export const API_SPEC = BindingKey.create<OpenAPIObject>('rest.apiSpec');
/**
* Binding key for setting and injecting a Sequence
*/
Expand Down

0 comments on commit dfab96d

Please sign in to comment.