update R petstore sample

This commit is contained in:
wing328
2017-10-19 18:19:30 +08:00
parent 3472c68e0b
commit be7daa0792
9 changed files with 26 additions and 26 deletions

View File

@@ -65,9 +65,9 @@ ApiResponse <- R6::R6Class(
toJSONString = function() {
sprintf(
'{
"code": "%s",
"type": "%s",
"message": "%s"
"code": %s,
"type": %s,
"message": %s
}',
self$`code`,
self$`type`,

View File

@@ -54,7 +54,7 @@ Category <- R6::R6Class(
sprintf(
'{
"id": %d,
"name": "%s"
"name": %s
}',
self$`id`,
self$`name`

View File

@@ -102,10 +102,10 @@ Order <- R6::R6Class(
'{
"id": %d,
"petId": %d,
"quantity": "%s",
"shipDate": "%s",
"status": "%s",
"complete": "%s"
"quantity": %s,
"shipDate": %s,
"status": %s,
"complete": %s
}',
self$`id`,
self$`petId`,

View File

@@ -111,10 +111,10 @@ Pet <- R6::R6Class(
'{
"id": %d,
"category": %s,
"name": "%s",
"photoUrls": ["%s"],
"name": %s,
"photoUrls": [%s],
"tags": [%s],
"status": "%s"
"status": %s
}',
self$`id`,
self$`category`$toJSON(),

View File

@@ -63,7 +63,7 @@ PetApi <- R6::R6Class(
queryParams <- list()
headerParams <- character()
if (!missing(`body`)) {
body <- `body`$toJSON()
body <- `body`$toJSONString()
}
urlPath <- "/pet"
@@ -207,7 +207,7 @@ PetApi <- R6::R6Class(
queryParams <- list()
headerParams <- character()
if (!missing(`body`)) {
body <- `body`$toJSON()
body <- `body`$toJSONString()
}
urlPath <- "/pet"

View File

@@ -133,7 +133,7 @@ StoreApi <- R6::R6Class(
queryParams <- list()
headerParams <- character()
if (!missing(`body`)) {
body <- `body`$toJSON()
body <- `body`$toJSONString()
}
urlPath <- "/store/order"

View File

@@ -54,7 +54,7 @@ Tag <- R6::R6Class(
sprintf(
'{
"id": %d,
"name": "%s"
"name": %s
}',
self$`id`,
self$`name`

View File

@@ -126,13 +126,13 @@ User <- R6::R6Class(
sprintf(
'{
"id": %d,
"username": "%s",
"firstName": "%s",
"lastName": "%s",
"email": "%s",
"password": "%s",
"phone": "%s",
"userStatus": "%s"
"username": %s,
"firstName": %s,
"lastName": %s,
"email": %s,
"password": %s,
"phone": %s,
"userStatus": %s
}',
self$`id`,
self$`username`,

View File

@@ -63,7 +63,7 @@ UserApi <- R6::R6Class(
queryParams <- list()
headerParams <- character()
if (!missing(`body`)) {
body <- `body`$toJSON()
body <- `body`$toJSONString()
}
urlPath <- "/user"
@@ -90,7 +90,7 @@ UserApi <- R6::R6Class(
queryParams <- list()
headerParams <- character()
if (!missing(`body`)) {
body <- `body`$toJSON()
body <- `body`$toJSONString()
}
urlPath <- "/user/createWithArray"
@@ -117,7 +117,7 @@ UserApi <- R6::R6Class(
queryParams <- list()
headerParams <- character()
if (!missing(`body`)) {
body <- `body`$toJSON()
body <- `body`$toJSONString()
}
urlPath <- "/user/createWithList"
@@ -256,7 +256,7 @@ UserApi <- R6::R6Class(
queryParams <- list()
headerParams <- character()
if (!missing(`body`)) {
body <- `body`$toJSON()
body <- `body`$toJSONString()
}
urlPath <- "/user/{username}"