Merge pull request #409 from ethanjcohen/master

Fix "properties" name in node server example template
This commit is contained in:
Tony Tam 2015-02-02 22:42:56 -08:00
commit 87be442ad9
4 changed files with 21 additions and 21 deletions

View File

@ -22,7 +22,7 @@ exports.getPetById = {
"notes" : "Returns a pet based on ID", "notes" : "Returns a pet based on ID",
"summary" : "Find pet by ID", "summary" : "Find pet by ID",
"method": "GET", "method": "GET",
"params" : [].concat([params.path("petId", "ID of pet that needs to be fetched")]).concat([]).concat([]), "parameters" : [].concat([params.path("petId", "ID of pet that needs to be fetched")]).concat([]).concat([]),
"type" : "Pet", "type" : "Pet",
"responseMessages" : [errors.invalid('id'), errors.notFound('Pet')], "responseMessages" : [errors.invalid('id'), errors.notFound('Pet')],
"nickname" : "getPetById" "nickname" : "getPetById"
@ -41,7 +41,7 @@ exports.deletePet = {
"notes" : "", "notes" : "",
"summary" : "Deletes a pet", "summary" : "Deletes a pet",
"method": "DELETE", "method": "DELETE",
"params" : [].concat([params.path("petId", "Pet id to delete")]).concat([]).concat([]), "parameters" : [].concat([params.path("petId", "Pet id to delete")]).concat([]).concat([]),
"type" : "", "type" : "",
"responseMessages" : [errors.invalid('id'), errors.notFound('')], "responseMessages" : [errors.invalid('id'), errors.notFound('')],
"nickname" : "deletePet" "nickname" : "deletePet"
@ -60,7 +60,7 @@ exports.partialUpdate = {
"notes" : "", "notes" : "",
"summary" : "partial updates to a pet", "summary" : "partial updates to a pet",
"method": "PATCH", "method": "PATCH",
"params" : [].concat([params.path("petId", "ID of pet that needs to be fetched")]).concat([]).concat([params.body("body", "Pet", "Pet object that needs to be added to the store", true) "parameters" : [].concat([params.path("petId", "ID of pet that needs to be fetched")]).concat([]).concat([params.body("body", "Pet", "Pet object that needs to be added to the store", true)
]), ]),
"type" : "List[Pet]", "type" : "List[Pet]",
"responseMessages" : [errors.invalid('id'), errors.notFound('List[Pet]')], "responseMessages" : [errors.invalid('id'), errors.notFound('List[Pet]')],
@ -83,7 +83,7 @@ exports.updatePetWithForm = {
"notes" : "", "notes" : "",
"summary" : "Updates a pet in the store with form data", "summary" : "Updates a pet in the store with form data",
"method": "POST", "method": "POST",
"params" : [].concat([params.path("petId", "ID of pet that needs to be updated")]).concat([]).concat([]), "parameters" : [].concat([params.path("petId", "ID of pet that needs to be updated")]).concat([]).concat([]),
"type" : "", "type" : "",
"responseMessages" : [errors.invalid('id'), errors.notFound('')], "responseMessages" : [errors.invalid('id'), errors.notFound('')],
"nickname" : "updatePetWithForm" "nickname" : "updatePetWithForm"
@ -102,7 +102,7 @@ exports.uploadFile = {
"notes" : "", "notes" : "",
"summary" : "uploads an image", "summary" : "uploads an image",
"method": "POST", "method": "POST",
"params" : [].concat([]).concat([]).concat([params.body("body", "File", "file to upload", false) "parameters" : [].concat([]).concat([]).concat([params.body("body", "File", "file to upload", false)
]), ]),
"type" : "", "type" : "",
"responseMessages" : [errors.invalid('id'), errors.notFound('')], "responseMessages" : [errors.invalid('id'), errors.notFound('')],
@ -119,7 +119,7 @@ exports.addPet = {
"notes" : "", "notes" : "",
"summary" : "Add a new pet to the store", "summary" : "Add a new pet to the store",
"method": "POST", "method": "POST",
"params" : [].concat([]).concat([]).concat([params.body("body", "Pet", "Pet object that needs to be added to the store", true) "parameters" : [].concat([]).concat([]).concat([params.body("body", "Pet", "Pet object that needs to be added to the store", true)
]), ]),
"type" : "", "type" : "",
"responseMessages" : [errors.invalid('id'), errors.notFound('')], "responseMessages" : [errors.invalid('id'), errors.notFound('')],
@ -139,7 +139,7 @@ exports.updatePet = {
"notes" : "", "notes" : "",
"summary" : "Update an existing pet", "summary" : "Update an existing pet",
"method": "PUT", "method": "PUT",
"params" : [].concat([]).concat([]).concat([params.body("body", "Pet", "Pet object that needs to be updated in the store", true) "parameters" : [].concat([]).concat([]).concat([params.body("body", "Pet", "Pet object that needs to be updated in the store", true)
]), ]),
"type" : "", "type" : "",
"responseMessages" : [errors.invalid('id'), errors.notFound('')], "responseMessages" : [errors.invalid('id'), errors.notFound('')],
@ -159,7 +159,7 @@ exports.findPetsByStatus = {
"notes" : "Multiple status values can be provided with comma seperated strings", "notes" : "Multiple status values can be provided with comma seperated strings",
"summary" : "Finds Pets by status", "summary" : "Finds Pets by status",
"method": "GET", "method": "GET",
"params" : [params.query("status", "Status values that need to be considered for filter", "string", true, true, "LIST[available,pending,sold]", "available")].concat([]).concat([]).concat([]), "parameters" : [params.query("status", "Status values that need to be considered for filter", "string", true, true, "LIST[available,pending,sold]", "available")].concat([]).concat([]).concat([]),
"type" : "List[Pet]", "type" : "List[Pet]",
"responseMessages" : [errors.invalid('id'), errors.notFound('List[Pet]')], "responseMessages" : [errors.invalid('id'), errors.notFound('List[Pet]')],
"nickname" : "findPetsByStatus" "nickname" : "findPetsByStatus"
@ -178,7 +178,7 @@ exports.findPetsByTags = {
"notes" : "Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.", "notes" : "Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.",
"summary" : "Finds Pets by tags", "summary" : "Finds Pets by tags",
"method": "GET", "method": "GET",
"params" : [params.query("tags", "Tags to filter by", "string", true, true, "")].concat([]).concat([]).concat([]), "parameters" : [params.query("tags", "Tags to filter by", "string", true, true, "")].concat([]).concat([]).concat([]),
"type" : "List[Pet]", "type" : "List[Pet]",
"responseMessages" : [errors.invalid('id'), errors.notFound('List[Pet]')], "responseMessages" : [errors.invalid('id'), errors.notFound('List[Pet]')],
"nickname" : "findPetsByTags" "nickname" : "findPetsByTags"

View File

@ -22,7 +22,7 @@ exports.getOrderById = {
"notes" : "For valid response try integer IDs with value <= 5. Anything above 5 or nonintegers will generate API errors", "notes" : "For valid response try integer IDs with value <= 5. Anything above 5 or nonintegers will generate API errors",
"summary" : "Find purchase order by ID", "summary" : "Find purchase order by ID",
"method": "GET", "method": "GET",
"params" : [].concat([params.path("orderId", "ID of pet that needs to be fetched")]).concat([]).concat([]), "parameters" : [].concat([params.path("orderId", "ID of pet that needs to be fetched")]).concat([]).concat([]),
"type" : "Order", "type" : "Order",
"responseMessages" : [errors.invalid('id'), errors.notFound('Order')], "responseMessages" : [errors.invalid('id'), errors.notFound('Order')],
"nickname" : "getOrderById" "nickname" : "getOrderById"
@ -41,7 +41,7 @@ exports.deleteOrder = {
"notes" : "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", "notes" : "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors",
"summary" : "Delete purchase order by ID", "summary" : "Delete purchase order by ID",
"method": "DELETE", "method": "DELETE",
"params" : [].concat([params.path("orderId", "ID of the order that needs to be deleted")]).concat([]).concat([]), "parameters" : [].concat([params.path("orderId", "ID of the order that needs to be deleted")]).concat([]).concat([]),
"type" : "", "type" : "",
"responseMessages" : [errors.invalid('id'), errors.notFound('')], "responseMessages" : [errors.invalid('id'), errors.notFound('')],
"nickname" : "deleteOrder" "nickname" : "deleteOrder"
@ -60,7 +60,7 @@ exports.placeOrder = {
"notes" : "", "notes" : "",
"summary" : "Place an order for a pet", "summary" : "Place an order for a pet",
"method": "POST", "method": "POST",
"params" : [].concat([]).concat([]).concat([params.body("body", "Order", "order placed for purchasing the pet", true) "parameters" : [].concat([]).concat([]).concat([params.body("body", "Order", "order placed for purchasing the pet", true)
]), ]),
"type" : "", "type" : "",
"responseMessages" : [errors.invalid('id'), errors.notFound('')], "responseMessages" : [errors.invalid('id'), errors.notFound('')],

View File

@ -22,7 +22,7 @@ exports.updateUser = {
"notes" : "This can only be done by the logged in user.", "notes" : "This can only be done by the logged in user.",
"summary" : "Updated user", "summary" : "Updated user",
"method": "PUT", "method": "PUT",
"params" : [].concat([params.path("username", "name that need to be deleted")]).concat([]).concat([params.body("body", "User", "Updated user object", true) "parameters" : [].concat([params.path("username", "name that need to be deleted")]).concat([]).concat([params.body("body", "User", "Updated user object", true)
]), ]),
"type" : "", "type" : "",
"responseMessages" : [errors.invalid('id'), errors.notFound('')], "responseMessages" : [errors.invalid('id'), errors.notFound('')],
@ -45,7 +45,7 @@ exports.deleteUser = {
"notes" : "This can only be done by the logged in user.", "notes" : "This can only be done by the logged in user.",
"summary" : "Delete user", "summary" : "Delete user",
"method": "DELETE", "method": "DELETE",
"params" : [].concat([params.path("username", "The name that needs to be deleted")]).concat([]).concat([]), "parameters" : [].concat([params.path("username", "The name that needs to be deleted")]).concat([]).concat([]),
"type" : "", "type" : "",
"responseMessages" : [errors.invalid('id'), errors.notFound('')], "responseMessages" : [errors.invalid('id'), errors.notFound('')],
"nickname" : "deleteUser" "nickname" : "deleteUser"
@ -64,7 +64,7 @@ exports.getUserByName = {
"notes" : "", "notes" : "",
"summary" : "Get user by user name", "summary" : "Get user by user name",
"method": "GET", "method": "GET",
"params" : [].concat([params.path("username", "The name that needs to be fetched. Use user1 for testing.")]).concat([]).concat([]), "parameters" : [].concat([params.path("username", "The name that needs to be fetched. Use user1 for testing.")]).concat([]).concat([]),
"type" : "User", "type" : "User",
"responseMessages" : [errors.invalid('id'), errors.notFound('User')], "responseMessages" : [errors.invalid('id'), errors.notFound('User')],
"nickname" : "getUserByName" "nickname" : "getUserByName"
@ -83,7 +83,7 @@ exports.loginUser = {
"notes" : "", "notes" : "",
"summary" : "Logs user into the system", "summary" : "Logs user into the system",
"method": "GET", "method": "GET",
"params" : [params.query("username", "The user name for login", "string", true, false, ""),params.query("password", "The password for login in clear text", "string", true, false, "")].concat([]).concat([]).concat([]), "parameters" : [params.query("username", "The user name for login", "string", true, false, ""),params.query("password", "The password for login in clear text", "string", true, false, "")].concat([]).concat([]).concat([]),
"type" : "String", "type" : "String",
"responseMessages" : [errors.invalid('id'), errors.notFound('String')], "responseMessages" : [errors.invalid('id'), errors.notFound('String')],
"nickname" : "loginUser" "nickname" : "loginUser"
@ -105,7 +105,7 @@ exports.logoutUser = {
"notes" : "", "notes" : "",
"summary" : "Logs out current logged in user session", "summary" : "Logs out current logged in user session",
"method": "GET", "method": "GET",
"params" : [].concat([]).concat([]).concat([]), "parameters" : [].concat([]).concat([]).concat([]),
"type" : "", "type" : "",
"responseMessages" : [errors.invalid('id'), errors.notFound('')], "responseMessages" : [errors.invalid('id'), errors.notFound('')],
"nickname" : "logoutUser" "nickname" : "logoutUser"
@ -121,7 +121,7 @@ exports.createUser = {
"notes" : "This can only be done by the logged in user.", "notes" : "This can only be done by the logged in user.",
"summary" : "Create user", "summary" : "Create user",
"method": "POST", "method": "POST",
"params" : [].concat([]).concat([]).concat([params.body("body", "User", "Created user object", true) "parameters" : [].concat([]).concat([]).concat([params.body("body", "User", "Created user object", true)
]), ]),
"type" : "", "type" : "",
"responseMessages" : [errors.invalid('id'), errors.notFound('')], "responseMessages" : [errors.invalid('id'), errors.notFound('')],
@ -141,7 +141,7 @@ exports.createUsersWithArrayInput = {
"notes" : "", "notes" : "",
"summary" : "Creates list of users with given input array", "summary" : "Creates list of users with given input array",
"method": "POST", "method": "POST",
"params" : [].concat([]).concat([]).concat([params.body("body", "Array[User]", "List of user object", true) "parameters" : [].concat([]).concat([]).concat([params.body("body", "Array[User]", "List of user object", true)
]), ]),
"type" : "", "type" : "",
"responseMessages" : [errors.invalid('id'), errors.notFound('')], "responseMessages" : [errors.invalid('id'), errors.notFound('')],
@ -161,7 +161,7 @@ exports.createUsersWithListInput = {
"notes" : "", "notes" : "",
"summary" : "Creates list of users with given list input", "summary" : "Creates list of users with given list input",
"method": "POST", "method": "POST",
"params" : [].concat([]).concat([]).concat([params.body("body", "Array[User]", "List of user object", true) "parameters" : [].concat([]).concat([]).concat([params.body("body", "Array[User]", "List of user object", true)
]), ]),
"type" : "", "type" : "",
"responseMessages" : [errors.invalid('id'), errors.notFound('')], "responseMessages" : [errors.invalid('id'), errors.notFound('')],

View File

@ -24,7 +24,7 @@ exports.{{nickname}} = {
"notes" : "{{{notes}}}", "notes" : "{{{notes}}}",
"summary" : "{{{summary}}}", "summary" : "{{{summary}}}",
"method": "{{httpMethod}}", "method": "{{httpMethod}}",
"params" : [{{#queryParams}} "parameters" : [{{#queryParams}}
params.query("{{paramName}}", "{{description}}", "{{swaggerDataType}}", {{required}}, {{allowMultiple}}, "{{{allowableValues}}}"{{#defaultValue}}, {{{defaultValue}}}{{/defaultValue}}){{#hasMore}},{{/hasMore}} params.query("{{paramName}}", "{{description}}", "{{swaggerDataType}}", {{required}}, {{allowMultiple}}, "{{{allowableValues}}}"{{#defaultValue}}, {{{defaultValue}}}{{/defaultValue}}){{#hasMore}},{{/hasMore}}
{{/queryParams}}].concat([{{#pathParams}} {{/queryParams}}].concat([{{#pathParams}}
params.path("{{paramName}}", "{{description}}"){{#hasMore}},{{/hasMore}} params.path("{{paramName}}", "{{description}}"){{#hasMore}},{{/hasMore}}