mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-07-04 14:40:53 +00:00
[R] Fix warnings reported by r cmd check (#13205)
* fix warnings reported by r cmd check * fix assignment
This commit is contained in:
parent
c135139e3d
commit
9f3fac53c1
@ -288,7 +288,7 @@ public class RClientCodegen extends DefaultCodegen implements CodegenConfig {
|
|||||||
supportingFiles.add(new SupportingFile("gitignore.mustache", "", ".gitignore"));
|
supportingFiles.add(new SupportingFile("gitignore.mustache", "", ".gitignore"));
|
||||||
supportingFiles.add(new SupportingFile("description.mustache", "", "DESCRIPTION"));
|
supportingFiles.add(new SupportingFile("description.mustache", "", "DESCRIPTION"));
|
||||||
supportingFiles.add(new SupportingFile("Rbuildignore.mustache", "", ".Rbuildignore"));
|
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("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("api_client.mustache", File.separator + "R", "api_client.R"));
|
||||||
supportingFiles.add(new SupportingFile("NAMESPACE.mustache", "", "NAMESPACE"));
|
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
|
@Override
|
||||||
|
@ -5,7 +5,12 @@ cache:
|
|||||||
- /home/travis/R/Library
|
- /home/travis/R/Library
|
||||||
r_packages:
|
r_packages:
|
||||||
- jsonlite
|
- jsonlite
|
||||||
|
{{^isHttr2}}
|
||||||
- httr
|
- httr
|
||||||
|
{{/isHttr2}}
|
||||||
|
{{#isHttr2}}
|
||||||
|
- httr2
|
||||||
|
{{/isHttr2}}
|
||||||
- testthat
|
- testthat
|
||||||
# uncomment below to install deps with devtools
|
# uncomment below to install deps with devtools
|
||||||
#install:
|
#install:
|
@ -10,9 +10,9 @@
|
|||||||
{{! Adding the below changes for generating documentation for the api methods. }}
|
{{! Adding the below changes for generating documentation for the api methods. }}
|
||||||
#' \describe{
|
#' \describe{
|
||||||
{{#operation}}
|
{{#operation}}
|
||||||
#' \strong{ {{operationId}} } \emph{ {{summary}} }
|
#' \strong{ {{operationId}} } \emph{ {{#lambdaRdocEscape}}{{summary}}{{/lambdaRdocEscape}} }
|
||||||
{{#notes}}
|
{{#notes}}
|
||||||
#' {{{.}}}
|
#' {{#lambdaRdocEscape}}{{{.}}}{{/lambdaRdocEscape}}
|
||||||
{{/notes}}
|
{{/notes}}
|
||||||
#'
|
#'
|
||||||
#' \itemize{
|
#' \itemize{
|
||||||
|
@ -23,10 +23,10 @@
|
|||||||
#' Initialize a new {{{classname}}} class.
|
#' Initialize a new {{{classname}}} class.
|
||||||
#'
|
#'
|
||||||
{{#requiredVars}}
|
{{#requiredVars}}
|
||||||
#' @param {{name}} {{{description}}}{{^description}}{{{name}}}{{/description}}
|
#' @param {{name}} {{#lambdaRdocEscape}}{{{description}}}{{/lambdaRdocEscape}}{{^description}}{{{name}}}{{/description}}
|
||||||
{{/requiredVars}}
|
{{/requiredVars}}
|
||||||
{{#optionalVars}}
|
{{#optionalVars}}
|
||||||
#' @param {{name}} {{{description}}}{{^description}}{{{name}}}{{/description}}{{#defaultValue}}. Default to {{{.}}}.{{/defaultValue}}
|
#' @param {{name}} {{#lambdaRdocEscape}}{{{description}}}{{/lambdaRdocEscape}}{{^description}}{{{name}}}{{/description}}{{#defaultValue}}. Default to {{{.}}}.{{/defaultValue}}
|
||||||
{{/optionalVars}}
|
{{/optionalVars}}
|
||||||
#' @param ... Other optional arguments.
|
#' @param ... Other optional arguments.
|
||||||
#' @export
|
#' @export
|
||||||
@ -428,7 +428,7 @@
|
|||||||
{{#required}}
|
{{#required}}
|
||||||
# check if the required `{{{name}}}` is null
|
# check if the required `{{{name}}}` is null
|
||||||
if (is.null(self$`{{{name}}}`)) {
|
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}}
|
{{/required}}
|
||||||
@ -436,37 +436,37 @@
|
|||||||
{{#hasValidation}}
|
{{#hasValidation}}
|
||||||
{{#maxLength}}
|
{{#maxLength}}
|
||||||
if (nchar(self$`{{{name}}}`) > {{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}}
|
{{/maxLength}}
|
||||||
{{#minLength}}
|
{{#minLength}}
|
||||||
if (nchar(self$`{{{name}}}`) < {{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}}
|
{{/minLength}}
|
||||||
{{#maximum}}
|
{{#maximum}}
|
||||||
if (self$`{{{name}}}` >{{#exclusiveMaximum}}={{/exclusiveMaximum}} {{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}}
|
{{/maximum}}
|
||||||
{{#minimum}}
|
{{#minimum}}
|
||||||
if (self$`{{{name}}}` <{{#exclusiveMinimum}}={{/exclusiveMinimum}} {{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}}
|
{{/minimum}}
|
||||||
{{#pattern}}
|
{{#pattern}}
|
||||||
if (!str_detect(self$`{{{name}}}`, "{{{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}}
|
{{/pattern}}
|
||||||
{{#maxItems}}
|
{{#maxItems}}
|
||||||
if (length(self$`{{{name}}}`) > {{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}}
|
{{/maxItems}}
|
||||||
{{#minItems}}
|
{{#minItems}}
|
||||||
if (length(self$`{{{name}}}`) < {{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}}
|
{{/minItems}}
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@ cache:
|
|||||||
- /home/travis/R/Library
|
- /home/travis/R/Library
|
||||||
r_packages:
|
r_packages:
|
||||||
- jsonlite
|
- jsonlite
|
||||||
- httr
|
- httr2
|
||||||
- testthat
|
- testthat
|
||||||
# uncomment below to install deps with devtools
|
# uncomment below to install deps with devtools
|
||||||
#install:
|
#install:
|
||||||
|
@ -173,7 +173,7 @@ Animal <- R6::R6Class(
|
|||||||
invalid_fields <- list()
|
invalid_fields <- list()
|
||||||
# check if the required `className` is null
|
# check if the required `className` is null
|
||||||
if (is.null(self$`className`)) {
|
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
|
invalid_fields
|
||||||
|
@ -184,12 +184,12 @@ BasquePig <- R6::R6Class(
|
|||||||
invalid_fields <- list()
|
invalid_fields <- list()
|
||||||
# check if the required `className` is null
|
# check if the required `className` is null
|
||||||
if (is.null(self$`className`)) {
|
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
|
# check if the required `color` is null
|
||||||
if (is.null(self$`color`)) {
|
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
|
invalid_fields
|
||||||
|
@ -197,7 +197,7 @@ Cat <- R6::R6Class(
|
|||||||
invalid_fields <- list()
|
invalid_fields <- list()
|
||||||
# check if the required `className` is null
|
# check if the required `className` is null
|
||||||
if (is.null(self$`className`)) {
|
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
|
invalid_fields
|
||||||
|
@ -165,7 +165,7 @@ Category <- R6::R6Class(
|
|||||||
getInvalidFields = function() {
|
getInvalidFields = function() {
|
||||||
invalid_fields <- list()
|
invalid_fields <- list()
|
||||||
if (!str_detect(self$`name`, "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$")) {
|
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
|
invalid_fields
|
||||||
|
@ -184,12 +184,12 @@ DanishPig <- R6::R6Class(
|
|||||||
invalid_fields <- list()
|
invalid_fields <- list()
|
||||||
# check if the required `className` is null
|
# check if the required `className` is null
|
||||||
if (is.null(self$`className`)) {
|
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
|
# check if the required `size` is null
|
||||||
if (is.null(self$`size`)) {
|
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
|
invalid_fields
|
||||||
|
@ -197,7 +197,7 @@ Dog <- R6::R6Class(
|
|||||||
invalid_fields <- list()
|
invalid_fields <- list()
|
||||||
# check if the required `className` is null
|
# check if the required `className` is null
|
||||||
if (is.null(self$`className`)) {
|
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
|
invalid_fields
|
||||||
|
@ -281,12 +281,12 @@ Pet <- R6::R6Class(
|
|||||||
invalid_fields <- list()
|
invalid_fields <- list()
|
||||||
# check if the required `name` is null
|
# check if the required `name` is null
|
||||||
if (is.null(self$`name`)) {
|
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
|
# check if the required `photoUrls` is null
|
||||||
if (is.null(self$`photoUrls`)) {
|
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
|
invalid_fields
|
||||||
|
@ -5,7 +5,7 @@ cache:
|
|||||||
- /home/travis/R/Library
|
- /home/travis/R/Library
|
||||||
r_packages:
|
r_packages:
|
||||||
- jsonlite
|
- jsonlite
|
||||||
- httr
|
- httr2
|
||||||
- testthat
|
- testthat
|
||||||
# uncomment below to install deps with devtools
|
# uncomment below to install deps with devtools
|
||||||
#install:
|
#install:
|
||||||
|
@ -173,7 +173,7 @@ Animal <- R6::R6Class(
|
|||||||
invalid_fields <- list()
|
invalid_fields <- list()
|
||||||
# check if the required `className` is null
|
# check if the required `className` is null
|
||||||
if (is.null(self$`className`)) {
|
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
|
invalid_fields
|
||||||
|
@ -184,12 +184,12 @@ BasquePig <- R6::R6Class(
|
|||||||
invalid_fields <- list()
|
invalid_fields <- list()
|
||||||
# check if the required `className` is null
|
# check if the required `className` is null
|
||||||
if (is.null(self$`className`)) {
|
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
|
# check if the required `color` is null
|
||||||
if (is.null(self$`color`)) {
|
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
|
invalid_fields
|
||||||
|
@ -197,7 +197,7 @@ Cat <- R6::R6Class(
|
|||||||
invalid_fields <- list()
|
invalid_fields <- list()
|
||||||
# check if the required `className` is null
|
# check if the required `className` is null
|
||||||
if (is.null(self$`className`)) {
|
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
|
invalid_fields
|
||||||
|
@ -165,7 +165,7 @@ Category <- R6::R6Class(
|
|||||||
getInvalidFields = function() {
|
getInvalidFields = function() {
|
||||||
invalid_fields <- list()
|
invalid_fields <- list()
|
||||||
if (!str_detect(self$`name`, "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$")) {
|
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
|
invalid_fields
|
||||||
|
@ -184,12 +184,12 @@ DanishPig <- R6::R6Class(
|
|||||||
invalid_fields <- list()
|
invalid_fields <- list()
|
||||||
# check if the required `className` is null
|
# check if the required `className` is null
|
||||||
if (is.null(self$`className`)) {
|
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
|
# check if the required `size` is null
|
||||||
if (is.null(self$`size`)) {
|
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
|
invalid_fields
|
||||||
|
@ -197,7 +197,7 @@ Dog <- R6::R6Class(
|
|||||||
invalid_fields <- list()
|
invalid_fields <- list()
|
||||||
# check if the required `className` is null
|
# check if the required `className` is null
|
||||||
if (is.null(self$`className`)) {
|
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
|
invalid_fields
|
||||||
|
@ -281,12 +281,12 @@ Pet <- R6::R6Class(
|
|||||||
invalid_fields <- list()
|
invalid_fields <- list()
|
||||||
# check if the required `name` is null
|
# check if the required `name` is null
|
||||||
if (is.null(self$`name`)) {
|
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
|
# check if the required `photoUrls` is null
|
||||||
if (is.null(self$`photoUrls`)) {
|
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
|
invalid_fields
|
||||||
|
@ -173,7 +173,7 @@ Animal <- R6::R6Class(
|
|||||||
invalid_fields <- list()
|
invalid_fields <- list()
|
||||||
# check if the required `className` is null
|
# check if the required `className` is null
|
||||||
if (is.null(self$`className`)) {
|
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
|
invalid_fields
|
||||||
|
@ -184,12 +184,12 @@ BasquePig <- R6::R6Class(
|
|||||||
invalid_fields <- list()
|
invalid_fields <- list()
|
||||||
# check if the required `className` is null
|
# check if the required `className` is null
|
||||||
if (is.null(self$`className`)) {
|
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
|
# check if the required `color` is null
|
||||||
if (is.null(self$`color`)) {
|
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
|
invalid_fields
|
||||||
|
@ -197,7 +197,7 @@ Cat <- R6::R6Class(
|
|||||||
invalid_fields <- list()
|
invalid_fields <- list()
|
||||||
# check if the required `className` is null
|
# check if the required `className` is null
|
||||||
if (is.null(self$`className`)) {
|
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
|
invalid_fields
|
||||||
|
@ -165,7 +165,7 @@ Category <- R6::R6Class(
|
|||||||
getInvalidFields = function() {
|
getInvalidFields = function() {
|
||||||
invalid_fields <- list()
|
invalid_fields <- list()
|
||||||
if (!str_detect(self$`name`, "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$")) {
|
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
|
invalid_fields
|
||||||
|
@ -184,12 +184,12 @@ DanishPig <- R6::R6Class(
|
|||||||
invalid_fields <- list()
|
invalid_fields <- list()
|
||||||
# check if the required `className` is null
|
# check if the required `className` is null
|
||||||
if (is.null(self$`className`)) {
|
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
|
# check if the required `size` is null
|
||||||
if (is.null(self$`size`)) {
|
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
|
invalid_fields
|
||||||
|
@ -197,7 +197,7 @@ Dog <- R6::R6Class(
|
|||||||
invalid_fields <- list()
|
invalid_fields <- list()
|
||||||
# check if the required `className` is null
|
# check if the required `className` is null
|
||||||
if (is.null(self$`className`)) {
|
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
|
invalid_fields
|
||||||
|
@ -281,12 +281,12 @@ Pet <- R6::R6Class(
|
|||||||
invalid_fields <- list()
|
invalid_fields <- list()
|
||||||
# check if the required `name` is null
|
# check if the required `name` is null
|
||||||
if (is.null(self$`name`)) {
|
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
|
# check if the required `photoUrls` is null
|
||||||
if (is.null(self$`photoUrls`)) {
|
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
|
invalid_fields
|
||||||
|
Loading…
x
Reference in New Issue
Block a user