mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-06-29 12:10:54 +00:00
add documentations to r oneof, anyof (#12638)
This commit is contained in:
parent
0140f84f80
commit
c26ac3f8a3
2
.gitignore
vendored
2
.gitignore
vendored
@ -222,6 +222,8 @@ samples/server/petstore/haskell-yesod/stack.yaml.lock
|
|||||||
.Rproj.user
|
.Rproj.user
|
||||||
samples/client/petstore/R/**/petstore.Rcheck/
|
samples/client/petstore/R/**/petstore.Rcheck/
|
||||||
samples/client/petstore/R/**/*.tar.gz
|
samples/client/petstore/R/**/*.tar.gz
|
||||||
|
samples/client/petstore/R/R.Rproj
|
||||||
|
samples/client/petstore/R/man/
|
||||||
|
|
||||||
# elixir
|
# elixir
|
||||||
samples/client/petstore/elixir/_build/
|
samples/client/petstore/elixir/_build/
|
||||||
|
@ -11,14 +11,31 @@
|
|||||||
{{classname}} <- R6::R6Class(
|
{{classname}} <- R6::R6Class(
|
||||||
'{{classname}}',
|
'{{classname}}',
|
||||||
public = list(
|
public = list(
|
||||||
|
#' @field actual_instance the object stored in this instance.
|
||||||
actual_instance = NULL,
|
actual_instance = NULL,
|
||||||
|
#' @field actual_type the type of the object stored in this instance.
|
||||||
actual_type = NULL,
|
actual_type = NULL,
|
||||||
|
#' @field any_of a list of object types defined in the anyOf schema.
|
||||||
any_of = list({{#anyOf}}"{{{.}}}"{{^-last}}, {{/-last}}{{/anyOf}}),
|
any_of = list({{#anyOf}}"{{{.}}}"{{^-last}}, {{/-last}}{{/anyOf}}),
|
||||||
|
#' Initialize a new {{{classname}}}.
|
||||||
|
#'
|
||||||
|
#' @description
|
||||||
|
#' Initialize a new {{{classname}}}.
|
||||||
|
#'
|
||||||
|
#' @export
|
||||||
|
#' @md
|
||||||
initialize = function(
|
initialize = function(
|
||||||
{{#requiredVars}}`{{baseName}}`, {{/requiredVars}}{{#optionalVars}}`{{baseName}}`={{{defaultValue}}}{{^defaultValue}}NULL{{/defaultValue}}, {{/optionalVars}}...
|
|
||||||
) {
|
) {
|
||||||
local_optional_var <- list(...)
|
|
||||||
},
|
},
|
||||||
|
#' Deserialize JSON string into an instance of {{{classname}}}.
|
||||||
|
#'
|
||||||
|
#' @description
|
||||||
|
#' Deserialize JSON string into an instance of {{{classname}}}.
|
||||||
|
#'
|
||||||
|
#' @param input The input JSON.
|
||||||
|
#' @return An instance of {{{classname}}}.
|
||||||
|
#' @export
|
||||||
|
#' @md
|
||||||
fromJSON = function(input) {
|
fromJSON = function(input) {
|
||||||
error_messages <- list()
|
error_messages <- list()
|
||||||
|
|
||||||
@ -41,6 +58,14 @@
|
|||||||
# no match
|
# no match
|
||||||
stop(paste("No match found when deserializing the payload into {{{classname}}} with anyOf schemas {{#anyOf}}{{{.}}}{{^-last}}, {{/-last}}{{/anyOf}}. Details: ", paste(error_messages, collapse = ', ')))
|
stop(paste("No match found when deserializing the payload into {{{classname}}} with anyOf schemas {{#anyOf}}{{{.}}}{{^-last}}, {{/-last}}{{/anyOf}}. Details: ", paste(error_messages, collapse = ', ')))
|
||||||
},
|
},
|
||||||
|
#' Serialize {{{classname}}} to JSON string.
|
||||||
|
#'
|
||||||
|
#' @description
|
||||||
|
#' Serialize {{{classname}}} to JSON string.
|
||||||
|
#'
|
||||||
|
#' @return JSON string reprenation of the {{{classname}}}.
|
||||||
|
#' @export
|
||||||
|
#' @md
|
||||||
toJSON = function() {
|
toJSON = function() {
|
||||||
if (!is.null(self$actual_instance)) {
|
if (!is.null(self$actual_instance)) {
|
||||||
self$actual_instance$toJSONString()
|
self$actual_instance$toJSONString()
|
||||||
@ -48,6 +73,15 @@
|
|||||||
NULL
|
NULL
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
#' Validate the input JSON with respect to {{{classname}}}.
|
||||||
|
#'
|
||||||
|
#' @description
|
||||||
|
#' Validate the input JSON with respect to {{{classname}}} and
|
||||||
|
#' throw exception if invalid.
|
||||||
|
#'
|
||||||
|
#' @param input The input JSON.
|
||||||
|
#' @export
|
||||||
|
#' @md
|
||||||
validateJSON = function(input) {
|
validateJSON = function(input) {
|
||||||
# backup current values
|
# backup current values
|
||||||
actual_instance_bak <- self$actual_instance
|
actual_instance_bak <- self$actual_instance
|
||||||
|
@ -11,14 +11,30 @@
|
|||||||
{{classname}} <- R6::R6Class(
|
{{classname}} <- R6::R6Class(
|
||||||
'{{classname}}',
|
'{{classname}}',
|
||||||
public = list(
|
public = list(
|
||||||
|
#' @field actual_instance the object stored in this instance.
|
||||||
actual_instance = NULL,
|
actual_instance = NULL,
|
||||||
|
#' @field actual_type the type of the object stored in this instance.
|
||||||
actual_type = NULL,
|
actual_type = NULL,
|
||||||
|
#' @field one_of a list of object types defined in the oneOf schema.
|
||||||
one_of = list({{#oneOf}}"{{{.}}}"{{^-last}}, {{/-last}}{{/oneOf}}),
|
one_of = list({{#oneOf}}"{{{.}}}"{{^-last}}, {{/-last}}{{/oneOf}}),
|
||||||
initialize = function(
|
#' Initialize a new {{{classname}}}.
|
||||||
{{#requiredVars}}`{{baseName}}`, {{/requiredVars}}{{#optionalVars}}`{{baseName}}`={{{defaultValue}}}{{^defaultValue}}NULL{{/defaultValue}}, {{/optionalVars}}...
|
#'
|
||||||
) {
|
#' @description
|
||||||
local_optional_var <- list(...)
|
#' Initialize a new {{{classname}}}.
|
||||||
|
#'
|
||||||
|
#' @export
|
||||||
|
#' @md
|
||||||
|
initialize = function() {
|
||||||
},
|
},
|
||||||
|
#' Deserialize JSON string into an instance of {{{classname}}}.
|
||||||
|
#'
|
||||||
|
#' @description
|
||||||
|
#' Deserialize JSON string into an instance of {{{classname}}}.
|
||||||
|
#'
|
||||||
|
#' @param input The input JSON.
|
||||||
|
#' @return An instance of {{{classname}}}.
|
||||||
|
#' @export
|
||||||
|
#' @md
|
||||||
fromJSON = function(input) {
|
fromJSON = function(input) {
|
||||||
matched <- 0 # match counter
|
matched <- 0 # match counter
|
||||||
matched_schemas <- list() #names of matched schemas
|
matched_schemas <- list() #names of matched schemas
|
||||||
@ -56,6 +72,14 @@
|
|||||||
|
|
||||||
self
|
self
|
||||||
},
|
},
|
||||||
|
#' Serialize {{{classname}}} to JSON string.
|
||||||
|
#'
|
||||||
|
#' @description
|
||||||
|
#' Serialize {{{classname}}} to JSON string.
|
||||||
|
#'
|
||||||
|
#' @return JSON string reprenation of the {{{classname}}}.
|
||||||
|
#' @export
|
||||||
|
#' @md
|
||||||
toJSON = function() {
|
toJSON = function() {
|
||||||
if (!is.null(self$actual_instance)) {
|
if (!is.null(self$actual_instance)) {
|
||||||
self$actual_instance$toJSONString()
|
self$actual_instance$toJSONString()
|
||||||
@ -63,6 +87,15 @@
|
|||||||
NULL
|
NULL
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
#' Validate the input JSON with respect to {{{classname}}}.
|
||||||
|
#'
|
||||||
|
#' @description
|
||||||
|
#' Validate the input JSON with respect to {{{classname}}} and
|
||||||
|
#' throw exception if invalid.
|
||||||
|
#'
|
||||||
|
#' @param input The input JSON.
|
||||||
|
#' @export
|
||||||
|
#' @md
|
||||||
validateJSON = function(input) {
|
validateJSON = function(input) {
|
||||||
# backup current values
|
# backup current values
|
||||||
actual_instance_bak <- self$actual_instance
|
actual_instance_bak <- self$actual_instance
|
||||||
|
@ -1,15 +1,16 @@
|
|||||||
{{#appName}}
|
{{#appName}}
|
||||||
# {{{.}}}
|
#' {{{.}}}
|
||||||
#
|
#'
|
||||||
{{/appName}}
|
{{/appName}}
|
||||||
{{#appDescription}}
|
{{#appDescription}}
|
||||||
# {{{.}}}
|
#' {{{.}}}
|
||||||
#
|
#'
|
||||||
{{/appDescription}}
|
{{/appDescription}}
|
||||||
{{#version}}
|
{{#version}}
|
||||||
# The version of the OpenAPI document: {{{.}}}
|
#' The version of the OpenAPI document: {{{.}}}
|
||||||
{{/version}}
|
{{/version}}
|
||||||
{{#infoEmail}}
|
{{#infoEmail}}
|
||||||
# Contact: {{{.}}}
|
#' Contact: {{{.}}}
|
||||||
{{/infoEmail}}
|
{{/infoEmail}}
|
||||||
# Generated by: https://openapi-generator.tech
|
#' Generated by: https://openapi-generator.tech
|
||||||
|
#'
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
# OpenAPI Petstore
|
#' OpenAPI Petstore
|
||||||
#
|
#'
|
||||||
# This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
#' This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||||
#
|
#'
|
||||||
# The version of the OpenAPI document: 1.0.0
|
#' The version of the OpenAPI document: 1.0.0
|
||||||
# Generated by: https://openapi-generator.tech
|
#' Generated by: https://openapi-generator.tech
|
||||||
|
#'
|
||||||
|
|
||||||
#' @docType class
|
#' @docType class
|
||||||
#' @title AllofTagApiResponse
|
#' @title AllofTagApiResponse
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
# OpenAPI Petstore
|
#' OpenAPI Petstore
|
||||||
#
|
#'
|
||||||
# This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
#' This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||||
#
|
#'
|
||||||
# The version of the OpenAPI document: 1.0.0
|
#' The version of the OpenAPI document: 1.0.0
|
||||||
# Generated by: https://openapi-generator.tech
|
#' Generated by: https://openapi-generator.tech
|
||||||
|
#'
|
||||||
|
|
||||||
#' @docType class
|
#' @docType class
|
||||||
#' @title Animal
|
#' @title Animal
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
# OpenAPI Petstore
|
#' OpenAPI Petstore
|
||||||
#
|
#'
|
||||||
# This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
#' This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||||
#
|
#'
|
||||||
# The version of the OpenAPI document: 1.0.0
|
#' The version of the OpenAPI document: 1.0.0
|
||||||
# Generated by: https://openapi-generator.tech
|
#' Generated by: https://openapi-generator.tech
|
||||||
|
#'
|
||||||
|
|
||||||
#' @docType class
|
#' @docType class
|
||||||
#' @title AnyOfPig
|
#' @title AnyOfPig
|
||||||
@ -18,14 +19,31 @@
|
|||||||
AnyOfPig <- R6::R6Class(
|
AnyOfPig <- R6::R6Class(
|
||||||
'AnyOfPig',
|
'AnyOfPig',
|
||||||
public = list(
|
public = list(
|
||||||
|
#' @field actual_instance the object stored in this instance.
|
||||||
actual_instance = NULL,
|
actual_instance = NULL,
|
||||||
|
#' @field actual_type the type of the object stored in this instance.
|
||||||
actual_type = NULL,
|
actual_type = NULL,
|
||||||
|
#' @field any_of a list of object types defined in the anyOf schema.
|
||||||
any_of = list("BasquePig", "DanishPig"),
|
any_of = list("BasquePig", "DanishPig"),
|
||||||
|
#' Initialize a new AnyOfPig.
|
||||||
|
#'
|
||||||
|
#' @description
|
||||||
|
#' Initialize a new AnyOfPig.
|
||||||
|
#'
|
||||||
|
#' @export
|
||||||
|
#' @md
|
||||||
initialize = function(
|
initialize = function(
|
||||||
`className`, `color`, `size`, ...
|
|
||||||
) {
|
) {
|
||||||
local_optional_var <- list(...)
|
|
||||||
},
|
},
|
||||||
|
#' Deserialize JSON string into an instance of AnyOfPig.
|
||||||
|
#'
|
||||||
|
#' @description
|
||||||
|
#' Deserialize JSON string into an instance of AnyOfPig.
|
||||||
|
#'
|
||||||
|
#' @param input The input JSON.
|
||||||
|
#' @return An instance of AnyOfPig.
|
||||||
|
#' @export
|
||||||
|
#' @md
|
||||||
fromJSON = function(input) {
|
fromJSON = function(input) {
|
||||||
error_messages <- list()
|
error_messages <- list()
|
||||||
|
|
||||||
@ -60,6 +78,14 @@ AnyOfPig <- R6::R6Class(
|
|||||||
# no match
|
# no match
|
||||||
stop(paste("No match found when deserializing the payload into AnyOfPig with anyOf schemas BasquePig, DanishPig. Details: ", paste(error_messages, collapse = ', ')))
|
stop(paste("No match found when deserializing the payload into AnyOfPig with anyOf schemas BasquePig, DanishPig. Details: ", paste(error_messages, collapse = ', ')))
|
||||||
},
|
},
|
||||||
|
#' Serialize AnyOfPig to JSON string.
|
||||||
|
#'
|
||||||
|
#' @description
|
||||||
|
#' Serialize AnyOfPig to JSON string.
|
||||||
|
#'
|
||||||
|
#' @return JSON string reprenation of the AnyOfPig.
|
||||||
|
#' @export
|
||||||
|
#' @md
|
||||||
toJSON = function() {
|
toJSON = function() {
|
||||||
if (!is.null(self$actual_instance)) {
|
if (!is.null(self$actual_instance)) {
|
||||||
self$actual_instance$toJSONString()
|
self$actual_instance$toJSONString()
|
||||||
@ -67,6 +93,15 @@ AnyOfPig <- R6::R6Class(
|
|||||||
NULL
|
NULL
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
#' Validate the input JSON with respect to AnyOfPig.
|
||||||
|
#'
|
||||||
|
#' @description
|
||||||
|
#' Validate the input JSON with respect to AnyOfPig and
|
||||||
|
#' throw exception if invalid.
|
||||||
|
#'
|
||||||
|
#' @param input The input JSON.
|
||||||
|
#' @export
|
||||||
|
#' @md
|
||||||
validateJSON = function(input) {
|
validateJSON = function(input) {
|
||||||
# backup current values
|
# backup current values
|
||||||
actual_instance_bak <- self$actual_instance
|
actual_instance_bak <- self$actual_instance
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
# OpenAPI Petstore
|
#' OpenAPI Petstore
|
||||||
#
|
#'
|
||||||
# This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
#' This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||||
#
|
#'
|
||||||
# The version of the OpenAPI document: 1.0.0
|
#' The version of the OpenAPI document: 1.0.0
|
||||||
# Generated by: https://openapi-generator.tech
|
#' Generated by: https://openapi-generator.tech
|
||||||
|
#'
|
||||||
|
|
||||||
|
|
||||||
#' ApiClient Class
|
#' ApiClient Class
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
# OpenAPI Petstore
|
#' OpenAPI Petstore
|
||||||
#
|
#'
|
||||||
# This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
#' This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||||
#
|
#'
|
||||||
# The version of the OpenAPI document: 1.0.0
|
#' The version of the OpenAPI document: 1.0.0
|
||||||
# Generated by: https://openapi-generator.tech
|
#' Generated by: https://openapi-generator.tech
|
||||||
|
#'
|
||||||
|
|
||||||
#' @docType class
|
#' @docType class
|
||||||
#' @title BasquePig
|
#' @title BasquePig
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
# OpenAPI Petstore
|
#' OpenAPI Petstore
|
||||||
#
|
#'
|
||||||
# This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
#' This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||||
#
|
#'
|
||||||
# The version of the OpenAPI document: 1.0.0
|
#' The version of the OpenAPI document: 1.0.0
|
||||||
# Generated by: https://openapi-generator.tech
|
#' Generated by: https://openapi-generator.tech
|
||||||
|
#'
|
||||||
|
|
||||||
#' @docType class
|
#' @docType class
|
||||||
#' @title Cat
|
#' @title Cat
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
# OpenAPI Petstore
|
#' OpenAPI Petstore
|
||||||
#
|
#'
|
||||||
# This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
#' This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||||
#
|
#'
|
||||||
# The version of the OpenAPI document: 1.0.0
|
#' The version of the OpenAPI document: 1.0.0
|
||||||
# Generated by: https://openapi-generator.tech
|
#' Generated by: https://openapi-generator.tech
|
||||||
|
#'
|
||||||
|
|
||||||
#' @docType class
|
#' @docType class
|
||||||
#' @title CatAllOf
|
#' @title CatAllOf
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
# OpenAPI Petstore
|
#' OpenAPI Petstore
|
||||||
#
|
#'
|
||||||
# This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
#' This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||||
#
|
#'
|
||||||
# The version of the OpenAPI document: 1.0.0
|
#' The version of the OpenAPI document: 1.0.0
|
||||||
# Generated by: https://openapi-generator.tech
|
#' Generated by: https://openapi-generator.tech
|
||||||
|
#'
|
||||||
|
|
||||||
#' @docType class
|
#' @docType class
|
||||||
#' @title Category
|
#' @title Category
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
# OpenAPI Petstore
|
#' OpenAPI Petstore
|
||||||
#
|
#'
|
||||||
# This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
#' This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||||
#
|
#'
|
||||||
# The version of the OpenAPI document: 1.0.0
|
#' The version of the OpenAPI document: 1.0.0
|
||||||
# Generated by: https://openapi-generator.tech
|
#' Generated by: https://openapi-generator.tech
|
||||||
|
#'
|
||||||
|
|
||||||
#' @docType class
|
#' @docType class
|
||||||
#' @title DanishPig
|
#' @title DanishPig
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
# OpenAPI Petstore
|
#' OpenAPI Petstore
|
||||||
#
|
#'
|
||||||
# This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
#' This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||||
#
|
#'
|
||||||
# The version of the OpenAPI document: 1.0.0
|
#' The version of the OpenAPI document: 1.0.0
|
||||||
# Generated by: https://openapi-generator.tech
|
#' Generated by: https://openapi-generator.tech
|
||||||
|
#'
|
||||||
|
|
||||||
#' @docType class
|
#' @docType class
|
||||||
#' @title Dog
|
#' @title Dog
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
# OpenAPI Petstore
|
#' OpenAPI Petstore
|
||||||
#
|
#'
|
||||||
# This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
#' This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||||
#
|
#'
|
||||||
# The version of the OpenAPI document: 1.0.0
|
#' The version of the OpenAPI document: 1.0.0
|
||||||
# Generated by: https://openapi-generator.tech
|
#' Generated by: https://openapi-generator.tech
|
||||||
|
#'
|
||||||
|
|
||||||
#' @docType class
|
#' @docType class
|
||||||
#' @title DogAllOf
|
#' @title DogAllOf
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
# OpenAPI Petstore
|
#' OpenAPI Petstore
|
||||||
#
|
#'
|
||||||
# This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
#' This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||||
#
|
#'
|
||||||
# The version of the OpenAPI document: 1.0.0
|
#' The version of the OpenAPI document: 1.0.0
|
||||||
# Generated by: https://openapi-generator.tech
|
#' Generated by: https://openapi-generator.tech
|
||||||
|
#'
|
||||||
|
|
||||||
#' @docType class
|
#' @docType class
|
||||||
#' @title Fake operations
|
#' @title Fake operations
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
# OpenAPI Petstore
|
#' OpenAPI Petstore
|
||||||
#
|
#'
|
||||||
# This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
#' This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||||
#
|
#'
|
||||||
# The version of the OpenAPI document: 1.0.0
|
#' The version of the OpenAPI document: 1.0.0
|
||||||
# Generated by: https://openapi-generator.tech
|
#' Generated by: https://openapi-generator.tech
|
||||||
|
#'
|
||||||
|
|
||||||
#' @docType class
|
#' @docType class
|
||||||
#' @title ModelApiResponse
|
#' @title ModelApiResponse
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
# OpenAPI Petstore
|
#' OpenAPI Petstore
|
||||||
#
|
#'
|
||||||
# This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
#' This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||||
#
|
#'
|
||||||
# The version of the OpenAPI document: 1.0.0
|
#' The version of the OpenAPI document: 1.0.0
|
||||||
# Generated by: https://openapi-generator.tech
|
#' Generated by: https://openapi-generator.tech
|
||||||
|
#'
|
||||||
|
|
||||||
#' @docType class
|
#' @docType class
|
||||||
#' @title Order
|
#' @title Order
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
# OpenAPI Petstore
|
#' OpenAPI Petstore
|
||||||
#
|
#'
|
||||||
# This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
#' This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||||
#
|
#'
|
||||||
# The version of the OpenAPI document: 1.0.0
|
#' The version of the OpenAPI document: 1.0.0
|
||||||
# Generated by: https://openapi-generator.tech
|
#' Generated by: https://openapi-generator.tech
|
||||||
|
#'
|
||||||
|
|
||||||
#' @docType class
|
#' @docType class
|
||||||
#' @title Pet
|
#' @title Pet
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
# OpenAPI Petstore
|
#' OpenAPI Petstore
|
||||||
#
|
#'
|
||||||
# This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
#' This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||||
#
|
#'
|
||||||
# The version of the OpenAPI document: 1.0.0
|
#' The version of the OpenAPI document: 1.0.0
|
||||||
# Generated by: https://openapi-generator.tech
|
#' Generated by: https://openapi-generator.tech
|
||||||
|
#'
|
||||||
|
|
||||||
#' @docType class
|
#' @docType class
|
||||||
#' @title Pet operations
|
#' @title Pet operations
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
# OpenAPI Petstore
|
#' OpenAPI Petstore
|
||||||
#
|
#'
|
||||||
# This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
#' This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||||
#
|
#'
|
||||||
# The version of the OpenAPI document: 1.0.0
|
#' The version of the OpenAPI document: 1.0.0
|
||||||
# Generated by: https://openapi-generator.tech
|
#' Generated by: https://openapi-generator.tech
|
||||||
|
#'
|
||||||
|
|
||||||
#' @docType class
|
#' @docType class
|
||||||
#' @title Pig
|
#' @title Pig
|
||||||
@ -18,14 +19,30 @@
|
|||||||
Pig <- R6::R6Class(
|
Pig <- R6::R6Class(
|
||||||
'Pig',
|
'Pig',
|
||||||
public = list(
|
public = list(
|
||||||
|
#' @field actual_instance the object stored in this instance.
|
||||||
actual_instance = NULL,
|
actual_instance = NULL,
|
||||||
|
#' @field actual_type the type of the object stored in this instance.
|
||||||
actual_type = NULL,
|
actual_type = NULL,
|
||||||
|
#' @field one_of a list of object types defined in the oneOf schema.
|
||||||
one_of = list("BasquePig", "DanishPig"),
|
one_of = list("BasquePig", "DanishPig"),
|
||||||
initialize = function(
|
#' Initialize a new Pig.
|
||||||
`className`, `color`, `size`, ...
|
#'
|
||||||
) {
|
#' @description
|
||||||
local_optional_var <- list(...)
|
#' Initialize a new Pig.
|
||||||
|
#'
|
||||||
|
#' @export
|
||||||
|
#' @md
|
||||||
|
initialize = function() {
|
||||||
},
|
},
|
||||||
|
#' Deserialize JSON string into an instance of Pig.
|
||||||
|
#'
|
||||||
|
#' @description
|
||||||
|
#' Deserialize JSON string into an instance of Pig.
|
||||||
|
#'
|
||||||
|
#' @param input The input JSON.
|
||||||
|
#' @return An instance of Pig.
|
||||||
|
#' @export
|
||||||
|
#' @md
|
||||||
fromJSON = function(input) {
|
fromJSON = function(input) {
|
||||||
matched <- 0 # match counter
|
matched <- 0 # match counter
|
||||||
matched_schemas <- list() #names of matched schemas
|
matched_schemas <- list() #names of matched schemas
|
||||||
@ -76,6 +93,14 @@ Pig <- R6::R6Class(
|
|||||||
|
|
||||||
self
|
self
|
||||||
},
|
},
|
||||||
|
#' Serialize Pig to JSON string.
|
||||||
|
#'
|
||||||
|
#' @description
|
||||||
|
#' Serialize Pig to JSON string.
|
||||||
|
#'
|
||||||
|
#' @return JSON string reprenation of the Pig.
|
||||||
|
#' @export
|
||||||
|
#' @md
|
||||||
toJSON = function() {
|
toJSON = function() {
|
||||||
if (!is.null(self$actual_instance)) {
|
if (!is.null(self$actual_instance)) {
|
||||||
self$actual_instance$toJSONString()
|
self$actual_instance$toJSONString()
|
||||||
@ -83,6 +108,15 @@ Pig <- R6::R6Class(
|
|||||||
NULL
|
NULL
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
#' Validate the input JSON with respect to Pig.
|
||||||
|
#'
|
||||||
|
#' @description
|
||||||
|
#' Validate the input JSON with respect to Pig and
|
||||||
|
#' throw exception if invalid.
|
||||||
|
#'
|
||||||
|
#' @param input The input JSON.
|
||||||
|
#' @export
|
||||||
|
#' @md
|
||||||
validateJSON = function(input) {
|
validateJSON = function(input) {
|
||||||
# backup current values
|
# backup current values
|
||||||
actual_instance_bak <- self$actual_instance
|
actual_instance_bak <- self$actual_instance
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
# OpenAPI Petstore
|
#' OpenAPI Petstore
|
||||||
#
|
#'
|
||||||
# This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
#' This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||||
#
|
#'
|
||||||
# The version of the OpenAPI document: 1.0.0
|
#' The version of the OpenAPI document: 1.0.0
|
||||||
# Generated by: https://openapi-generator.tech
|
#' Generated by: https://openapi-generator.tech
|
||||||
|
#'
|
||||||
|
|
||||||
#' @docType class
|
#' @docType class
|
||||||
#' @title Store operations
|
#' @title Store operations
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
# OpenAPI Petstore
|
#' OpenAPI Petstore
|
||||||
#
|
#'
|
||||||
# This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
#' This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||||
#
|
#'
|
||||||
# The version of the OpenAPI document: 1.0.0
|
#' The version of the OpenAPI document: 1.0.0
|
||||||
# Generated by: https://openapi-generator.tech
|
#' Generated by: https://openapi-generator.tech
|
||||||
|
#'
|
||||||
|
|
||||||
#' @docType class
|
#' @docType class
|
||||||
#' @title Tag
|
#' @title Tag
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
# OpenAPI Petstore
|
#' OpenAPI Petstore
|
||||||
#
|
#'
|
||||||
# This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
#' This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||||
#
|
#'
|
||||||
# The version of the OpenAPI document: 1.0.0
|
#' The version of the OpenAPI document: 1.0.0
|
||||||
# Generated by: https://openapi-generator.tech
|
#' Generated by: https://openapi-generator.tech
|
||||||
|
#'
|
||||||
|
|
||||||
#' @docType class
|
#' @docType class
|
||||||
#' @title UpdatePetRequest
|
#' @title UpdatePetRequest
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
# OpenAPI Petstore
|
#' OpenAPI Petstore
|
||||||
#
|
#'
|
||||||
# This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
#' This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||||
#
|
#'
|
||||||
# The version of the OpenAPI document: 1.0.0
|
#' The version of the OpenAPI document: 1.0.0
|
||||||
# Generated by: https://openapi-generator.tech
|
#' Generated by: https://openapi-generator.tech
|
||||||
|
#'
|
||||||
|
|
||||||
#' @docType class
|
#' @docType class
|
||||||
#' @title User
|
#' @title User
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
# OpenAPI Petstore
|
#' OpenAPI Petstore
|
||||||
#
|
#'
|
||||||
# This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
#' This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||||
#
|
#'
|
||||||
# The version of the OpenAPI document: 1.0.0
|
#' The version of the OpenAPI document: 1.0.0
|
||||||
# Generated by: https://openapi-generator.tech
|
#' Generated by: https://openapi-generator.tech
|
||||||
|
#'
|
||||||
|
|
||||||
#' @docType class
|
#' @docType class
|
||||||
#' @title User operations
|
#' @title User operations
|
||||||
|
@ -17,6 +17,7 @@ Rscript -e "install.packages('R6', repos='$REPO', lib='$R_LIBS_USER')"
|
|||||||
Rscript -e "install.packages('base64enc', repos='$REPO', lib='$R_LIBS_USER')"
|
Rscript -e "install.packages('base64enc', repos='$REPO', lib='$R_LIBS_USER')"
|
||||||
Rscript -e "install.packages('rlang', repos='$REPO', lib='$R_LIBS_USER')"
|
Rscript -e "install.packages('rlang', repos='$REPO', lib='$R_LIBS_USER')"
|
||||||
Rscript -e "install.packages('rjson', repos='$REPO', lib='$R_LIBS_USER')"
|
Rscript -e "install.packages('rjson', repos='$REPO', lib='$R_LIBS_USER')"
|
||||||
|
Rscript -e "install.packages('devtools', repos='$REPO', lib='$R_LIBS_USER')"
|
||||||
|
|
||||||
rm petstore_1.0.0.tar.gz || true
|
rm petstore_1.0.0.tar.gz || true
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user