Skip to content

Commit

Permalink
feat: create @loopback/openapi-specgen
Browse files Browse the repository at this point in the history
  • Loading branch information
jannyHou committed Dec 27, 2017
1 parent b008e07 commit 196d5cc
Show file tree
Hide file tree
Showing 30 changed files with 517 additions and 394 deletions.
3 changes: 3 additions & 0 deletions packages/openapi-specgen/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*.tgz
dist*
package
1 change: 1 addition & 0 deletions packages/openapi-specgen/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package-lock=false
Empty file.
25 changes: 25 additions & 0 deletions packages/openapi-specgen/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
Copyright (c) IBM Corp. 2017. All Rights Reserved.
Node module: @loopback/openapi-spec
This project is licensed under the MIT License, full text below.

--------

MIT license

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
Empty file.
12 changes: 12 additions & 0 deletions packages/openapi-specgen/docs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"content": [
"index.ts",
"src/index.ts",
"src/decorators/controller-decorators/metadata.ts"
],
"codeSectionDepth": 4,
"assets": {
"/": "/docs",
"/docs": "/docs"
}
}
5 changes: 5 additions & 0 deletions packages/openapi-specgen/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// Copyright IBM Corp. 2017. All Rights Reserved.
// Node module: @loopback/openapi-spec
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT
export * from './dist/src';
9 changes: 9 additions & 0 deletions packages/openapi-specgen/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// Copyright IBM Corp. 2013,2017. All Rights Reserved.
// Node module: @loopback/testlab
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT

const nodeMajorVersion = +process.versions.node.split('.')[0];
module.exports = nodeMajorVersion >= 7 ?
require('./dist/src') :
require('./dist6/src');
6 changes: 6 additions & 0 deletions packages/openapi-specgen/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// Copyright IBM Corp. 2013,2017. All Rights Reserved.
// Node module: @loopback/openapi-spec
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT
// NOTE(bajtos) This file is used by VSCode/TypeScriptServer at dev time only
export * from './src';
50 changes: 50 additions & 0 deletions packages/openapi-specgen/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
"name": "@loopback/openapi-specgen",
"version": "1.0.0-alpha1",
"description": "Spec gen",
"engines": {
"node": ">=6"
},
"devDependencies": {
"@loopback/build": "^4.0.0-alpha.7",
"@loopback/testlab": "^4.0.0-alpha.16",
"@loopback/openapi-spec-builder": "^4.0.0-alpha.14"
},
"scripts": {
"build": "npm run build:dist && npm run build:dist6",
"build:current": "lb-tsc",
"build:dist": "lb-tsc es2017",
"build:dist6": "lb-tsc es2015",
"build:apidocs": "lb-apidocs",
"clean": "rm -rf loopback-openapi-specgen*.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"
},
"author": "IBM",
"license": "MIT",
"keywords": [
"Swagger",
"OpenAPI Spec",
"TypeScript"
],
"files": [
"README.md",
"index.js",
"index.d.ts",
"dist/src",
"dist6/src",
"api-docs",
"src"
],
"repository": {
"type": "git",
"url": "https://github.com/strongloop/loopback-next.git"
},
"dependencies": {
"@loopback/context": "^4.0.0-alpha.22",
"lodash": "^4.17.4",
"@loopback/openapi-spec": "^4.0.0-alpha.17"
}
}
File renamed without changes.
1 change: 1 addition & 0 deletions packages/openapi-specgen/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './decorators/controller-decorators/metadata';
Loading

0 comments on commit 196d5cc

Please sign in to comment.