diff --git a/api.js b/api.js index 65c60d901..0eb2a4914 100644 --- a/api.js +++ b/api.js @@ -42,6 +42,7 @@ exports.api = function(args, opts) { return; } + /* var apiId = crypto.randomBytes(7).toString('hex'); if(!swagger['x-api-id']) { @@ -74,6 +75,7 @@ exports.api = function(args, opts) { } } + */ utils.removeMetadata(swagger); diff --git a/lib/init.js b/lib/init.js index 3b055d531..5277eaca6 100644 --- a/lib/init.js +++ b/lib/init.js @@ -103,7 +103,7 @@ exports.run = function(config, info) { inquirer.prompt(questions).then(function (answers) { var swagger = { 'swagger': '2.0', - 'x-api-id': crypto.randomBytes(7).toString('hex'), + //'x-api-id': crypto.randomBytes(7).toString('hex'), 'info': { 'version': answers['info.version'], 'title': answers['info.title'], diff --git a/utils.js b/utils.js index 202671488..5608bf9ca 100644 --- a/utils.js +++ b/utils.js @@ -78,6 +78,7 @@ exports.getAliasFile = function(unknownAction) { }; exports.removeMetadata = function(obj) { + // x-si = swagger inline metadata for(prop in obj) { if (prop.substr(0, 5) === 'x-si-') delete obj[prop];