Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
321 changes: 113 additions & 208 deletions dist/api-spec-converter.js
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,7 @@ Converter.prototype.convertParameters = function (obj) {
delete param.example;
}
if (param.type === 'array') {
_this.convertItems(param);
var style = param.style || (param.in === 'query' || param.in === 'cookie' ? 'form' : 'simple');
if (style === 'matrix') {
param.collectionFormat = param.explode ? undefined : 'csv';
Expand All @@ -465,6 +466,13 @@ Converter.prototype.convertParameters = function (obj) {
});
};

Converter.prototype.convertItems = function (obj) {
obj.items = this.resolveReference(this.spec, obj.items, false);
if (obj.items.type === 'array') {
this.convertItems(obj.items);
}
};

Converter.prototype.copySchemaProperties = function (obj, props) {
var schema = this.resolveReference(this.spec, obj.schema, true);
if (!schema) return;
Expand Down Expand Up @@ -43045,53 +43053,37 @@ utils.intFromLE = intFromLE;
arguments[4][72][0].apply(exports,arguments)
},{"buffer":92,"dup":72}],247:[function(require,module,exports){
module.exports={
"_args": [
[
"elliptic@6.5.3",
"/home/rbren/git/api-spec-converter"
]
],
"_development": true,
"_from": "elliptic@6.5.3",
"_id": "elliptic@6.5.3",
"_inBundle": false,
"_integrity": "sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw==",
"_location": "/elliptic",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "elliptic@6.5.3",
"name": "elliptic",
"escapedName": "elliptic",
"rawSpec": "6.5.3",
"saveSpec": null,
"fetchSpec": "6.5.3"
},
"_requiredBy": [
"/browserify-sign",
"/create-ecdh"
"name": "elliptic",
"version": "6.5.3",
"description": "EC cryptography",
"main": "lib/elliptic.js",
"files": [
"lib"
],
"_resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.3.tgz",
"_spec": "6.5.3",
"_where": "/home/rbren/git/api-spec-converter",
"author": {
"name": "Fedor Indutny",
"email": "fedor@indutny.com"
"scripts": {
"jscs": "jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js",
"jshint": "jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js",
"lint": "npm run jscs && npm run jshint",
"unit": "istanbul test _mocha --reporter=spec test/index.js",
"test": "npm run lint && npm run unit",
"version": "grunt dist && git add dist/"
},
"repository": {
"type": "git",
"url": "git@github.com:indutny/elliptic"
},
"keywords": [
"EC",
"Elliptic",
"curve",
"Cryptography"
],
"author": "Fedor Indutny <fedor@indutny.com>",
"license": "MIT",
"bugs": {
"url": "https://github.com/indutny/elliptic/issues"
},
"dependencies": {
"bn.js": "^4.4.0",
"brorand": "^1.0.1",
"hash.js": "^1.0.0",
"hmac-drbg": "^1.0.0",
"inherits": "^2.0.1",
"minimalistic-assert": "^1.0.0",
"minimalistic-crypto-utils": "^1.0.0"
},
"description": "EC cryptography",
"homepage": "https://github.com/indutny/elliptic",
"devDependencies": {
"brfs": "^1.4.3",
"coveralls": "^3.0.8",
Expand All @@ -43108,32 +43100,15 @@ module.exports={
"jshint": "^2.10.3",
"mocha": "^6.2.2"
},
"files": [
"lib"
],
"homepage": "https://github.com/indutny/elliptic",
"keywords": [
"EC",
"Elliptic",
"curve",
"Cryptography"
],
"license": "MIT",
"main": "lib/elliptic.js",
"name": "elliptic",
"repository": {
"type": "git",
"url": "git+ssh://git@github.com/indutny/elliptic.git"
},
"scripts": {
"jscs": "jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js",
"jshint": "jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js",
"lint": "npm run jscs && npm run jshint",
"test": "npm run lint && npm run unit",
"unit": "istanbul test _mocha --reporter=spec test/index.js",
"version": "grunt dist && git add dist/"
},
"version": "6.5.3"
"dependencies": {
"bn.js": "^4.4.0",
"brorand": "^1.0.1",
"hash.js": "^1.0.0",
"hmac-drbg": "^1.0.0",
"inherits": "^2.0.1",
"minimalistic-assert": "^1.0.0",
"minimalistic-crypto-utils": "^1.0.0"
}
}

},{}],248:[function(require,module,exports){
Expand Down Expand Up @@ -172773,97 +172748,63 @@ module.exports = function (ast, vars) {
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
},{"./package.json":889,"estraverse":890,"source-map":861}],889:[function(require,module,exports){
module.exports={
"_args": [
[
"escodegen@0.0.28",
"/home/rbren/git/api-spec-converter"
]
],
"_from": "escodegen@0.0.28",
"_id": "escodegen@0.0.28",
"_inBundle": false,
"_integrity": "sha1-Dk/xcV8yh3XWyrUaxEpAbNer/9M=",
"_location": "/static-eval/escodegen",
"_optional": true,
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "escodegen@0.0.28",
"name": "escodegen",
"escapedName": "escodegen",
"rawSpec": "0.0.28",
"saveSpec": null,
"fetchSpec": "0.0.28"
},
"_requiredBy": [
"/static-eval"
],
"_resolved": "https://registry.npmjs.org/escodegen/-/escodegen-0.0.28.tgz",
"_spec": "0.0.28",
"_where": "/home/rbren/git/api-spec-converter",
"bin": {
"esgenerate": "bin/esgenerate.js",
"escodegen": "bin/escodegen.js"
},
"bugs": {
"url": "https://github.com/Constellation/escodegen/issues"
},
"dependencies": {
"esprima": "~1.0.2",
"estraverse": "~1.3.0",
"source-map": ">= 0.1.2"
},
"description": "ECMAScript code generator",
"devDependencies": {
"bower": "*",
"chai": "~1.7.2",
"commonjs-everywhere": "~0.8.0",
"esprima-moz": "*",
"grunt": "~0.4.1",
"grunt-cli": "~0.1.9",
"grunt-contrib-jshint": "~0.5.0",
"grunt-mocha-test": "~0.6.2",
"q": "*",
"semver": "*"
},
"engines": {
"node": ">=0.4.0"
},
"homepage": "http://github.com/Constellation/escodegen.html",
"licenses": [
{
"type": "BSD",
"url": "http://github.com/Constellation/escodegen/raw/master/LICENSE.BSD"
}
],
"main": "escodegen.js",
"maintainers": [
{
"name": "Yusuke Suzuki",
"email": "utatane.tea@gmail.com",
"url": "http://github.com/Constellation"
"description": "ECMAScript code generator",
"homepage": "http://github.com/Constellation/escodegen.html",
"main": "escodegen.js",
"bin": {
"esgenerate": "./bin/esgenerate.js",
"escodegen": "./bin/escodegen.js"
},
"version": "0.0.28",
"engines": {
"node": ">=0.4.0"
},
"maintainers": [
{
"name": "Yusuke Suzuki",
"email": "utatane.tea@gmail.com",
"web": "http://github.com/Constellation"
}
],
"repository": {
"type": "git",
"url": "http://github.com/Constellation/escodegen.git"
},
"dependencies": {
"esprima": "~1.0.2",
"estraverse": "~1.3.0"
},
"optionalDependencies": {
"source-map": ">= 0.1.2"
},
"devDependencies": {
"esprima-moz": "*",
"commonjs-everywhere": "~0.8.0",
"q": "*",
"bower": "*",
"semver": "*",
"chai": "~1.7.2",
"grunt-contrib-jshint": "~0.5.0",
"grunt-cli": "~0.1.9",
"grunt": "~0.4.1",
"grunt-mocha-test": "~0.6.2"
},
"licenses": [
{
"type": "BSD",
"url": "http://github.com/Constellation/escodegen/raw/master/LICENSE.BSD"
}
],
"scripts": {
"test": "grunt travis",
"unit-test": "grunt test",
"lint": "grunt lint",
"release": "node tools/release.js",
"build-min": "./node_modules/.bin/cjsify -ma path: tools/entry-point.js > escodegen.browser.min.js",
"build": "./node_modules/.bin/cjsify -a path: tools/entry-point.js > escodegen.browser.js"
}
],
"name": "escodegen",
"optionalDependencies": {
"source-map": ">= 0.1.2"
},
"repository": {
"type": "git",
"url": "git+ssh://git@github.com/Constellation/escodegen.git"
},
"scripts": {
"build": "cjsify -a path: tools/entry-point.js > escodegen.browser.js",
"build-min": "cjsify -ma path: tools/entry-point.js > escodegen.browser.min.js",
"lint": "grunt lint",
"release": "node tools/release.js",
"test": "grunt travis",
"unit-test": "grunt test"
},
"version": "0.0.28"
}

},{}],890:[function(require,module,exports){
/*
Copyright (C) 2012-2013 Yusuke Suzuki <utatane.tea@gmail.com>
Expand Down Expand Up @@ -180839,41 +180780,12 @@ module.exports = {

},{"./common.js":922,"./statusCodes.js":927,"call-me-maybe":145,"co":148,"fs":140,"jgexml/jpath.js":421,"js-yaml":425,"node-fetch":724,"path":749,"url":959}],924:[function(require,module,exports){
module.exports={
"_args": [
[
"swagger2openapi@2.9.4",
"/home/rbren/git/api-spec-converter"
]
],
"_from": "swagger2openapi@2.9.4",
"_id": "swagger2openapi@2.9.4",
"_inBundle": false,
"_integrity": "sha512-dc9gxEkxuJYPz9y0Fx3ypsaiA2enxHxz7Q0tlyjJ01TopT2aR/EuxZhIWkslaN/Fx5FTT2OOSlP5VnvTbvIj+Q==",
"_location": "/swagger2openapi",
"_optional": true,
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "swagger2openapi@2.9.4",
"name": "swagger2openapi",
"escapedName": "swagger2openapi",
"rawSpec": "2.9.4",
"saveSpec": null,
"fetchSpec": "2.9.4"
},
"_requiredBy": [
"/"
],
"_resolved": "https://registry.npmjs.org/swagger2openapi/-/swagger2openapi-2.9.4.tgz",
"_spec": "2.9.4",
"_where": "/home/rbren/git/api-spec-converter",
"author": {
"name": "Mike Ralphson",
"email": "mike.ralphson@gmail.com"
},
"name": "swagger2openapi",
"version": "2.9.4",
"description": "Convert Swagger 2.0 definitions to OpenApi 3.0 and validate",
"main": "index.js",
"bin": {
"swagger2openapi": "swagger2openapi.js"
"swagger2openapi": "./swagger2openapi.js"
},
"browserify": {
"transform": [
Expand All @@ -180887,9 +180799,12 @@ module.exports={
]
]
},
"bugs": {
"url": "https://github.com/Mermade/swagger2openapi/issues"
"repository": {
"url": "https://github.com/Mermade/swagger2openapi.git",
"type": "git"
},
"author": "Mike Ralphson <mike.ralphson@gmail.com>",
"license": "BSD-3-Clause",
"dependencies": {
"ajv": "^5.0.1",
"call-me-maybe": "^1.0.1",
Expand All @@ -180901,14 +180816,6 @@ module.exports={
"should": "^13.0.1",
"yargs": "^9.0.1"
},
"description": "Convert Swagger 2.0 definitions to OpenApi 3.0 and validate",
"devDependencies": {
"babel-core": "^6.24.1",
"babel-loader": "^7.1.0",
"babel-preset-es2015": "^6.24.1",
"webpack": "^3.5.6"
},
"homepage": "https://github.com/Mermade/swagger2openapi#readme",
"keywords": [
"swagger",
"openapi",
Expand All @@ -180920,14 +180827,12 @@ module.exports={
"validation",
"resolver"
],
"license": "BSD-3-Clause",
"main": "index.js",
"name": "swagger2openapi",
"repository": {
"url": "git+https://github.com/Mermade/swagger2openapi.git",
"type": "git"
},
"version": "2.9.4"
"devDependencies": {
"babel-core": "^6.24.1",
"babel-loader": "^7.1.0",
"babel-preset-es2015": "^6.24.1",
"webpack": "^3.5.6"
}
}

},{}],925:[function(require,module,exports){
Expand Down
Loading