forked from loafle/openapi-generator-original
[koly] generate nodejs codes
This commit is contained in:
parent
0ce6fd7b36
commit
98a2a22abf
@ -587,10 +587,6 @@ paths:
|
|||||||
description: "User not found"
|
description: "User not found"
|
||||||
x-swagger-router-controller: "User"
|
x-swagger-router-controller: "User"
|
||||||
securityDefinitions:
|
securityDefinitions:
|
||||||
api_key:
|
|
||||||
type: "apiKey"
|
|
||||||
name: "api_key"
|
|
||||||
in: "header"
|
|
||||||
petstore_auth:
|
petstore_auth:
|
||||||
type: "oauth2"
|
type: "oauth2"
|
||||||
authorizationUrl: "http://petstore.swagger.io/api/oauth/dialog"
|
authorizationUrl: "http://petstore.swagger.io/api/oauth/dialog"
|
||||||
@ -598,6 +594,10 @@ securityDefinitions:
|
|||||||
scopes:
|
scopes:
|
||||||
write:pets: "modify pets in your account"
|
write:pets: "modify pets in your account"
|
||||||
read:pets: "read your pets"
|
read:pets: "read your pets"
|
||||||
|
api_key:
|
||||||
|
type: "apiKey"
|
||||||
|
name: "api_key"
|
||||||
|
in: "header"
|
||||||
definitions:
|
definitions:
|
||||||
Order:
|
Order:
|
||||||
type: "object"
|
type: "object"
|
||||||
|
@ -13,7 +13,7 @@ exports.deletePet = function(args, res, next) {
|
|||||||
/**
|
/**
|
||||||
* parameters expected in the args:
|
* parameters expected in the args:
|
||||||
* petId (Long)
|
* petId (Long)
|
||||||
* apiKey (String)
|
* api_key (String)
|
||||||
**/
|
**/
|
||||||
// no response value expected for this operation
|
// no response value expected for this operation
|
||||||
res.end();
|
res.end();
|
||||||
@ -26,18 +26,18 @@ exports.findPetsByStatus = function(args, res, next) {
|
|||||||
**/
|
**/
|
||||||
var examples = {};
|
var examples = {};
|
||||||
examples['application/json'] = [ {
|
examples['application/json'] = [ {
|
||||||
"tags" : [ {
|
"photoUrls" : [ "aeiou" ],
|
||||||
"id" : 123456789,
|
"name" : "doggie",
|
||||||
"name" : "aeiou"
|
|
||||||
} ],
|
|
||||||
"id" : 123456789,
|
"id" : 123456789,
|
||||||
"category" : {
|
"category" : {
|
||||||
"id" : 123456789,
|
"name" : "aeiou",
|
||||||
"name" : "aeiou"
|
"id" : 123456789
|
||||||
},
|
},
|
||||||
"status" : "aeiou",
|
"tags" : [ {
|
||||||
"name" : "doggie",
|
"name" : "aeiou",
|
||||||
"photoUrls" : [ "aeiou" ]
|
"id" : 123456789
|
||||||
|
} ],
|
||||||
|
"status" : "aeiou"
|
||||||
} ];
|
} ];
|
||||||
if(Object.keys(examples).length > 0) {
|
if(Object.keys(examples).length > 0) {
|
||||||
res.setHeader('Content-Type', 'application/json');
|
res.setHeader('Content-Type', 'application/json');
|
||||||
@ -56,18 +56,18 @@ exports.findPetsByTags = function(args, res, next) {
|
|||||||
**/
|
**/
|
||||||
var examples = {};
|
var examples = {};
|
||||||
examples['application/json'] = [ {
|
examples['application/json'] = [ {
|
||||||
"tags" : [ {
|
"photoUrls" : [ "aeiou" ],
|
||||||
"id" : 123456789,
|
"name" : "doggie",
|
||||||
"name" : "aeiou"
|
|
||||||
} ],
|
|
||||||
"id" : 123456789,
|
"id" : 123456789,
|
||||||
"category" : {
|
"category" : {
|
||||||
"id" : 123456789,
|
"name" : "aeiou",
|
||||||
"name" : "aeiou"
|
"id" : 123456789
|
||||||
},
|
},
|
||||||
"status" : "aeiou",
|
"tags" : [ {
|
||||||
"name" : "doggie",
|
"name" : "aeiou",
|
||||||
"photoUrls" : [ "aeiou" ]
|
"id" : 123456789
|
||||||
|
} ],
|
||||||
|
"status" : "aeiou"
|
||||||
} ];
|
} ];
|
||||||
if(Object.keys(examples).length > 0) {
|
if(Object.keys(examples).length > 0) {
|
||||||
res.setHeader('Content-Type', 'application/json');
|
res.setHeader('Content-Type', 'application/json');
|
||||||
@ -86,18 +86,18 @@ exports.getPetById = function(args, res, next) {
|
|||||||
**/
|
**/
|
||||||
var examples = {};
|
var examples = {};
|
||||||
examples['application/json'] = {
|
examples['application/json'] = {
|
||||||
"tags" : [ {
|
"photoUrls" : [ "aeiou" ],
|
||||||
"id" : 123456789,
|
"name" : "doggie",
|
||||||
"name" : "aeiou"
|
|
||||||
} ],
|
|
||||||
"id" : 123456789,
|
"id" : 123456789,
|
||||||
"category" : {
|
"category" : {
|
||||||
"id" : 123456789,
|
"name" : "aeiou",
|
||||||
"name" : "aeiou"
|
"id" : 123456789
|
||||||
},
|
},
|
||||||
"status" : "aeiou",
|
"tags" : [ {
|
||||||
"name" : "doggie",
|
"name" : "aeiou",
|
||||||
"photoUrls" : [ "aeiou" ]
|
"id" : 123456789
|
||||||
|
} ],
|
||||||
|
"status" : "aeiou"
|
||||||
};
|
};
|
||||||
if(Object.keys(examples).length > 0) {
|
if(Object.keys(examples).length > 0) {
|
||||||
res.setHeader('Content-Type', 'application/json');
|
res.setHeader('Content-Type', 'application/json');
|
||||||
@ -138,9 +138,9 @@ exports.uploadFile = function(args, res, next) {
|
|||||||
**/
|
**/
|
||||||
var examples = {};
|
var examples = {};
|
||||||
examples['application/json'] = {
|
examples['application/json'] = {
|
||||||
"message" : "aeiou",
|
|
||||||
"code" : 123,
|
"code" : 123,
|
||||||
"type" : "aeiou"
|
"type" : "aeiou",
|
||||||
|
"message" : "aeiou"
|
||||||
};
|
};
|
||||||
if(Object.keys(examples).length > 0) {
|
if(Object.keys(examples).length > 0) {
|
||||||
res.setHeader('Content-Type', 'application/json');
|
res.setHeader('Content-Type', 'application/json');
|
||||||
|
@ -34,12 +34,12 @@ exports.getOrderById = function(args, res, next) {
|
|||||||
**/
|
**/
|
||||||
var examples = {};
|
var examples = {};
|
||||||
examples['application/json'] = {
|
examples['application/json'] = {
|
||||||
"id" : 123456789,
|
|
||||||
"petId" : 123456789,
|
"petId" : 123456789,
|
||||||
"complete" : true,
|
|
||||||
"status" : "aeiou",
|
|
||||||
"quantity" : 123,
|
"quantity" : 123,
|
||||||
"shipDate" : "2000-01-23T04:56:07.000+0000"
|
"id" : 123456789,
|
||||||
|
"shipDate" : "2000-01-23T04:56:07.000+0000",
|
||||||
|
"complete" : true,
|
||||||
|
"status" : "aeiou"
|
||||||
};
|
};
|
||||||
if(Object.keys(examples).length > 0) {
|
if(Object.keys(examples).length > 0) {
|
||||||
res.setHeader('Content-Type', 'application/json');
|
res.setHeader('Content-Type', 'application/json');
|
||||||
@ -58,12 +58,12 @@ exports.placeOrder = function(args, res, next) {
|
|||||||
**/
|
**/
|
||||||
var examples = {};
|
var examples = {};
|
||||||
examples['application/json'] = {
|
examples['application/json'] = {
|
||||||
"id" : 123456789,
|
|
||||||
"petId" : 123456789,
|
"petId" : 123456789,
|
||||||
"complete" : true,
|
|
||||||
"status" : "aeiou",
|
|
||||||
"quantity" : 123,
|
"quantity" : 123,
|
||||||
"shipDate" : "2000-01-23T04:56:07.000+0000"
|
"id" : 123456789,
|
||||||
|
"shipDate" : "2000-01-23T04:56:07.000+0000",
|
||||||
|
"complete" : true,
|
||||||
|
"status" : "aeiou"
|
||||||
};
|
};
|
||||||
if(Object.keys(examples).length > 0) {
|
if(Object.keys(examples).length > 0) {
|
||||||
res.setHeader('Content-Type', 'application/json');
|
res.setHeader('Content-Type', 'application/json');
|
||||||
|
@ -43,14 +43,14 @@ exports.getUserByName = function(args, res, next) {
|
|||||||
**/
|
**/
|
||||||
var examples = {};
|
var examples = {};
|
||||||
examples['application/json'] = {
|
examples['application/json'] = {
|
||||||
"id" : 123456789,
|
|
||||||
"lastName" : "aeiou",
|
|
||||||
"phone" : "aeiou",
|
|
||||||
"username" : "aeiou",
|
|
||||||
"email" : "aeiou",
|
|
||||||
"userStatus" : 123,
|
|
||||||
"firstName" : "aeiou",
|
"firstName" : "aeiou",
|
||||||
"password" : "aeiou"
|
"lastName" : "aeiou",
|
||||||
|
"password" : "aeiou",
|
||||||
|
"userStatus" : 123,
|
||||||
|
"phone" : "aeiou",
|
||||||
|
"id" : 123456789,
|
||||||
|
"email" : "aeiou",
|
||||||
|
"username" : "aeiou"
|
||||||
};
|
};
|
||||||
if(Object.keys(examples).length > 0) {
|
if(Object.keys(examples).length > 0) {
|
||||||
res.setHeader('Content-Type', 'application/json');
|
res.setHeader('Content-Type', 'application/json');
|
||||||
|
@ -11,6 +11,6 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"connect": "^3.2.0",
|
"connect": "^3.2.0",
|
||||||
"js-yaml": "^3.3.0",
|
"js-yaml": "^3.3.0",
|
||||||
"swagger-tools": "0.9.*"
|
"swagger-tools": "0.10.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user