Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class {{classname}} {

{{#operation}}
def {{operationId}} ({{#allParams}} {{{dataType}}} {{paramName}},{{/allParams}} Closure onSuccess, Closure onFailure) {
// create path and map variables
// create path and map path parameters (TODO)
String resourcePath = "{{path}}"

// query params
Expand All @@ -35,13 +35,15 @@ class {{classname}} {
{{/allParams}}

{{#queryParams}}if (!"null".equals(String.valueOf({{paramName}})))
queryParams.put("{{paramName}}", String.valueOf({{paramName}}))
queryParams.put("{{baseName}}", String.valueOf({{paramName}}))
{{/queryParams}}

{{#headerParams}}
headerParams.put("{{paramName}}", {{paramName}})
headerParams.put("{{baseName}}", {{paramName}})
{{/headerParams}}

// Also still TODO: form params, body param

invokeApi(onSuccess, onFailure, basePath, versionPath, resourcePath, queryParams, headerParams,
"{{httpMethod}}", "{{returnContainer}}",
{{#returnBaseType}}{{{returnBaseType}}}.class {{/returnBaseType}}{{^returnBaseType}}null {{/returnBaseType}})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class PetApi {
String versionPath = "/api/v1"

def addPet ( Pet body, Closure onSuccess, Closure onFailure) {
// create path and map variables
// create path and map path parameters (TODO)
String resourcePath = "/pet"

// query params
Expand All @@ -31,13 +31,15 @@ class PetApi {



// Also still TODO: form params, body param

invokeApi(onSuccess, onFailure, basePath, versionPath, resourcePath, queryParams, headerParams,
"POST", "",
null )

}
def deletePet ( Long petId, String apiKey, Closure onSuccess, Closure onFailure) {
// create path and map variables
// create path and map path parameters (TODO)
String resourcePath = "/pet/{petId}"

// query params
Expand All @@ -50,15 +52,17 @@ class PetApi {
}


headerParams.put("apiKey", apiKey)
headerParams.put("api_key", apiKey)

// Also still TODO: form params, body param

invokeApi(onSuccess, onFailure, basePath, versionPath, resourcePath, queryParams, headerParams,
"DELETE", "",
null )

}
def findPetsByStatus ( List<String> status, Closure onSuccess, Closure onFailure) {
// create path and map variables
// create path and map path parameters (TODO)
String resourcePath = "/pet/findByStatus"

// query params
Expand All @@ -74,13 +78,15 @@ class PetApi {
queryParams.put("status", String.valueOf(status))


// Also still TODO: form params, body param

invokeApi(onSuccess, onFailure, basePath, versionPath, resourcePath, queryParams, headerParams,
"GET", "array",
Pet.class )

}
def findPetsByTags ( List<String> tags, Closure onSuccess, Closure onFailure) {
// create path and map variables
// create path and map path parameters (TODO)
String resourcePath = "/pet/findByTags"

// query params
Expand All @@ -96,13 +102,15 @@ class PetApi {
queryParams.put("tags", String.valueOf(tags))


// Also still TODO: form params, body param

invokeApi(onSuccess, onFailure, basePath, versionPath, resourcePath, queryParams, headerParams,
"GET", "array",
Pet.class )

}
def getPetById ( Long petId, Closure onSuccess, Closure onFailure) {
// create path and map variables
// create path and map path parameters (TODO)
String resourcePath = "/pet/{petId}"

// query params
Expand All @@ -116,13 +124,15 @@ class PetApi {



// Also still TODO: form params, body param

invokeApi(onSuccess, onFailure, basePath, versionPath, resourcePath, queryParams, headerParams,
"GET", "",
Pet.class )

}
def updatePet ( Pet body, Closure onSuccess, Closure onFailure) {
// create path and map variables
// create path and map path parameters (TODO)
String resourcePath = "/pet"

// query params
Expand All @@ -136,13 +146,15 @@ class PetApi {



// Also still TODO: form params, body param

invokeApi(onSuccess, onFailure, basePath, versionPath, resourcePath, queryParams, headerParams,
"PUT", "",
null )

}
def updatePetWithForm ( Long petId, String name, String status, Closure onSuccess, Closure onFailure) {
// create path and map variables
// create path and map path parameters (TODO)
String resourcePath = "/pet/{petId}"

// query params
Expand All @@ -156,13 +168,15 @@ class PetApi {



// Also still TODO: form params, body param

invokeApi(onSuccess, onFailure, basePath, versionPath, resourcePath, queryParams, headerParams,
"POST", "",
null )

}
def uploadFile ( Long petId, String additionalMetadata, File file, Closure onSuccess, Closure onFailure) {
// create path and map variables
// create path and map path parameters (TODO)
String resourcePath = "/pet/{petId}/uploadImage"

// query params
Expand All @@ -176,6 +190,8 @@ class PetApi {



// Also still TODO: form params, body param

invokeApi(onSuccess, onFailure, basePath, versionPath, resourcePath, queryParams, headerParams,
"POST", "",
ModelApiResponse.class )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class StoreApi {
String versionPath = "/api/v1"

def deleteOrder ( String orderId, Closure onSuccess, Closure onFailure) {
// create path and map variables
// create path and map path parameters (TODO)
String resourcePath = "/store/order/{orderId}"

// query params
Expand All @@ -30,13 +30,15 @@ class StoreApi {



// Also still TODO: form params, body param

invokeApi(onSuccess, onFailure, basePath, versionPath, resourcePath, queryParams, headerParams,
"DELETE", "",
null )

}
def getInventory ( Closure onSuccess, Closure onFailure) {
// create path and map variables
// create path and map path parameters (TODO)
String resourcePath = "/store/inventory"

// query params
Expand All @@ -46,13 +48,15 @@ class StoreApi {



// Also still TODO: form params, body param

invokeApi(onSuccess, onFailure, basePath, versionPath, resourcePath, queryParams, headerParams,
"GET", "map",
Map.class )

}
def getOrderById ( Long orderId, Closure onSuccess, Closure onFailure) {
// create path and map variables
// create path and map path parameters (TODO)
String resourcePath = "/store/order/{orderId}"

// query params
Expand All @@ -66,13 +70,15 @@ class StoreApi {



// Also still TODO: form params, body param

invokeApi(onSuccess, onFailure, basePath, versionPath, resourcePath, queryParams, headerParams,
"GET", "",
Order.class )

}
def placeOrder ( Order body, Closure onSuccess, Closure onFailure) {
// create path and map variables
// create path and map path parameters (TODO)
String resourcePath = "/store/order"

// query params
Expand All @@ -86,6 +92,8 @@ class StoreApi {



// Also still TODO: form params, body param

invokeApi(onSuccess, onFailure, basePath, versionPath, resourcePath, queryParams, headerParams,
"POST", "",
Order.class )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class UserApi {
String versionPath = "/api/v1"

def createUser ( User body, Closure onSuccess, Closure onFailure) {
// create path and map variables
// create path and map path parameters (TODO)
String resourcePath = "/user"

// query params
Expand All @@ -29,13 +29,15 @@ class UserApi {



// Also still TODO: form params, body param

invokeApi(onSuccess, onFailure, basePath, versionPath, resourcePath, queryParams, headerParams,
"POST", "",
null )

}
def createUsersWithArrayInput ( List<User> body, Closure onSuccess, Closure onFailure) {
// create path and map variables
// create path and map path parameters (TODO)
String resourcePath = "/user/createWithArray"

// query params
Expand All @@ -49,13 +51,15 @@ class UserApi {



// Also still TODO: form params, body param

invokeApi(onSuccess, onFailure, basePath, versionPath, resourcePath, queryParams, headerParams,
"POST", "",
null )

}
def createUsersWithListInput ( List<User> body, Closure onSuccess, Closure onFailure) {
// create path and map variables
// create path and map path parameters (TODO)
String resourcePath = "/user/createWithList"

// query params
Expand All @@ -69,13 +73,15 @@ class UserApi {



// Also still TODO: form params, body param

invokeApi(onSuccess, onFailure, basePath, versionPath, resourcePath, queryParams, headerParams,
"POST", "",
null )

}
def deleteUser ( String username, Closure onSuccess, Closure onFailure) {
// create path and map variables
// create path and map path parameters (TODO)
String resourcePath = "/user/{username}"

// query params
Expand All @@ -89,13 +95,15 @@ class UserApi {



// Also still TODO: form params, body param

invokeApi(onSuccess, onFailure, basePath, versionPath, resourcePath, queryParams, headerParams,
"DELETE", "",
null )

}
def getUserByName ( String username, Closure onSuccess, Closure onFailure) {
// create path and map variables
// create path and map path parameters (TODO)
String resourcePath = "/user/{username}"

// query params
Expand All @@ -109,13 +117,15 @@ class UserApi {



// Also still TODO: form params, body param

invokeApi(onSuccess, onFailure, basePath, versionPath, resourcePath, queryParams, headerParams,
"GET", "",
User.class )

}
def loginUser ( String username, String password, Closure onSuccess, Closure onFailure) {
// create path and map variables
// create path and map path parameters (TODO)
String resourcePath = "/user/login"

// query params
Expand All @@ -137,13 +147,15 @@ if (!"null".equals(String.valueOf(password)))
queryParams.put("password", String.valueOf(password))


// Also still TODO: form params, body param

invokeApi(onSuccess, onFailure, basePath, versionPath, resourcePath, queryParams, headerParams,
"GET", "",
String.class )

}
def logoutUser ( Closure onSuccess, Closure onFailure) {
// create path and map variables
// create path and map path parameters (TODO)
String resourcePath = "/user/logout"

// query params
Expand All @@ -153,13 +165,15 @@ if (!"null".equals(String.valueOf(password)))



// Also still TODO: form params, body param

invokeApi(onSuccess, onFailure, basePath, versionPath, resourcePath, queryParams, headerParams,
"GET", "",
null )

}
def updateUser ( String username, User body, Closure onSuccess, Closure onFailure) {
// create path and map variables
// create path and map path parameters (TODO)
String resourcePath = "/user/{username}"

// query params
Expand All @@ -177,6 +191,8 @@ if (!"null".equals(String.valueOf(password)))



// Also still TODO: form params, body param

invokeApi(onSuccess, onFailure, basePath, versionPath, resourcePath, queryParams, headerParams,
"PUT", "",
null )
Expand Down