Skip to content

Commit

Permalink
Remove x-api-id stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
gkoberger committed Mar 10, 2017
1 parent fffc107 commit deb6cdc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions api.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ exports.api = function(args, opts) {
return;
}

/*
var apiId = crypto.randomBytes(7).toString('hex');
if(!swagger['x-api-id']) {
Expand Down Expand Up @@ -74,6 +75,7 @@ exports.api = function(args, opts) {
}
}
*/

utils.removeMetadata(swagger);

Expand Down
2 changes: 1 addition & 1 deletion lib/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'],
Expand Down
1 change: 1 addition & 0 deletions utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down

0 comments on commit deb6cdc

Please sign in to comment.