From 2cb4b50457b11f54b9e83173c8ee2eec100edf65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20Bajto=C5=A1?= Date: Mon, 27 May 2019 13:41:43 +0200 Subject: [PATCH] chore(openapi-v3-types): update openapi3-ts to 1.3.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miroslav Bajtoš --- packages/openapi-v3-types/package-lock.json | 6 +++--- packages/openapi-v3-types/package.json | 2 +- packages/openapi-v3-types/src/index.ts | 2 +- packages/openapi-v3-types/src/type-guards.ts | 21 -------------------- 4 files changed, 5 insertions(+), 26 deletions(-) delete mode 100644 packages/openapi-v3-types/src/type-guards.ts diff --git a/packages/openapi-v3-types/package-lock.json b/packages/openapi-v3-types/package-lock.json index 737367f5d56c..8977413b78a7 100644 --- a/packages/openapi-v3-types/package-lock.json +++ b/packages/openapi-v3-types/package-lock.json @@ -11,9 +11,9 @@ "dev": true }, "openapi3-ts": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/openapi3-ts/-/openapi3-ts-1.2.0.tgz", - "integrity": "sha512-oWRW8aI58UPD1ufx54y4QOCwqdQPedCRBKmqgwRUtetz4+NUJD2opWn3a0Te4yLzlFdf9eGinrKvc3uvD2Wegw==" + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/openapi3-ts/-/openapi3-ts-1.3.0.tgz", + "integrity": "sha512-Xk3hsB0PzB4dzr/r/FdmK+VfQbZH7lQQ2iipMS1/1eoz1wUvh5R7rmOakYvw0bQJJE6PYrOLx8UHsYmzgTr+YQ==" } } } diff --git a/packages/openapi-v3-types/package.json b/packages/openapi-v3-types/package.json index 95b64dd5e8d8..09791e91986b 100644 --- a/packages/openapi-v3-types/package.json +++ b/packages/openapi-v3-types/package.json @@ -6,7 +6,7 @@ "node": ">=8.9" }, "dependencies": { - "openapi3-ts": "^1.0.0" + "openapi3-ts": "^1.3.0" }, "devDependencies": { "@loopback/build": "^1.5.5", diff --git a/packages/openapi-v3-types/src/index.ts b/packages/openapi-v3-types/src/index.ts index 7b50105e02d2..756a4bbf3f00 100644 --- a/packages/openapi-v3-types/src/index.ts +++ b/packages/openapi-v3-types/src/index.ts @@ -4,4 +4,4 @@ // License text available at https://opensource.org/licenses/MIT export * from './openapi-v3-spec-types'; -export * from './type-guards'; + diff --git a/packages/openapi-v3-types/src/type-guards.ts b/packages/openapi-v3-types/src/type-guards.ts deleted file mode 100644 index 41619bf57c26..000000000000 --- a/packages/openapi-v3-types/src/type-guards.ts +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright IBM Corp. 2018. All Rights Reserved. -// Node module: @loopback/openapi-v3-types -// This file is licensed under the MIT License. -// License text available at https://opensource.org/licenses/MIT - -import {SchemaObject, ReferenceObject} from './openapi-v3-spec-types'; - -/** - * Type guard for OpenAPI 3.0.0 schema object - * @param schema - An OpenAPI 3.0.0 schema object - */ - -export function isSchemaObject( - schema: SchemaObject | ReferenceObject, -): schema is SchemaObject { - return !schema.hasOwnProperty('$ref'); -} - -export function isReferenceObject(obj: object): obj is ReferenceObject { - return obj.hasOwnProperty('$ref'); -}