From 3d8a9985bea9672c082f06d82c625b85543833a3 Mon Sep 17 00:00:00 2001 From: jannyHou Date: Tue, 2 Jan 2018 14:20:04 -0500 Subject: [PATCH] refactor: replace old name --- packages/authentication/package.json | 2 +- packages/authentication/test/acceptance/basic-auth.ts | 2 +- packages/openapi-v2/README.md | 4 ++-- packages/openapi-v2/package.json | 4 ++-- packages/rest/package.json | 2 +- packages/rest/src/http-handler.ts | 2 +- packages/rest/src/rest-server.ts | 2 +- packages/rest/src/router/routing-table.ts | 2 +- packages/rest/test/acceptance/routing/routing.acceptance.ts | 2 +- packages/rest/test/acceptance/sequence/sequence.acceptance.ts | 2 +- packages/rest/test/integration/http-handler.integration.ts | 2 +- .../test/unit/rest-server/rest-server.open-api-spec.test.ts | 2 +- packages/rest/test/unit/router/routing-table.test.ts | 2 +- 13 files changed, 15 insertions(+), 15 deletions(-) diff --git a/packages/authentication/package.json b/packages/authentication/package.json index deebd04e4952..c8057e2632a9 100644 --- a/packages/authentication/package.json +++ b/packages/authentication/package.json @@ -25,7 +25,7 @@ "dependencies": { "@loopback/context": "^4.0.0-alpha.24", "@loopback/core": "^4.0.0-alpha.26", - "@loopback/openapi-specgen": "1.0.0-alpha1", + "@loopback/openapi-v2": "1.0.0-alpha1", "@loopback/rest": "^4.0.0-alpha.15", "passport": "^0.4.0", "passport-strategy": "^1.0.0" diff --git a/packages/authentication/test/acceptance/basic-auth.ts b/packages/authentication/test/acceptance/basic-auth.ts index 9e37a1bc8ba1..9ef83432df2b 100644 --- a/packages/authentication/test/acceptance/basic-auth.ts +++ b/packages/authentication/test/acceptance/basic-auth.ts @@ -17,7 +17,7 @@ import { RestServer, RestComponent, } from '@loopback/rest'; -import {api, get} from '@loopback/openapi-specgen'; +import {api, get} from '@loopback/openapi-v2'; import {Client, createClientForHandler} from '@loopback/testlab'; import {anOpenApiSpec} from '@loopback/openapi-spec-builder'; import {inject, Provider, ValueOrPromise} from '@loopback/context'; diff --git a/packages/openapi-v2/README.md b/packages/openapi-v2/README.md index 4c43422082ce..756a0cc74d30 100644 --- a/packages/openapi-v2/README.md +++ b/packages/openapi-v2/README.md @@ -8,7 +8,7 @@ This package contains: ## Installation ``` -$ npm install --save @loopback/openapi-specgen +$ npm install --save @loopback/openapi-v2 ``` ## Basic use @@ -19,7 +19,7 @@ It generates swagger `paths` and `basePath` specs for a given decorated controll Here is an example of calling function `getControllerSpec` to generate the swagger spec: ```js -import {api, getControllerSpec} from '@loopback/openapi-specgen'; +import {api, getControllerSpec} from '@loopback/openapi-v2'; @api(somePathSpec) class MyController { diff --git a/packages/openapi-v2/package.json b/packages/openapi-v2/package.json index befe2c4eb028..85d223cb3654 100644 --- a/packages/openapi-v2/package.json +++ b/packages/openapi-v2/package.json @@ -16,11 +16,11 @@ "build:dist": "lb-tsc es2017", "build:dist6": "lb-tsc es2015", "build:apidocs": "lb-apidocs", - "clean": "rm -rf loopback-openapi-specgen*.tgz dist* package", + "clean": "rm -rf loopback-openapi-v2*.tgz dist* package", "prepare": "npm run build && npm run build:apidocs", "pretest": "npm run build:current", "unit": "lb-dist mocha --opts ../../test/mocha.opts 'DIST/test/unit/**/*.js'", - "verify": "npm pack && tar xf loopback-openapi-specgen*.tgz && tree package && npm run clean" + "verify": "npm pack && tar xf loopback-openapi-v2*.tgz && tree package && npm run clean" }, "author": "IBM", "license": "MIT", diff --git a/packages/rest/package.json b/packages/rest/package.json index 359f0486721f..9067c91c6193 100644 --- a/packages/rest/package.json +++ b/packages/rest/package.json @@ -26,7 +26,7 @@ "@loopback/context": "^4.0.0-alpha.23", "@loopback/core": "^4.0.0-alpha.25", "@loopback/openapi-spec": "^4.0.0-alpha.17", - "@loopback/openapi-specgen": "^1.0.0-alpha.1", + "@loopback/openapi-v2": "^1.0.0-alpha.1", "@types/http-errors": "^1.6.1", "body": "^5.1.0", "debug": "^3.1.0", diff --git a/packages/rest/src/http-handler.ts b/packages/rest/src/http-handler.ts index 6006be7d3756..c3997ba9a0a5 100644 --- a/packages/rest/src/http-handler.ts +++ b/packages/rest/src/http-handler.ts @@ -6,7 +6,7 @@ import {Context} from '@loopback/context'; import {PathsObject} from '@loopback/openapi-spec'; import {ServerRequest, ServerResponse} from 'http'; -import {ControllerSpec} from '@loopback/openapi-specgen'; +import {ControllerSpec} from '@loopback/openapi-v2'; import {SequenceHandler} from './sequence'; import { diff --git a/packages/rest/src/rest-server.ts b/packages/rest/src/rest-server.ts index d4c8f852dbff..324f961af9a5 100644 --- a/packages/rest/src/rest-server.ts +++ b/packages/rest/src/rest-server.ts @@ -16,7 +16,7 @@ import { import {ServerRequest, ServerResponse, createServer} from 'http'; import * as Http from 'http'; import {Application, CoreBindings, Server} from '@loopback/core'; -import {getControllerSpec} from '@loopback/openapi-specgen'; +import {getControllerSpec} from '@loopback/openapi-v2'; import {HttpHandler} from './http-handler'; import {DefaultSequence, SequenceHandler, SequenceFunction} from './sequence'; import { diff --git a/packages/rest/src/router/routing-table.ts b/packages/rest/src/router/routing-table.ts index 6c18f9dfc5de..8e93d8a33b60 100644 --- a/packages/rest/src/router/routing-table.ts +++ b/packages/rest/src/router/routing-table.ts @@ -19,7 +19,7 @@ import { OperationRetval, } from '../internal-types'; -import {ControllerSpec} from '@loopback/openapi-specgen'; +import {ControllerSpec} from '@loopback/openapi-v2'; import * as assert from 'assert'; import * as url from 'url'; diff --git a/packages/rest/test/acceptance/routing/routing.acceptance.ts b/packages/rest/test/acceptance/routing/routing.acceptance.ts index 77d639204715..487db259347b 100644 --- a/packages/rest/test/acceptance/routing/routing.acceptance.ts +++ b/packages/rest/test/acceptance/routing/routing.acceptance.ts @@ -12,7 +12,7 @@ import { RestComponent, } from '../../..'; -import {api, get, param} from '@loopback/openapi-specgen'; +import {api, get, param} from '@loopback/openapi-v2'; import {Application} from '@loopback/core'; diff --git a/packages/rest/test/acceptance/sequence/sequence.acceptance.ts b/packages/rest/test/acceptance/sequence/sequence.acceptance.ts index 14ca30714c7b..f9f9af70b560 100644 --- a/packages/rest/test/acceptance/sequence/sequence.acceptance.ts +++ b/packages/rest/test/acceptance/sequence/sequence.acceptance.ts @@ -17,7 +17,7 @@ import { RestServer, RestComponent, } from '../../..'; -import {api} from '@loopback/openapi-specgen'; +import {api} from '@loopback/openapi-v2'; import {Application} from '@loopback/core'; import {expect, Client, createClientForHandler} from '@loopback/testlab'; import {anOpenApiSpec} from '@loopback/openapi-spec-builder'; diff --git a/packages/rest/test/integration/http-handler.integration.ts b/packages/rest/test/integration/http-handler.integration.ts index 30bf8d2c4f1d..57d09b65fd55 100644 --- a/packages/rest/test/integration/http-handler.integration.ts +++ b/packages/rest/test/integration/http-handler.integration.ts @@ -11,7 +11,7 @@ import { parseOperationArgs, RestBindings, } from '../..'; -import {ControllerSpec, get} from '@loopback/openapi-specgen'; +import {ControllerSpec, get} from '@loopback/openapi-v2'; import {Context} from '@loopback/context'; import {Client, createClientForHandler} from '@loopback/testlab'; import * as HttpErrors from 'http-errors'; diff --git a/packages/rest/test/unit/rest-server/rest-server.open-api-spec.test.ts b/packages/rest/test/unit/rest-server/rest-server.open-api-spec.test.ts index 932274464fba..1f9c7543d6d2 100644 --- a/packages/rest/test/unit/rest-server/rest-server.open-api-spec.test.ts +++ b/packages/rest/test/unit/rest-server/rest-server.open-api-spec.test.ts @@ -6,7 +6,7 @@ import {expect, validateApiSpec} from '@loopback/testlab'; import {Application} from '@loopback/core'; import {RestServer, Route, RestComponent} from '../../..'; -import {get} from '@loopback/openapi-specgen'; +import {get} from '@loopback/openapi-v2'; import {anOpenApiSpec} from '@loopback/openapi-spec-builder'; describe('RestServer.getApiSpec()', () => { diff --git a/packages/rest/test/unit/router/routing-table.test.ts b/packages/rest/test/unit/router/routing-table.test.ts index 0dc6c7c55ed8..7cff97033fc9 100644 --- a/packages/rest/test/unit/router/routing-table.test.ts +++ b/packages/rest/test/unit/router/routing-table.test.ts @@ -9,7 +9,7 @@ import { RoutingTable, ControllerRoute, } from '../../..'; -import {getControllerSpec, param, get} from '@loopback/openapi-specgen'; +import {getControllerSpec, param, get} from '@loopback/openapi-v2'; import {expect, ShotRequestOptions, ShotRequest} from '@loopback/testlab'; import {anOpenApiSpec} from '@loopback/openapi-spec-builder';