diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RClientCodegen.java index a599bedd699..8d6b8d15916 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RClientCodegen.java @@ -288,7 +288,7 @@ public class RClientCodegen extends DefaultCodegen implements CodegenConfig { supportingFiles.add(new SupportingFile("gitignore.mustache", "", ".gitignore")); supportingFiles.add(new SupportingFile("description.mustache", "", "DESCRIPTION")); supportingFiles.add(new SupportingFile("Rbuildignore.mustache", "", ".Rbuildignore")); - supportingFiles.add(new SupportingFile(".travis.yml", "", ".travis.yml")); + supportingFiles.add(new SupportingFile(".travis.yml.mustache", "", ".travis.yml")); supportingFiles.add(new SupportingFile("ApiResponse.mustache", File.separator + "R", "api_response.R")); supportingFiles.add(new SupportingFile("api_client.mustache", File.separator + "R", "api_client.R")); supportingFiles.add(new SupportingFile("NAMESPACE.mustache", "", "NAMESPACE")); @@ -320,6 +320,16 @@ public class RClientCodegen extends DefaultCodegen implements CodegenConfig { } }); + // add lambda for mustache templates to escape % + additionalProperties.put("lambdaRdocEscape", new Mustache.Lambda() { + @Override + public void execute(Template.Fragment fragment, Writer writer) throws IOException { + String content = fragment.execute(); + content = content.trim().replace("%", "\\%"); + writer.write(content); + } + }); + } @Override diff --git a/modules/openapi-generator/src/main/resources/r/.travis.yml b/modules/openapi-generator/src/main/resources/r/.travis.yml.mustache similarity index 87% rename from modules/openapi-generator/src/main/resources/r/.travis.yml rename to modules/openapi-generator/src/main/resources/r/.travis.yml.mustache index b96a0ef5a85..a14eb1abdd1 100644 --- a/modules/openapi-generator/src/main/resources/r/.travis.yml +++ b/modules/openapi-generator/src/main/resources/r/.travis.yml.mustache @@ -5,7 +5,12 @@ cache: - /home/travis/R/Library r_packages: - jsonlite +{{^isHttr2}} - httr +{{/isHttr2}} +{{#isHttr2}} +- httr2 +{{/isHttr2}} - testthat # uncomment below to install deps with devtools #install: diff --git a/modules/openapi-generator/src/main/resources/r/api.mustache b/modules/openapi-generator/src/main/resources/r/api.mustache index 1b93f6119c2..bf0551def51 100644 --- a/modules/openapi-generator/src/main/resources/r/api.mustache +++ b/modules/openapi-generator/src/main/resources/r/api.mustache @@ -10,9 +10,9 @@ {{! Adding the below changes for generating documentation for the api methods. }} #' \describe{ {{#operation}} -#' \strong{ {{operationId}} } \emph{ {{summary}} } +#' \strong{ {{operationId}} } \emph{ {{#lambdaRdocEscape}}{{summary}}{{/lambdaRdocEscape}} } {{#notes}} -#' {{{.}}} +#' {{#lambdaRdocEscape}}{{{.}}}{{/lambdaRdocEscape}} {{/notes}} #' #' \itemize{ @@ -573,4 +573,4 @@ {{/operation}} ) ) -{{/operations}} \ No newline at end of file +{{/operations}} diff --git a/modules/openapi-generator/src/main/resources/r/modelGeneric.mustache b/modules/openapi-generator/src/main/resources/r/modelGeneric.mustache index d8290e4aab9..3897333fe71 100644 --- a/modules/openapi-generator/src/main/resources/r/modelGeneric.mustache +++ b/modules/openapi-generator/src/main/resources/r/modelGeneric.mustache @@ -23,10 +23,10 @@ #' Initialize a new {{{classname}}} class. #' {{#requiredVars}} - #' @param {{name}} {{{description}}}{{^description}}{{{name}}}{{/description}} + #' @param {{name}} {{#lambdaRdocEscape}}{{{description}}}{{/lambdaRdocEscape}}{{^description}}{{{name}}}{{/description}} {{/requiredVars}} {{#optionalVars}} - #' @param {{name}} {{{description}}}{{^description}}{{{name}}}{{/description}}{{#defaultValue}}. Default to {{{.}}}.{{/defaultValue}} + #' @param {{name}} {{#lambdaRdocEscape}}{{{description}}}{{/lambdaRdocEscape}}{{^description}}{{{name}}}{{/description}}{{#defaultValue}}. Default to {{{.}}}.{{/defaultValue}} {{/optionalVars}} #' @param ... Other optional arguments. #' @export @@ -428,7 +428,7 @@ {{#required}} # check if the required `{{{name}}}` is null if (is.null(self$`{{{name}}}`)) { - invalid_fields["{{{name}}}"] = "Non-nullable required field `{{{name}}}` cannot be null." + invalid_fields["{{{name}}}"] <- "Non-nullable required field `{{{name}}}` cannot be null." } {{/required}} @@ -436,37 +436,37 @@ {{#hasValidation}} {{#maxLength}} if (nchar(self$`{{{name}}}`) > {{maxLength}}) { - invalid_fields["{{{name}}}"] = "Invalid length for `{{{name}}}`, must be smaller than or equal to {{maxLength}}." + invalid_fields["{{{name}}}"] <- "Invalid length for `{{{name}}}`, must be smaller than or equal to {{maxLength}}." } {{/maxLength}} {{#minLength}} if (nchar(self$`{{{name}}}`) < {{minLength}}) { - invalid_fields["{{{name}}}"] = "Invalid length for `{{{name}}}`, must be bigger than or equal to {{minLength}}." + invalid_fields["{{{name}}}"] <- "Invalid length for `{{{name}}}`, must be bigger than or equal to {{minLength}}." } {{/minLength}} {{#maximum}} if (self$`{{{name}}}` >{{#exclusiveMaximum}}={{/exclusiveMaximum}} {{maximum}}) { - invalid_fields["{{{name}}}"] = "Invalid value for `{{{name}}}`, must be smaller than {{^exclusiveMaximum}}or equal to {{/exclusiveMaximum}}{{maximum}}." + invalid_fields["{{{name}}}"] <- "Invalid value for `{{{name}}}`, must be smaller than {{^exclusiveMaximum}}or equal to {{/exclusiveMaximum}}{{maximum}}." } {{/maximum}} {{#minimum}} if (self$`{{{name}}}` <{{#exclusiveMinimum}}={{/exclusiveMinimum}} {{minimum}}) { - invalid_fields["{{{name}}}"] = "Invalid value for `{{{name}}}`, must be bigger than {{^exclusiveMinimum}}or equal to {{/exclusiveMinimum}}{{minimum}}." + invalid_fields["{{{name}}}"] <- "Invalid value for `{{{name}}}`, must be bigger than {{^exclusiveMinimum}}or equal to {{/exclusiveMinimum}}{{minimum}}." } {{/minimum}} {{#pattern}} if (!str_detect(self$`{{{name}}}`, "{{{pattern}}}")) { - invalid_fields["{{{name}}}"] = "Invalid value for `{{{name}}}`, must conform to the pattern {{{pattern}}}." + invalid_fields["{{{name}}}"] <- "Invalid value for `{{{name}}}`, must conform to the pattern {{{pattern}}}." } {{/pattern}} {{#maxItems}} if (length(self$`{{{name}}}`) > {{maxItems}}) { - invalid_fields["{{{name}}}"] = "Invalid length for `{{{name}}}`, number of items must be less than or equal to {{maxItems}}." + invalid_fields["{{{name}}}"] <- "Invalid length for `{{{name}}}`, number of items must be less than or equal to {{maxItems}}." } {{/maxItems}} {{#minItems}} if (length(self$`{{{name}}}`) < {{minItems}}) { - invalid_fields["{{{name}}}"] = "Invalid length for `{{{param}}}`, number of items must be greater than or equal to {{minItems}}." + invalid_fields["{{{name}}}"] <- "Invalid length for `{{{param}}}`, number of items must be greater than or equal to {{minItems}}." } {{/minItems}} diff --git a/samples/client/petstore/R-httr2-wrapper/.travis.yml b/samples/client/petstore/R-httr2-wrapper/.travis.yml index b96a0ef5a85..60f31f31078 100644 --- a/samples/client/petstore/R-httr2-wrapper/.travis.yml +++ b/samples/client/petstore/R-httr2-wrapper/.travis.yml @@ -5,7 +5,7 @@ cache: - /home/travis/R/Library r_packages: - jsonlite -- httr +- httr2 - testthat # uncomment below to install deps with devtools #install: diff --git a/samples/client/petstore/R-httr2-wrapper/R/animal.R b/samples/client/petstore/R-httr2-wrapper/R/animal.R index 296e59eee89..97d3f146df5 100644 --- a/samples/client/petstore/R-httr2-wrapper/R/animal.R +++ b/samples/client/petstore/R-httr2-wrapper/R/animal.R @@ -173,7 +173,7 @@ Animal <- R6::R6Class( invalid_fields <- list() # check if the required `className` is null if (is.null(self$`className`)) { - invalid_fields["className"] = "Non-nullable required field `className` cannot be null." + invalid_fields["className"] <- "Non-nullable required field `className` cannot be null." } invalid_fields diff --git a/samples/client/petstore/R-httr2-wrapper/R/basque_pig.R b/samples/client/petstore/R-httr2-wrapper/R/basque_pig.R index 13c67075a2d..4cf229f8f7e 100644 --- a/samples/client/petstore/R-httr2-wrapper/R/basque_pig.R +++ b/samples/client/petstore/R-httr2-wrapper/R/basque_pig.R @@ -184,12 +184,12 @@ BasquePig <- R6::R6Class( invalid_fields <- list() # check if the required `className` is null if (is.null(self$`className`)) { - invalid_fields["className"] = "Non-nullable required field `className` cannot be null." + invalid_fields["className"] <- "Non-nullable required field `className` cannot be null." } # check if the required `color` is null if (is.null(self$`color`)) { - invalid_fields["color"] = "Non-nullable required field `color` cannot be null." + invalid_fields["color"] <- "Non-nullable required field `color` cannot be null." } invalid_fields diff --git a/samples/client/petstore/R-httr2-wrapper/R/cat.R b/samples/client/petstore/R-httr2-wrapper/R/cat.R index 9e74249b400..4d94ee18d76 100644 --- a/samples/client/petstore/R-httr2-wrapper/R/cat.R +++ b/samples/client/petstore/R-httr2-wrapper/R/cat.R @@ -197,7 +197,7 @@ Cat <- R6::R6Class( invalid_fields <- list() # check if the required `className` is null if (is.null(self$`className`)) { - invalid_fields["className"] = "Non-nullable required field `className` cannot be null." + invalid_fields["className"] <- "Non-nullable required field `className` cannot be null." } invalid_fields diff --git a/samples/client/petstore/R-httr2-wrapper/R/category.R b/samples/client/petstore/R-httr2-wrapper/R/category.R index 88470c001ba..78564e356c9 100644 --- a/samples/client/petstore/R-httr2-wrapper/R/category.R +++ b/samples/client/petstore/R-httr2-wrapper/R/category.R @@ -165,7 +165,7 @@ Category <- R6::R6Class( getInvalidFields = function() { invalid_fields <- list() if (!str_detect(self$`name`, "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$")) { - invalid_fields["name"] = "Invalid value for `name`, must conform to the pattern ^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$." + invalid_fields["name"] <- "Invalid value for `name`, must conform to the pattern ^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$." } invalid_fields diff --git a/samples/client/petstore/R-httr2-wrapper/R/danish_pig.R b/samples/client/petstore/R-httr2-wrapper/R/danish_pig.R index 6cde3c461d7..320ea4ebda2 100644 --- a/samples/client/petstore/R-httr2-wrapper/R/danish_pig.R +++ b/samples/client/petstore/R-httr2-wrapper/R/danish_pig.R @@ -184,12 +184,12 @@ DanishPig <- R6::R6Class( invalid_fields <- list() # check if the required `className` is null if (is.null(self$`className`)) { - invalid_fields["className"] = "Non-nullable required field `className` cannot be null." + invalid_fields["className"] <- "Non-nullable required field `className` cannot be null." } # check if the required `size` is null if (is.null(self$`size`)) { - invalid_fields["size"] = "Non-nullable required field `size` cannot be null." + invalid_fields["size"] <- "Non-nullable required field `size` cannot be null." } invalid_fields diff --git a/samples/client/petstore/R-httr2-wrapper/R/dog.R b/samples/client/petstore/R-httr2-wrapper/R/dog.R index f89cecf6523..85674525e6a 100644 --- a/samples/client/petstore/R-httr2-wrapper/R/dog.R +++ b/samples/client/petstore/R-httr2-wrapper/R/dog.R @@ -197,7 +197,7 @@ Dog <- R6::R6Class( invalid_fields <- list() # check if the required `className` is null if (is.null(self$`className`)) { - invalid_fields["className"] = "Non-nullable required field `className` cannot be null." + invalid_fields["className"] <- "Non-nullable required field `className` cannot be null." } invalid_fields diff --git a/samples/client/petstore/R-httr2-wrapper/R/pet.R b/samples/client/petstore/R-httr2-wrapper/R/pet.R index 6d71b14dec2..b336816c598 100644 --- a/samples/client/petstore/R-httr2-wrapper/R/pet.R +++ b/samples/client/petstore/R-httr2-wrapper/R/pet.R @@ -281,12 +281,12 @@ Pet <- R6::R6Class( invalid_fields <- list() # check if the required `name` is null if (is.null(self$`name`)) { - invalid_fields["name"] = "Non-nullable required field `name` cannot be null." + invalid_fields["name"] <- "Non-nullable required field `name` cannot be null." } # check if the required `photoUrls` is null if (is.null(self$`photoUrls`)) { - invalid_fields["photoUrls"] = "Non-nullable required field `photoUrls` cannot be null." + invalid_fields["photoUrls"] <- "Non-nullable required field `photoUrls` cannot be null." } invalid_fields diff --git a/samples/client/petstore/R-httr2/.travis.yml b/samples/client/petstore/R-httr2/.travis.yml index b96a0ef5a85..60f31f31078 100644 --- a/samples/client/petstore/R-httr2/.travis.yml +++ b/samples/client/petstore/R-httr2/.travis.yml @@ -5,7 +5,7 @@ cache: - /home/travis/R/Library r_packages: - jsonlite -- httr +- httr2 - testthat # uncomment below to install deps with devtools #install: diff --git a/samples/client/petstore/R-httr2/R/animal.R b/samples/client/petstore/R-httr2/R/animal.R index 296e59eee89..97d3f146df5 100644 --- a/samples/client/petstore/R-httr2/R/animal.R +++ b/samples/client/petstore/R-httr2/R/animal.R @@ -173,7 +173,7 @@ Animal <- R6::R6Class( invalid_fields <- list() # check if the required `className` is null if (is.null(self$`className`)) { - invalid_fields["className"] = "Non-nullable required field `className` cannot be null." + invalid_fields["className"] <- "Non-nullable required field `className` cannot be null." } invalid_fields diff --git a/samples/client/petstore/R-httr2/R/basque_pig.R b/samples/client/petstore/R-httr2/R/basque_pig.R index 13c67075a2d..4cf229f8f7e 100644 --- a/samples/client/petstore/R-httr2/R/basque_pig.R +++ b/samples/client/petstore/R-httr2/R/basque_pig.R @@ -184,12 +184,12 @@ BasquePig <- R6::R6Class( invalid_fields <- list() # check if the required `className` is null if (is.null(self$`className`)) { - invalid_fields["className"] = "Non-nullable required field `className` cannot be null." + invalid_fields["className"] <- "Non-nullable required field `className` cannot be null." } # check if the required `color` is null if (is.null(self$`color`)) { - invalid_fields["color"] = "Non-nullable required field `color` cannot be null." + invalid_fields["color"] <- "Non-nullable required field `color` cannot be null." } invalid_fields diff --git a/samples/client/petstore/R-httr2/R/cat.R b/samples/client/petstore/R-httr2/R/cat.R index 9e74249b400..4d94ee18d76 100644 --- a/samples/client/petstore/R-httr2/R/cat.R +++ b/samples/client/petstore/R-httr2/R/cat.R @@ -197,7 +197,7 @@ Cat <- R6::R6Class( invalid_fields <- list() # check if the required `className` is null if (is.null(self$`className`)) { - invalid_fields["className"] = "Non-nullable required field `className` cannot be null." + invalid_fields["className"] <- "Non-nullable required field `className` cannot be null." } invalid_fields diff --git a/samples/client/petstore/R-httr2/R/category.R b/samples/client/petstore/R-httr2/R/category.R index 88470c001ba..78564e356c9 100644 --- a/samples/client/petstore/R-httr2/R/category.R +++ b/samples/client/petstore/R-httr2/R/category.R @@ -165,7 +165,7 @@ Category <- R6::R6Class( getInvalidFields = function() { invalid_fields <- list() if (!str_detect(self$`name`, "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$")) { - invalid_fields["name"] = "Invalid value for `name`, must conform to the pattern ^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$." + invalid_fields["name"] <- "Invalid value for `name`, must conform to the pattern ^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$." } invalid_fields diff --git a/samples/client/petstore/R-httr2/R/danish_pig.R b/samples/client/petstore/R-httr2/R/danish_pig.R index 6cde3c461d7..320ea4ebda2 100644 --- a/samples/client/petstore/R-httr2/R/danish_pig.R +++ b/samples/client/petstore/R-httr2/R/danish_pig.R @@ -184,12 +184,12 @@ DanishPig <- R6::R6Class( invalid_fields <- list() # check if the required `className` is null if (is.null(self$`className`)) { - invalid_fields["className"] = "Non-nullable required field `className` cannot be null." + invalid_fields["className"] <- "Non-nullable required field `className` cannot be null." } # check if the required `size` is null if (is.null(self$`size`)) { - invalid_fields["size"] = "Non-nullable required field `size` cannot be null." + invalid_fields["size"] <- "Non-nullable required field `size` cannot be null." } invalid_fields diff --git a/samples/client/petstore/R-httr2/R/dog.R b/samples/client/petstore/R-httr2/R/dog.R index f89cecf6523..85674525e6a 100644 --- a/samples/client/petstore/R-httr2/R/dog.R +++ b/samples/client/petstore/R-httr2/R/dog.R @@ -197,7 +197,7 @@ Dog <- R6::R6Class( invalid_fields <- list() # check if the required `className` is null if (is.null(self$`className`)) { - invalid_fields["className"] = "Non-nullable required field `className` cannot be null." + invalid_fields["className"] <- "Non-nullable required field `className` cannot be null." } invalid_fields diff --git a/samples/client/petstore/R-httr2/R/pet.R b/samples/client/petstore/R-httr2/R/pet.R index 6d71b14dec2..b336816c598 100644 --- a/samples/client/petstore/R-httr2/R/pet.R +++ b/samples/client/petstore/R-httr2/R/pet.R @@ -281,12 +281,12 @@ Pet <- R6::R6Class( invalid_fields <- list() # check if the required `name` is null if (is.null(self$`name`)) { - invalid_fields["name"] = "Non-nullable required field `name` cannot be null." + invalid_fields["name"] <- "Non-nullable required field `name` cannot be null." } # check if the required `photoUrls` is null if (is.null(self$`photoUrls`)) { - invalid_fields["photoUrls"] = "Non-nullable required field `photoUrls` cannot be null." + invalid_fields["photoUrls"] <- "Non-nullable required field `photoUrls` cannot be null." } invalid_fields diff --git a/samples/client/petstore/R/R/animal.R b/samples/client/petstore/R/R/animal.R index 296e59eee89..97d3f146df5 100644 --- a/samples/client/petstore/R/R/animal.R +++ b/samples/client/petstore/R/R/animal.R @@ -173,7 +173,7 @@ Animal <- R6::R6Class( invalid_fields <- list() # check if the required `className` is null if (is.null(self$`className`)) { - invalid_fields["className"] = "Non-nullable required field `className` cannot be null." + invalid_fields["className"] <- "Non-nullable required field `className` cannot be null." } invalid_fields diff --git a/samples/client/petstore/R/R/basque_pig.R b/samples/client/petstore/R/R/basque_pig.R index 13c67075a2d..4cf229f8f7e 100644 --- a/samples/client/petstore/R/R/basque_pig.R +++ b/samples/client/petstore/R/R/basque_pig.R @@ -184,12 +184,12 @@ BasquePig <- R6::R6Class( invalid_fields <- list() # check if the required `className` is null if (is.null(self$`className`)) { - invalid_fields["className"] = "Non-nullable required field `className` cannot be null." + invalid_fields["className"] <- "Non-nullable required field `className` cannot be null." } # check if the required `color` is null if (is.null(self$`color`)) { - invalid_fields["color"] = "Non-nullable required field `color` cannot be null." + invalid_fields["color"] <- "Non-nullable required field `color` cannot be null." } invalid_fields diff --git a/samples/client/petstore/R/R/cat.R b/samples/client/petstore/R/R/cat.R index 9e74249b400..4d94ee18d76 100644 --- a/samples/client/petstore/R/R/cat.R +++ b/samples/client/petstore/R/R/cat.R @@ -197,7 +197,7 @@ Cat <- R6::R6Class( invalid_fields <- list() # check if the required `className` is null if (is.null(self$`className`)) { - invalid_fields["className"] = "Non-nullable required field `className` cannot be null." + invalid_fields["className"] <- "Non-nullable required field `className` cannot be null." } invalid_fields diff --git a/samples/client/petstore/R/R/category.R b/samples/client/petstore/R/R/category.R index 88470c001ba..78564e356c9 100644 --- a/samples/client/petstore/R/R/category.R +++ b/samples/client/petstore/R/R/category.R @@ -165,7 +165,7 @@ Category <- R6::R6Class( getInvalidFields = function() { invalid_fields <- list() if (!str_detect(self$`name`, "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$")) { - invalid_fields["name"] = "Invalid value for `name`, must conform to the pattern ^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$." + invalid_fields["name"] <- "Invalid value for `name`, must conform to the pattern ^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$." } invalid_fields diff --git a/samples/client/petstore/R/R/danish_pig.R b/samples/client/petstore/R/R/danish_pig.R index 6cde3c461d7..320ea4ebda2 100644 --- a/samples/client/petstore/R/R/danish_pig.R +++ b/samples/client/petstore/R/R/danish_pig.R @@ -184,12 +184,12 @@ DanishPig <- R6::R6Class( invalid_fields <- list() # check if the required `className` is null if (is.null(self$`className`)) { - invalid_fields["className"] = "Non-nullable required field `className` cannot be null." + invalid_fields["className"] <- "Non-nullable required field `className` cannot be null." } # check if the required `size` is null if (is.null(self$`size`)) { - invalid_fields["size"] = "Non-nullable required field `size` cannot be null." + invalid_fields["size"] <- "Non-nullable required field `size` cannot be null." } invalid_fields diff --git a/samples/client/petstore/R/R/dog.R b/samples/client/petstore/R/R/dog.R index f89cecf6523..85674525e6a 100644 --- a/samples/client/petstore/R/R/dog.R +++ b/samples/client/petstore/R/R/dog.R @@ -197,7 +197,7 @@ Dog <- R6::R6Class( invalid_fields <- list() # check if the required `className` is null if (is.null(self$`className`)) { - invalid_fields["className"] = "Non-nullable required field `className` cannot be null." + invalid_fields["className"] <- "Non-nullable required field `className` cannot be null." } invalid_fields diff --git a/samples/client/petstore/R/R/pet.R b/samples/client/petstore/R/R/pet.R index 6d71b14dec2..b336816c598 100644 --- a/samples/client/petstore/R/R/pet.R +++ b/samples/client/petstore/R/R/pet.R @@ -281,12 +281,12 @@ Pet <- R6::R6Class( invalid_fields <- list() # check if the required `name` is null if (is.null(self$`name`)) { - invalid_fields["name"] = "Non-nullable required field `name` cannot be null." + invalid_fields["name"] <- "Non-nullable required field `name` cannot be null." } # check if the required `photoUrls` is null if (is.null(self$`photoUrls`)) { - invalid_fields["photoUrls"] = "Non-nullable required field `photoUrls` cannot be null." + invalid_fields["photoUrls"] <- "Non-nullable required field `photoUrls` cannot be null." } invalid_fields