forked from loafle/openapi-generator-original
add toString method in models (#12706)
This commit is contained in:
parent
229b2dcfac
commit
9522f6d1e2
@ -349,8 +349,17 @@
|
||||
stop(paste("The JSON input `", input, "` is invalid for {{classname}}: the required field `{{name}}` is missing."))
|
||||
}
|
||||
{{/requiredVars}}
|
||||
},
|
||||
#' To string (JSON format)
|
||||
#'
|
||||
#' @description
|
||||
#' To string (JSON format)
|
||||
#'
|
||||
#' @return String representation of {{{classname}}}
|
||||
#' @export
|
||||
toString = function() {
|
||||
self$toJSONString()
|
||||
}
|
||||
|
||||
)
|
||||
)
|
||||
{{/isEnum}}
|
||||
|
@ -195,8 +195,17 @@ AllofTagApiResponse <- R6::R6Class(
|
||||
#' @export
|
||||
validateJSON = function(input) {
|
||||
input_json <- jsonlite::fromJSON(input)
|
||||
},
|
||||
#' To string (JSON format)
|
||||
#'
|
||||
#' @description
|
||||
#' To string (JSON format)
|
||||
#'
|
||||
#' @return String representation of AllofTagApiResponse
|
||||
#' @export
|
||||
toString = function() {
|
||||
self$toJSONString()
|
||||
}
|
||||
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -135,8 +135,17 @@ Animal <- R6::R6Class(
|
||||
} else {
|
||||
stop(paste("The JSON input `", input, "` is invalid for Animal: the required field `className` is missing."))
|
||||
}
|
||||
},
|
||||
#' To string (JSON format)
|
||||
#'
|
||||
#' @description
|
||||
#' To string (JSON format)
|
||||
#'
|
||||
#' @return String representation of Animal
|
||||
#' @export
|
||||
toString = function() {
|
||||
self$toJSONString()
|
||||
}
|
||||
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -141,8 +141,17 @@ BasquePig <- R6::R6Class(
|
||||
} else {
|
||||
stop(paste("The JSON input `", input, "` is invalid for BasquePig: the required field `color` is missing."))
|
||||
}
|
||||
},
|
||||
#' To string (JSON format)
|
||||
#'
|
||||
#' @description
|
||||
#' To string (JSON format)
|
||||
#'
|
||||
#' @return String representation of BasquePig
|
||||
#' @export
|
||||
toString = function() {
|
||||
self$toJSONString()
|
||||
}
|
||||
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -158,8 +158,17 @@ Cat <- R6::R6Class(
|
||||
} else {
|
||||
stop(paste("The JSON input `", input, "` is invalid for Cat: the required field `className` is missing."))
|
||||
}
|
||||
},
|
||||
#' To string (JSON format)
|
||||
#'
|
||||
#' @description
|
||||
#' To string (JSON format)
|
||||
#'
|
||||
#' @return String representation of Cat
|
||||
#' @export
|
||||
toString = function() {
|
||||
self$toJSONString()
|
||||
}
|
||||
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -107,8 +107,17 @@ CatAllOf <- R6::R6Class(
|
||||
#' @export
|
||||
validateJSON = function(input) {
|
||||
input_json <- jsonlite::fromJSON(input)
|
||||
},
|
||||
#' To string (JSON format)
|
||||
#'
|
||||
#' @description
|
||||
#' To string (JSON format)
|
||||
#'
|
||||
#' @return String representation of CatAllOf
|
||||
#' @export
|
||||
toString = function() {
|
||||
self$toJSONString()
|
||||
}
|
||||
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -129,8 +129,17 @@ Category <- R6::R6Class(
|
||||
#' @export
|
||||
validateJSON = function(input) {
|
||||
input_json <- jsonlite::fromJSON(input)
|
||||
},
|
||||
#' To string (JSON format)
|
||||
#'
|
||||
#' @description
|
||||
#' To string (JSON format)
|
||||
#'
|
||||
#' @return String representation of Category
|
||||
#' @export
|
||||
toString = function() {
|
||||
self$toJSONString()
|
||||
}
|
||||
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -141,8 +141,17 @@ DanishPig <- R6::R6Class(
|
||||
} else {
|
||||
stop(paste("The JSON input `", input, "` is invalid for DanishPig: the required field `size` is missing."))
|
||||
}
|
||||
},
|
||||
#' To string (JSON format)
|
||||
#'
|
||||
#' @description
|
||||
#' To string (JSON format)
|
||||
#'
|
||||
#' @return String representation of DanishPig
|
||||
#' @export
|
||||
toString = function() {
|
||||
self$toJSONString()
|
||||
}
|
||||
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -158,8 +158,17 @@ Dog <- R6::R6Class(
|
||||
} else {
|
||||
stop(paste("The JSON input `", input, "` is invalid for Dog: the required field `className` is missing."))
|
||||
}
|
||||
},
|
||||
#' To string (JSON format)
|
||||
#'
|
||||
#' @description
|
||||
#' To string (JSON format)
|
||||
#'
|
||||
#' @return String representation of Dog
|
||||
#' @export
|
||||
toString = function() {
|
||||
self$toJSONString()
|
||||
}
|
||||
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -107,8 +107,17 @@ DogAllOf <- R6::R6Class(
|
||||
#' @export
|
||||
validateJSON = function(input) {
|
||||
input_json <- jsonlite::fromJSON(input)
|
||||
},
|
||||
#' To string (JSON format)
|
||||
#'
|
||||
#' @description
|
||||
#' To string (JSON format)
|
||||
#'
|
||||
#' @return String representation of DogAllOf
|
||||
#' @export
|
||||
toString = function() {
|
||||
self$toJSONString()
|
||||
}
|
||||
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -151,8 +151,17 @@ ModelApiResponse <- R6::R6Class(
|
||||
#' @export
|
||||
validateJSON = function(input) {
|
||||
input_json <- jsonlite::fromJSON(input)
|
||||
},
|
||||
#' To string (JSON format)
|
||||
#'
|
||||
#' @description
|
||||
#' To string (JSON format)
|
||||
#'
|
||||
#' @return String representation of ModelApiResponse
|
||||
#' @export
|
||||
toString = function() {
|
||||
self$toJSONString()
|
||||
}
|
||||
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -217,8 +217,17 @@ Order <- R6::R6Class(
|
||||
#' @export
|
||||
validateJSON = function(input) {
|
||||
input_json <- jsonlite::fromJSON(input)
|
||||
},
|
||||
#' To string (JSON format)
|
||||
#'
|
||||
#' @description
|
||||
#' To string (JSON format)
|
||||
#'
|
||||
#' @return String representation of Order
|
||||
#' @export
|
||||
toString = function() {
|
||||
self$toJSONString()
|
||||
}
|
||||
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -234,8 +234,17 @@ Pet <- R6::R6Class(
|
||||
} else {
|
||||
stop(paste("The JSON input `", input, "` is invalid for Pet: the required field `photoUrls` is missing."))
|
||||
}
|
||||
},
|
||||
#' To string (JSON format)
|
||||
#'
|
||||
#' @description
|
||||
#' To string (JSON format)
|
||||
#'
|
||||
#' @return String representation of Pet
|
||||
#' @export
|
||||
toString = function() {
|
||||
self$toJSONString()
|
||||
}
|
||||
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -151,8 +151,17 @@ Special <- R6::R6Class(
|
||||
#' @export
|
||||
validateJSON = function(input) {
|
||||
input_json <- jsonlite::fromJSON(input)
|
||||
},
|
||||
#' To string (JSON format)
|
||||
#'
|
||||
#' @description
|
||||
#' To string (JSON format)
|
||||
#'
|
||||
#' @return String representation of Special
|
||||
#' @export
|
||||
toString = function() {
|
||||
self$toJSONString()
|
||||
}
|
||||
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -129,8 +129,17 @@ Tag <- R6::R6Class(
|
||||
#' @export
|
||||
validateJSON = function(input) {
|
||||
input_json <- jsonlite::fromJSON(input)
|
||||
},
|
||||
#' To string (JSON format)
|
||||
#'
|
||||
#' @description
|
||||
#' To string (JSON format)
|
||||
#'
|
||||
#' @return String representation of Tag
|
||||
#' @export
|
||||
toString = function() {
|
||||
self$toJSONString()
|
||||
}
|
||||
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -130,8 +130,17 @@ UpdatePetRequest <- R6::R6Class(
|
||||
#' @export
|
||||
validateJSON = function(input) {
|
||||
input_json <- jsonlite::fromJSON(input)
|
||||
},
|
||||
#' To string (JSON format)
|
||||
#'
|
||||
#' @description
|
||||
#' To string (JSON format)
|
||||
#'
|
||||
#' @return String representation of UpdatePetRequest
|
||||
#' @export
|
||||
toString = function() {
|
||||
self$toJSONString()
|
||||
}
|
||||
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -261,8 +261,17 @@ User <- R6::R6Class(
|
||||
#' @export
|
||||
validateJSON = function(input) {
|
||||
input_json <- jsonlite::fromJSON(input)
|
||||
},
|
||||
#' To string (JSON format)
|
||||
#'
|
||||
#' @description
|
||||
#' To string (JSON format)
|
||||
#'
|
||||
#' @return String representation of User
|
||||
#' @export
|
||||
toString = function() {
|
||||
self$toJSONString()
|
||||
}
|
||||
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -47,7 +47,8 @@ pet <- Pet$new("name_test",
|
||||
)
|
||||
|
||||
#jsonlite::minify(pet$toJSONString())
|
||||
pet$toJSONString()
|
||||
#cat(pet$toJSONString())
|
||||
toString(pet$toString())
|
||||
|
||||
#json <-
|
||||
#'[
|
||||
|
Loading…
x
Reference in New Issue
Block a user