Update NodeJS server petstore samples with OAS2, OAS3 (#113)

* update nodejs server oas2

* update nodejs server petstore with oas3

* update nodejs google cloud with oas2 petstore

* update nodejs server google function with oas3
This commit is contained in:
William Cheng
2018-04-17 22:58:13 +08:00
committed by GitHub
parent dc0cbd23b6
commit ddf10b98dc
19 changed files with 1698 additions and 153 deletions

View File

@@ -5,10 +5,10 @@
* Create user
* This can only be done by the logged in user.
*
* body User Created user object
* user User Created user object
* no response value expected for this operation
**/
exports.createUser = function(body) {
exports.createUser = function(user) {
return new Promise(function(resolve, reject) {
resolve();
});
@@ -17,12 +17,11 @@ exports.createUser = function(body) {
/**
* Creates list of users with given input array
*
*
* body List List of user object
* user List List of user object
* no response value expected for this operation
**/
exports.createUsersWithArrayInput = function(body) {
exports.createUsersWithArrayInput = function(user) {
return new Promise(function(resolve, reject) {
resolve();
});
@@ -31,12 +30,11 @@ exports.createUsersWithArrayInput = function(body) {
/**
* Creates list of users with given input array
*
*
* body List List of user object
* user List List of user object
* no response value expected for this operation
**/
exports.createUsersWithListInput = function(body) {
exports.createUsersWithListInput = function(user) {
return new Promise(function(resolve, reject) {
resolve();
});
@@ -59,7 +57,6 @@ exports.deleteUser = function(username) {
/**
* Get user by user name
*
*
* username String The name that needs to be fetched. Use user1 for testing.
* returns User
@@ -88,7 +85,6 @@ exports.getUserByName = function(username) {
/**
* Logs user into the system
*
*
* username String The user name for login
* password String The password for login in clear text
@@ -109,7 +105,6 @@ exports.loginUser = function(username,password) {
/**
* Logs out current logged in user session
*
*
* no response value expected for this operation
**/
@@ -125,10 +120,10 @@ exports.logoutUser = function() {
* This can only be done by the logged in user.
*
* username String name that need to be deleted
* body User Updated user object
* user User Updated user object
* no response value expected for this operation
**/
exports.updateUser = function(username,body) {
exports.updateUser = function(username,user) {
return new Promise(function(resolve, reject) {
resolve();
});