forked from loafle/openapi-generator-original
Merge pull request #409 from ethanjcohen/master
Fix "properties" name in node server example template
This commit is contained in:
commit
87be442ad9
@ -22,7 +22,7 @@ exports.getPetById = {
|
||||
"notes" : "Returns a pet based on ID",
|
||||
"summary" : "Find pet by ID",
|
||||
"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",
|
||||
"responseMessages" : [errors.invalid('id'), errors.notFound('Pet')],
|
||||
"nickname" : "getPetById"
|
||||
@ -41,7 +41,7 @@ exports.deletePet = {
|
||||
"notes" : "",
|
||||
"summary" : "Deletes a pet",
|
||||
"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" : "",
|
||||
"responseMessages" : [errors.invalid('id'), errors.notFound('')],
|
||||
"nickname" : "deletePet"
|
||||
@ -60,7 +60,7 @@ exports.partialUpdate = {
|
||||
"notes" : "",
|
||||
"summary" : "partial updates to a pet",
|
||||
"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]",
|
||||
"responseMessages" : [errors.invalid('id'), errors.notFound('List[Pet]')],
|
||||
@ -83,7 +83,7 @@ exports.updatePetWithForm = {
|
||||
"notes" : "",
|
||||
"summary" : "Updates a pet in the store with form data",
|
||||
"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" : "",
|
||||
"responseMessages" : [errors.invalid('id'), errors.notFound('')],
|
||||
"nickname" : "updatePetWithForm"
|
||||
@ -102,7 +102,7 @@ exports.uploadFile = {
|
||||
"notes" : "",
|
||||
"summary" : "uploads an image",
|
||||
"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" : "",
|
||||
"responseMessages" : [errors.invalid('id'), errors.notFound('')],
|
||||
@ -119,7 +119,7 @@ exports.addPet = {
|
||||
"notes" : "",
|
||||
"summary" : "Add a new pet to the store",
|
||||
"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" : "",
|
||||
"responseMessages" : [errors.invalid('id'), errors.notFound('')],
|
||||
@ -139,7 +139,7 @@ exports.updatePet = {
|
||||
"notes" : "",
|
||||
"summary" : "Update an existing pet",
|
||||
"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" : "",
|
||||
"responseMessages" : [errors.invalid('id'), errors.notFound('')],
|
||||
@ -159,7 +159,7 @@ exports.findPetsByStatus = {
|
||||
"notes" : "Multiple status values can be provided with comma seperated strings",
|
||||
"summary" : "Finds Pets by status",
|
||||
"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]",
|
||||
"responseMessages" : [errors.invalid('id'), errors.notFound('List[Pet]')],
|
||||
"nickname" : "findPetsByStatus"
|
||||
@ -178,7 +178,7 @@ exports.findPetsByTags = {
|
||||
"notes" : "Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.",
|
||||
"summary" : "Finds Pets by tags",
|
||||
"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]",
|
||||
"responseMessages" : [errors.invalid('id'), errors.notFound('List[Pet]')],
|
||||
"nickname" : "findPetsByTags"
|
||||
|
@ -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",
|
||||
"summary" : "Find purchase order by ID",
|
||||
"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",
|
||||
"responseMessages" : [errors.invalid('id'), errors.notFound('Order')],
|
||||
"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",
|
||||
"summary" : "Delete purchase order by ID",
|
||||
"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" : "",
|
||||
"responseMessages" : [errors.invalid('id'), errors.notFound('')],
|
||||
"nickname" : "deleteOrder"
|
||||
@ -60,7 +60,7 @@ exports.placeOrder = {
|
||||
"notes" : "",
|
||||
"summary" : "Place an order for a pet",
|
||||
"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" : "",
|
||||
"responseMessages" : [errors.invalid('id'), errors.notFound('')],
|
||||
|
@ -22,7 +22,7 @@ exports.updateUser = {
|
||||
"notes" : "This can only be done by the logged in user.",
|
||||
"summary" : "Updated user",
|
||||
"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" : "",
|
||||
"responseMessages" : [errors.invalid('id'), errors.notFound('')],
|
||||
@ -45,7 +45,7 @@ exports.deleteUser = {
|
||||
"notes" : "This can only be done by the logged in user.",
|
||||
"summary" : "Delete user",
|
||||
"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" : "",
|
||||
"responseMessages" : [errors.invalid('id'), errors.notFound('')],
|
||||
"nickname" : "deleteUser"
|
||||
@ -64,7 +64,7 @@ exports.getUserByName = {
|
||||
"notes" : "",
|
||||
"summary" : "Get user by user name",
|
||||
"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",
|
||||
"responseMessages" : [errors.invalid('id'), errors.notFound('User')],
|
||||
"nickname" : "getUserByName"
|
||||
@ -83,7 +83,7 @@ exports.loginUser = {
|
||||
"notes" : "",
|
||||
"summary" : "Logs user into the system",
|
||||
"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",
|
||||
"responseMessages" : [errors.invalid('id'), errors.notFound('String')],
|
||||
"nickname" : "loginUser"
|
||||
@ -105,7 +105,7 @@ exports.logoutUser = {
|
||||
"notes" : "",
|
||||
"summary" : "Logs out current logged in user session",
|
||||
"method": "GET",
|
||||
"params" : [].concat([]).concat([]).concat([]),
|
||||
"parameters" : [].concat([]).concat([]).concat([]),
|
||||
"type" : "",
|
||||
"responseMessages" : [errors.invalid('id'), errors.notFound('')],
|
||||
"nickname" : "logoutUser"
|
||||
@ -121,7 +121,7 @@ exports.createUser = {
|
||||
"notes" : "This can only be done by the logged in user.",
|
||||
"summary" : "Create user",
|
||||
"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" : "",
|
||||
"responseMessages" : [errors.invalid('id'), errors.notFound('')],
|
||||
@ -141,7 +141,7 @@ exports.createUsersWithArrayInput = {
|
||||
"notes" : "",
|
||||
"summary" : "Creates list of users with given input array",
|
||||
"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" : "",
|
||||
"responseMessages" : [errors.invalid('id'), errors.notFound('')],
|
||||
@ -161,7 +161,7 @@ exports.createUsersWithListInput = {
|
||||
"notes" : "",
|
||||
"summary" : "Creates list of users with given list input",
|
||||
"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" : "",
|
||||
"responseMessages" : [errors.invalid('id'), errors.notFound('')],
|
||||
|
@ -24,7 +24,7 @@ exports.{{nickname}} = {
|
||||
"notes" : "{{{notes}}}",
|
||||
"summary" : "{{{summary}}}",
|
||||
"method": "{{httpMethod}}",
|
||||
"params" : [{{#queryParams}}
|
||||
"parameters" : [{{#queryParams}}
|
||||
params.query("{{paramName}}", "{{description}}", "{{swaggerDataType}}", {{required}}, {{allowMultiple}}, "{{{allowableValues}}}"{{#defaultValue}}, {{{defaultValue}}}{{/defaultValue}}){{#hasMore}},{{/hasMore}}
|
||||
{{/queryParams}}].concat([{{#pathParams}}
|
||||
params.path("{{paramName}}", "{{description}}"){{#hasMore}},{{/hasMore}}
|
||||
|
Loading…
x
Reference in New Issue
Block a user