Skip to content

Commit 7e53a6e

Browse files
committed
Check version for min
1 parent acbeece commit 7e53a6e

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

lib/init.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ exports.run = function(config, info) {
151151
console.log('');
152152
console.log('To see what you can do with your API, type ' + 'oai help'.yellow + '.');
153153
console.log('');
154+
console.log('To publish your OAI file, type ' + 'oai host'.yellow + '!');
154155
console.log('');
155156

156157
process.exit();

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"author": "ReadMe <support@readme.io> (http://readme.io)",
3-
"name": "api",
4-
"description": "A collection of API tools",
3+
"name": "oai",
4+
"description": "A collection of Open API Initiative (Swagger) tools",
55
"bin": {
66
"api": "index.js"
77
},
@@ -10,6 +10,7 @@
1010
"apis",
1111
"swagger",
1212
"open api initiative",
13+
"oai",
1314
"apidoc",
1415
"microservice"
1516
],

utils.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,6 @@ exports.fileExists = function(file) {
142142

143143
exports.getSwaggerUrl = function(config, info, cb) {
144144
var status = exports.uploadAnimation();
145-
// TODO! Make them log in to upload
146145

147146
var user = jsonfile.readFileSync(config.apiFile);
148147

@@ -151,6 +150,7 @@ exports.getSwaggerUrl = function(config, info, cb) {
151150
'swagger': JSON.stringify(info.swagger),
152151
'cli': 1,
153152
'user': user.token,
153+
'cli-tool-version': require('./package.json').version,
154154
}
155155
}, function(err, res, url) {
156156
if (!res) {
@@ -170,6 +170,11 @@ exports.getSwaggerUrl = function(config, info, cb) {
170170
return process.exit();
171171
}
172172

173+
if (res.headers.warning) {
174+
console.log("");
175+
console.log("Warning! ".yellow + res.headers.warning.yellow);
176+
}
177+
173178
cb(url);
174179

175180
});

0 commit comments

Comments
 (0)