diff --git a/modules/openapi-generator/src/main/resources/r/modelAnyOf.mustache b/modules/openapi-generator/src/main/resources/r/modelAnyOf.mustache
index f16a9cd2d1b651dffd3dd5601e6c35b18cc9d854..3c8e5d74147f41bcac5a7125923c9072a06ffc00 100644
--- a/modules/openapi-generator/src/main/resources/r/modelAnyOf.mustache
+++ b/modules/openapi-generator/src/main/resources/r/modelAnyOf.mustache
@@ -60,7 +60,7 @@
 
       {{#composedSchemas.anyOf}}
       {{^isNull}}
-      {{{dataType}}}_result <- tryCatch({
+      `{{{dataType}}}_result` <- tryCatch({
           {{#isPrimitiveType}}
           instance <- jsonlite::fromJSON(input, simplifyVector = FALSE)
           if (typeof(instance) != "{{{dataType}}}") {
@@ -68,18 +68,18 @@
           }
           {{/isPrimitiveType}}
           {{^isPrimitiveType}}
-          {{{dataType}}}$public_methods$validateJSON(input)
-          {{{dataType}}}_instance <- {{{dataType}}}$new()
+          `{{{dataType}}}`$public_methods$validateJSON(input)
+          `{{{dataType}}}_instance` <- `{{{dataType}}}`$new()
           {{/isPrimitiveType}}
-          self$actual_instance <- {{{dataType}}}_instance$fromJSON(input)
+          self$actual_instance <- `{{{dataType}}}_instance`$fromJSON(input)
           self$actual_type <- "{{{dataType}}}"
           return(self)
         },
         error = function(err) err
       )
 
-      if (!is.null({{{dataType}}}_result["error"])) {
-        error_messages <- append(error_messages, {{{dataType}}}_result["message"])
+      if (!is.null(`{{{dataType}}}_result`["error"])) {
+        error_messages <- append(error_messages, `{{{dataType}}}_result`["message"])
       }
 
       {{/isNull}}
diff --git a/modules/openapi-generator/src/main/resources/r/modelGeneric.mustache b/modules/openapi-generator/src/main/resources/r/modelGeneric.mustache
index 6d404195a032ddfe92fa5fed0ccc555ec83cabf5..f967537e2944cedbded03a30f901e98c406cfb59 100644
--- a/modules/openapi-generator/src/main/resources/r/modelGeneric.mustache
+++ b/modules/openapi-generator/src/main/resources/r/modelGeneric.mustache
@@ -289,9 +289,9 @@
         self$`{{name}}` <- this_object$`{{baseName}}`
         {{/isPrimitiveType}}
         {{^isPrimitiveType}}
-        {{#lambda.lowercase}}{{{name}}}{{/lambda.lowercase}}_object <- {{dataType}}$new()
-        {{#lambda.lowercase}}{{{name}}}{{/lambda.lowercase}}_object$fromJSON(jsonlite::toJSON(this_object${{baseName}}, auto_unbox = TRUE, digits = NA))
-        self$`{{name}}` <- {{#lambda.lowercase}}{{{name}}}{{/lambda.lowercase}}_object
+        `{{#lambda.lowercase}}{{{name}}}{{/lambda.lowercase}}_object` <- {{dataType}}$new()
+        `{{#lambda.lowercase}}{{{name}}}{{/lambda.lowercase}}_object`$fromJSON(jsonlite::toJSON(this_object$`{{baseName}}`, auto_unbox = TRUE, digits = NA))
+        self$`{{name}}` <- `{{#lambda.lowercase}}{{{name}}}{{/lambda.lowercase}}_object`
         {{/isPrimitiveType}}
         {{/isContainer}}
       }
@@ -421,7 +421,7 @@
       self$`{{name}}` <- this_object$`{{name}}`
       {{/isPrimitiveType}}
       {{^isPrimitiveType}}
-      self$`{{name}}` <- {{dataType}}$new()$fromJSON(jsonlite::toJSON(this_object${{name}}, auto_unbox = TRUE, digits = NA))
+      self$`{{name}}` <- {{dataType}}$new()$fromJSON(jsonlite::toJSON(this_object$`{{name}}`, auto_unbox = TRUE, digits = NA))
       {{/isPrimitiveType}}
       {{/isContainer}}
       {{/vars}}
diff --git a/modules/openapi-generator/src/main/resources/r/modelOneOf.mustache b/modules/openapi-generator/src/main/resources/r/modelOneOf.mustache
index f692ca1288bede72c58f2fd0ce573b584b1f99e9..4c70d776623ca9ab1a3a03e07729ad81f5e441d8 100644
--- a/modules/openapi-generator/src/main/resources/r/modelOneOf.mustache
+++ b/modules/openapi-generator/src/main/resources/r/modelOneOf.mustache
@@ -99,7 +99,7 @@
       {{/useOneOfDiscriminatorLookup}}
       {{#composedSchemas.oneOf}}
       {{^isNull}}
-      {{{dataType}}}_result <- tryCatch({
+      `{{{dataType}}}_result` <- tryCatch({
           {{#isPrimitiveType}}
           instance <- jsonlite::fromJSON(input, simplifyVector = FALSE)
           if (typeof(instance) != "{{{dataType}}}") {
@@ -107,9 +107,9 @@
           }
           {{/isPrimitiveType}}
           {{^isPrimitiveType}}
-          {{{dataType}}}$public_methods$validateJSON(input)
-          {{{dataType}}}_instance <- {{{dataType}}}$new()
-          instance <- {{{dataType}}}_instance$fromJSON(input)
+          `{{{dataType}}}`$public_methods$validateJSON(input)
+          `{{{dataType}}}_instance` <- `{{{dataType}}}`$new()
+          instance <- `{{{dataType}}}_instance`$fromJSON(input)
           {{/isPrimitiveType}}
           instance_type <- "{{{dataType}}}"
           matched_schemas <- append(matched_schemas, "{{{dataType}}}")
@@ -118,8 +118,8 @@
         error = function(err) err
       )
 
-      if (!is.null({{{dataType}}}_result["error"])) {
-        error_messages <- append(error_messages, {{{dataType}}}_result["message"])
+      if (!is.null(`{{{dataType}}}_result`["error"])) {
+        error_messages <- append(error_messages, `{{{dataType}}}_result`["message"])
       }
 
       {{/isNull}}
diff --git a/samples/client/petstore/R-httr2-wrapper/R/any_of_pig.R b/samples/client/petstore/R-httr2-wrapper/R/any_of_pig.R
index 34736dc7f38c24aea439fb9da22209572bb7f96b..53213832fc94910e74411463468645bc54f37031 100644
--- a/samples/client/petstore/R-httr2-wrapper/R/any_of_pig.R
+++ b/samples/client/petstore/R-httr2-wrapper/R/any_of_pig.R
@@ -61,32 +61,32 @@ AnyOfPig <- R6::R6Class(
     fromJSON = function(input) {
       error_messages <- list()
 
-      BasquePig_result <- tryCatch({
-          BasquePig$public_methods$validateJSON(input)
-          BasquePig_instance <- BasquePig$new()
-          self$actual_instance <- BasquePig_instance$fromJSON(input)
+      `BasquePig_result` <- tryCatch({
+          `BasquePig`$public_methods$validateJSON(input)
+          `BasquePig_instance` <- `BasquePig`$new()
+          self$actual_instance <- `BasquePig_instance`$fromJSON(input)
           self$actual_type <- "BasquePig"
           return(self)
         },
         error = function(err) err
       )
 
-      if (!is.null(BasquePig_result["error"])) {
-        error_messages <- append(error_messages, BasquePig_result["message"])
+      if (!is.null(`BasquePig_result`["error"])) {
+        error_messages <- append(error_messages, `BasquePig_result`["message"])
       }
 
-      DanishPig_result <- tryCatch({
-          DanishPig$public_methods$validateJSON(input)
-          DanishPig_instance <- DanishPig$new()
-          self$actual_instance <- DanishPig_instance$fromJSON(input)
+      `DanishPig_result` <- tryCatch({
+          `DanishPig`$public_methods$validateJSON(input)
+          `DanishPig_instance` <- `DanishPig`$new()
+          self$actual_instance <- `DanishPig_instance`$fromJSON(input)
           self$actual_type <- "DanishPig"
           return(self)
         },
         error = function(err) err
       )
 
-      if (!is.null(DanishPig_result["error"])) {
-        error_messages <- append(error_messages, DanishPig_result["message"])
+      if (!is.null(`DanishPig_result`["error"])) {
+        error_messages <- append(error_messages, `DanishPig_result`["message"])
       }
 
       # no match
diff --git a/samples/client/petstore/R-httr2-wrapper/R/any_of_primitive_type_test.R b/samples/client/petstore/R-httr2-wrapper/R/any_of_primitive_type_test.R
index c34326a3161fbd6f41473841d8d0ec1d7f240a74..9b8d2a4d15b178fb0694223f6436966bec8592e7 100644
--- a/samples/client/petstore/R-httr2-wrapper/R/any_of_primitive_type_test.R
+++ b/samples/client/petstore/R-httr2-wrapper/R/any_of_primitive_type_test.R
@@ -64,7 +64,7 @@ AnyOfPrimitiveTypeTest <- R6::R6Class(
       error_messages <- list()
       instance <- NULL
 
-      integer_result <- tryCatch({
+      `integer_result` <- tryCatch({
           instance <- jsonlite::fromJSON(input, simplifyVector = FALSE)
           if (typeof(instance) != "integer") {
             stop(sprintf("Data type doesn't match. Expected: %s. Actual: %s.", "integer", typeof(instance)))
@@ -76,11 +76,11 @@ AnyOfPrimitiveTypeTest <- R6::R6Class(
         error = function(err) err
       )
 
-      if (!is.null(integer_result["error"])) {
-        error_messages <- append(error_messages, integer_result["message"])
+      if (!is.null(`integer_result`["error"])) {
+        error_messages <- append(error_messages, `integer_result`["message"])
       }
 
-      character_result <- tryCatch({
+      `character_result` <- tryCatch({
           instance <- jsonlite::fromJSON(input, simplifyVector = FALSE)
           if (typeof(instance) != "character") {
             stop(sprintf("Data type doesn't match. Expected: %s. Actual: %s.", "character", typeof(instance)))
@@ -92,8 +92,8 @@ AnyOfPrimitiveTypeTest <- R6::R6Class(
         error = function(err) err
       )
 
-      if (!is.null(character_result["error"])) {
-        error_messages <- append(error_messages, character_result["message"])
+      if (!is.null(`character_result`["error"])) {
+        error_messages <- append(error_messages, `character_result`["message"])
       }
 
       if (matched == 1) {
diff --git a/samples/client/petstore/R-httr2-wrapper/R/mammal.R b/samples/client/petstore/R-httr2-wrapper/R/mammal.R
index b96d79926ca8cb9d91a1b4c018e1c3ee3b8a8ea5..cfefc92a83fe543464eea195df8754907aa1182f 100644
--- a/samples/client/petstore/R-httr2-wrapper/R/mammal.R
+++ b/samples/client/petstore/R-httr2-wrapper/R/mammal.R
@@ -90,10 +90,10 @@ Mammal <- R6::R6Class(
         error_messages <- append(error_messages, sprintf("Failed to lookup discriminator value for Mammal. Error message: %s. JSON input: %s", oneof_lookup_result["message"], input))
       }
 
-      Whale_result <- tryCatch({
-          Whale$public_methods$validateJSON(input)
-          Whale_instance <- Whale$new()
-          instance <- Whale_instance$fromJSON(input)
+      `Whale_result` <- tryCatch({
+          `Whale`$public_methods$validateJSON(input)
+          `Whale_instance` <- `Whale`$new()
+          instance <- `Whale_instance`$fromJSON(input)
           instance_type <- "Whale"
           matched_schemas <- append(matched_schemas, "Whale")
           matched <- matched + 1
@@ -101,14 +101,14 @@ Mammal <- R6::R6Class(
         error = function(err) err
       )
 
-      if (!is.null(Whale_result["error"])) {
-        error_messages <- append(error_messages, Whale_result["message"])
+      if (!is.null(`Whale_result`["error"])) {
+        error_messages <- append(error_messages, `Whale_result`["message"])
       }
 
-      Zebra_result <- tryCatch({
-          Zebra$public_methods$validateJSON(input)
-          Zebra_instance <- Zebra$new()
-          instance <- Zebra_instance$fromJSON(input)
+      `Zebra_result` <- tryCatch({
+          `Zebra`$public_methods$validateJSON(input)
+          `Zebra_instance` <- `Zebra`$new()
+          instance <- `Zebra_instance`$fromJSON(input)
           instance_type <- "Zebra"
           matched_schemas <- append(matched_schemas, "Zebra")
           matched <- matched + 1
@@ -116,8 +116,8 @@ Mammal <- R6::R6Class(
         error = function(err) err
       )
 
-      if (!is.null(Zebra_result["error"])) {
-        error_messages <- append(error_messages, Zebra_result["message"])
+      if (!is.null(`Zebra_result`["error"])) {
+        error_messages <- append(error_messages, `Zebra_result`["message"])
       }
 
       if (matched == 1) {
diff --git a/samples/client/petstore/R-httr2-wrapper/R/nested_one_of.R b/samples/client/petstore/R-httr2-wrapper/R/nested_one_of.R
index d2a670b4eddb809bcf7bd0313a551779a1f48417..8fbdf43b466eac44bedb712c7e9fa83f07bd38f5 100644
--- a/samples/client/petstore/R-httr2-wrapper/R/nested_one_of.R
+++ b/samples/client/petstore/R-httr2-wrapper/R/nested_one_of.R
@@ -85,9 +85,9 @@ NestedOneOf <- R6::R6Class(
         self$`size` <- this_object$`size`
       }
       if (!is.null(this_object$`nested_pig`)) {
-        nested_pig_object <- Pig$new()
-        nested_pig_object$fromJSON(jsonlite::toJSON(this_object$nested_pig, auto_unbox = TRUE, digits = NA))
-        self$`nested_pig` <- nested_pig_object
+        `nested_pig_object` <- Pig$new()
+        `nested_pig_object`$fromJSON(jsonlite::toJSON(this_object$`nested_pig`, auto_unbox = TRUE, digits = NA))
+        self$`nested_pig` <- `nested_pig_object`
       }
       # process additional properties/fields in the payload
       for (key in names(this_object)) {
@@ -143,7 +143,7 @@ NestedOneOf <- R6::R6Class(
     fromJSONString = function(input_json) {
       this_object <- jsonlite::fromJSON(input_json)
       self$`size` <- this_object$`size`
-      self$`nested_pig` <- Pig$new()$fromJSON(jsonlite::toJSON(this_object$nested_pig, auto_unbox = TRUE, digits = NA))
+      self$`nested_pig` <- Pig$new()$fromJSON(jsonlite::toJSON(this_object$`nested_pig`, auto_unbox = TRUE, digits = NA))
       # process additional properties/fields in the payload
       for (key in names(this_object)) {
         if (!(key %in% self$`_field_list`)) { # json key not in list of fields
diff --git a/samples/client/petstore/R-httr2-wrapper/R/one_of_primitive_type_test.R b/samples/client/petstore/R-httr2-wrapper/R/one_of_primitive_type_test.R
index faf3f7850ab8162af0490434ba905c1538ea3fd9..da4d226dd3bb50bd1a08b1bf93ff96ffe3761f37 100644
--- a/samples/client/petstore/R-httr2-wrapper/R/one_of_primitive_type_test.R
+++ b/samples/client/petstore/R-httr2-wrapper/R/one_of_primitive_type_test.R
@@ -64,7 +64,7 @@ OneOfPrimitiveTypeTest <- R6::R6Class(
       error_messages <- list()
       instance <- NULL
 
-      integer_result <- tryCatch({
+      `integer_result` <- tryCatch({
           instance <- jsonlite::fromJSON(input, simplifyVector = FALSE)
           if (typeof(instance) != "integer") {
             stop(sprintf("Data type doesn't match. Expected: %s. Actual: %s.", "integer", typeof(instance)))
@@ -76,11 +76,11 @@ OneOfPrimitiveTypeTest <- R6::R6Class(
         error = function(err) err
       )
 
-      if (!is.null(integer_result["error"])) {
-        error_messages <- append(error_messages, integer_result["message"])
+      if (!is.null(`integer_result`["error"])) {
+        error_messages <- append(error_messages, `integer_result`["message"])
       }
 
-      character_result <- tryCatch({
+      `character_result` <- tryCatch({
           instance <- jsonlite::fromJSON(input, simplifyVector = FALSE)
           if (typeof(instance) != "character") {
             stop(sprintf("Data type doesn't match. Expected: %s. Actual: %s.", "character", typeof(instance)))
@@ -92,8 +92,8 @@ OneOfPrimitiveTypeTest <- R6::R6Class(
         error = function(err) err
       )
 
-      if (!is.null(character_result["error"])) {
-        error_messages <- append(error_messages, character_result["message"])
+      if (!is.null(`character_result`["error"])) {
+        error_messages <- append(error_messages, `character_result`["message"])
       }
 
       if (matched == 1) {
diff --git a/samples/client/petstore/R-httr2-wrapper/R/pet.R b/samples/client/petstore/R-httr2-wrapper/R/pet.R
index 42db1ecb88550c1e236bedbc5b5cee3a895e58ee..ea3b23ce96809fe0a3c914dddfc51897cc66d015 100644
--- a/samples/client/petstore/R-httr2-wrapper/R/pet.R
+++ b/samples/client/petstore/R-httr2-wrapper/R/pet.R
@@ -138,9 +138,9 @@ Pet <- R6::R6Class(
         self$`id` <- this_object$`id`
       }
       if (!is.null(this_object$`category`)) {
-        category_object <- Category$new()
-        category_object$fromJSON(jsonlite::toJSON(this_object$category, auto_unbox = TRUE, digits = NA))
-        self$`category` <- category_object
+        `category_object` <- Category$new()
+        `category_object`$fromJSON(jsonlite::toJSON(this_object$`category`, auto_unbox = TRUE, digits = NA))
+        self$`category` <- `category_object`
       }
       if (!is.null(this_object$`name`)) {
         self$`name` <- this_object$`name`
@@ -243,7 +243,7 @@ Pet <- R6::R6Class(
     fromJSONString = function(input_json) {
       this_object <- jsonlite::fromJSON(input_json)
       self$`id` <- this_object$`id`
-      self$`category` <- Category$new()$fromJSON(jsonlite::toJSON(this_object$category, auto_unbox = TRUE, digits = NA))
+      self$`category` <- Category$new()$fromJSON(jsonlite::toJSON(this_object$`category`, auto_unbox = TRUE, digits = NA))
       self$`name` <- this_object$`name`
       self$`photoUrls` <- ApiClient$new()$deserializeObj(this_object$`photoUrls`, "array[character]", loadNamespace("petstore"))
       self$`tags` <- ApiClient$new()$deserializeObj(this_object$`tags`, "array[Tag]", loadNamespace("petstore"))
diff --git a/samples/client/petstore/R-httr2-wrapper/R/pig.R b/samples/client/petstore/R-httr2-wrapper/R/pig.R
index a7139f4795b638e6975211e730e591d5bcf4a9bb..e44ae074eccd21bb22be0185222954fd44b09684 100644
--- a/samples/client/petstore/R-httr2-wrapper/R/pig.R
+++ b/samples/client/petstore/R-httr2-wrapper/R/pig.R
@@ -90,10 +90,10 @@ Pig <- R6::R6Class(
         error_messages <- append(error_messages, sprintf("Failed to lookup discriminator value for Pig. Error message: %s. JSON input: %s", oneof_lookup_result["message"], input))
       }
 
-      BasquePig_result <- tryCatch({
-          BasquePig$public_methods$validateJSON(input)
-          BasquePig_instance <- BasquePig$new()
-          instance <- BasquePig_instance$fromJSON(input)
+      `BasquePig_result` <- tryCatch({
+          `BasquePig`$public_methods$validateJSON(input)
+          `BasquePig_instance` <- `BasquePig`$new()
+          instance <- `BasquePig_instance`$fromJSON(input)
           instance_type <- "BasquePig"
           matched_schemas <- append(matched_schemas, "BasquePig")
           matched <- matched + 1
@@ -101,14 +101,14 @@ Pig <- R6::R6Class(
         error = function(err) err
       )
 
-      if (!is.null(BasquePig_result["error"])) {
-        error_messages <- append(error_messages, BasquePig_result["message"])
+      if (!is.null(`BasquePig_result`["error"])) {
+        error_messages <- append(error_messages, `BasquePig_result`["message"])
       }
 
-      DanishPig_result <- tryCatch({
-          DanishPig$public_methods$validateJSON(input)
-          DanishPig_instance <- DanishPig$new()
-          instance <- DanishPig_instance$fromJSON(input)
+      `DanishPig_result` <- tryCatch({
+          `DanishPig`$public_methods$validateJSON(input)
+          `DanishPig_instance` <- `DanishPig`$new()
+          instance <- `DanishPig_instance`$fromJSON(input)
           instance_type <- "DanishPig"
           matched_schemas <- append(matched_schemas, "DanishPig")
           matched <- matched + 1
@@ -116,8 +116,8 @@ Pig <- R6::R6Class(
         error = function(err) err
       )
 
-      if (!is.null(DanishPig_result["error"])) {
-        error_messages <- append(error_messages, DanishPig_result["message"])
+      if (!is.null(`DanishPig_result`["error"])) {
+        error_messages <- append(error_messages, `DanishPig_result`["message"])
       }
 
       if (matched == 1) {
diff --git a/samples/client/petstore/R-httr2-wrapper/R/update_pet_request.R b/samples/client/petstore/R-httr2-wrapper/R/update_pet_request.R
index 2fc96ab4fffa4fded2a7a9bf0b5c2ced9ae6f8c2..c29abc945abc2adc2ab3ee7701bec44fa63bae6d 100644
--- a/samples/client/petstore/R-httr2-wrapper/R/update_pet_request.R
+++ b/samples/client/petstore/R-httr2-wrapper/R/update_pet_request.R
@@ -79,9 +79,9 @@ UpdatePetRequest <- R6::R6Class(
     fromJSON = function(input_json) {
       this_object <- jsonlite::fromJSON(input_json)
       if (!is.null(this_object$`jsonData`)) {
-        jsondata_object <- Pet$new()
-        jsondata_object$fromJSON(jsonlite::toJSON(this_object$jsonData, auto_unbox = TRUE, digits = NA))
-        self$`jsonData` <- jsondata_object
+        `jsondata_object` <- Pet$new()
+        `jsondata_object`$fromJSON(jsonlite::toJSON(this_object$`jsonData`, auto_unbox = TRUE, digits = NA))
+        self$`jsonData` <- `jsondata_object`
       }
       if (!is.null(this_object$`binaryDataN2Information`)) {
         self$`binaryDataN2Information` <- this_object$`binaryDataN2Information`
@@ -139,7 +139,7 @@ UpdatePetRequest <- R6::R6Class(
     #' @export
     fromJSONString = function(input_json) {
       this_object <- jsonlite::fromJSON(input_json)
-      self$`jsonData` <- Pet$new()$fromJSON(jsonlite::toJSON(this_object$jsonData, auto_unbox = TRUE, digits = NA))
+      self$`jsonData` <- Pet$new()$fromJSON(jsonlite::toJSON(this_object$`jsonData`, auto_unbox = TRUE, digits = NA))
       self$`binaryDataN2Information` <- this_object$`binaryDataN2Information`
       # process additional properties/fields in the payload
       for (key in names(this_object)) {
diff --git a/samples/client/petstore/R-httr2/R/any_of_pig.R b/samples/client/petstore/R-httr2/R/any_of_pig.R
index 34736dc7f38c24aea439fb9da22209572bb7f96b..53213832fc94910e74411463468645bc54f37031 100644
--- a/samples/client/petstore/R-httr2/R/any_of_pig.R
+++ b/samples/client/petstore/R-httr2/R/any_of_pig.R
@@ -61,32 +61,32 @@ AnyOfPig <- R6::R6Class(
     fromJSON = function(input) {
       error_messages <- list()
 
-      BasquePig_result <- tryCatch({
-          BasquePig$public_methods$validateJSON(input)
-          BasquePig_instance <- BasquePig$new()
-          self$actual_instance <- BasquePig_instance$fromJSON(input)
+      `BasquePig_result` <- tryCatch({
+          `BasquePig`$public_methods$validateJSON(input)
+          `BasquePig_instance` <- `BasquePig`$new()
+          self$actual_instance <- `BasquePig_instance`$fromJSON(input)
           self$actual_type <- "BasquePig"
           return(self)
         },
         error = function(err) err
       )
 
-      if (!is.null(BasquePig_result["error"])) {
-        error_messages <- append(error_messages, BasquePig_result["message"])
+      if (!is.null(`BasquePig_result`["error"])) {
+        error_messages <- append(error_messages, `BasquePig_result`["message"])
       }
 
-      DanishPig_result <- tryCatch({
-          DanishPig$public_methods$validateJSON(input)
-          DanishPig_instance <- DanishPig$new()
-          self$actual_instance <- DanishPig_instance$fromJSON(input)
+      `DanishPig_result` <- tryCatch({
+          `DanishPig`$public_methods$validateJSON(input)
+          `DanishPig_instance` <- `DanishPig`$new()
+          self$actual_instance <- `DanishPig_instance`$fromJSON(input)
           self$actual_type <- "DanishPig"
           return(self)
         },
         error = function(err) err
       )
 
-      if (!is.null(DanishPig_result["error"])) {
-        error_messages <- append(error_messages, DanishPig_result["message"])
+      if (!is.null(`DanishPig_result`["error"])) {
+        error_messages <- append(error_messages, `DanishPig_result`["message"])
       }
 
       # no match
diff --git a/samples/client/petstore/R-httr2/R/any_of_primitive_type_test.R b/samples/client/petstore/R-httr2/R/any_of_primitive_type_test.R
index c34326a3161fbd6f41473841d8d0ec1d7f240a74..9b8d2a4d15b178fb0694223f6436966bec8592e7 100644
--- a/samples/client/petstore/R-httr2/R/any_of_primitive_type_test.R
+++ b/samples/client/petstore/R-httr2/R/any_of_primitive_type_test.R
@@ -64,7 +64,7 @@ AnyOfPrimitiveTypeTest <- R6::R6Class(
       error_messages <- list()
       instance <- NULL
 
-      integer_result <- tryCatch({
+      `integer_result` <- tryCatch({
           instance <- jsonlite::fromJSON(input, simplifyVector = FALSE)
           if (typeof(instance) != "integer") {
             stop(sprintf("Data type doesn't match. Expected: %s. Actual: %s.", "integer", typeof(instance)))
@@ -76,11 +76,11 @@ AnyOfPrimitiveTypeTest <- R6::R6Class(
         error = function(err) err
       )
 
-      if (!is.null(integer_result["error"])) {
-        error_messages <- append(error_messages, integer_result["message"])
+      if (!is.null(`integer_result`["error"])) {
+        error_messages <- append(error_messages, `integer_result`["message"])
       }
 
-      character_result <- tryCatch({
+      `character_result` <- tryCatch({
           instance <- jsonlite::fromJSON(input, simplifyVector = FALSE)
           if (typeof(instance) != "character") {
             stop(sprintf("Data type doesn't match. Expected: %s. Actual: %s.", "character", typeof(instance)))
@@ -92,8 +92,8 @@ AnyOfPrimitiveTypeTest <- R6::R6Class(
         error = function(err) err
       )
 
-      if (!is.null(character_result["error"])) {
-        error_messages <- append(error_messages, character_result["message"])
+      if (!is.null(`character_result`["error"])) {
+        error_messages <- append(error_messages, `character_result`["message"])
       }
 
       if (matched == 1) {
diff --git a/samples/client/petstore/R-httr2/R/mammal.R b/samples/client/petstore/R-httr2/R/mammal.R
index a5af6d76d644e8aec51f4b08217cf912958ebd2e..13bb0da875e208e85b3ee6101b9ee0b54c639950 100644
--- a/samples/client/petstore/R-httr2/R/mammal.R
+++ b/samples/client/petstore/R-httr2/R/mammal.R
@@ -64,10 +64,10 @@ Mammal <- R6::R6Class(
       error_messages <- list()
       instance <- NULL
 
-      Whale_result <- tryCatch({
-          Whale$public_methods$validateJSON(input)
-          Whale_instance <- Whale$new()
-          instance <- Whale_instance$fromJSON(input)
+      `Whale_result` <- tryCatch({
+          `Whale`$public_methods$validateJSON(input)
+          `Whale_instance` <- `Whale`$new()
+          instance <- `Whale_instance`$fromJSON(input)
           instance_type <- "Whale"
           matched_schemas <- append(matched_schemas, "Whale")
           matched <- matched + 1
@@ -75,14 +75,14 @@ Mammal <- R6::R6Class(
         error = function(err) err
       )
 
-      if (!is.null(Whale_result["error"])) {
-        error_messages <- append(error_messages, Whale_result["message"])
+      if (!is.null(`Whale_result`["error"])) {
+        error_messages <- append(error_messages, `Whale_result`["message"])
       }
 
-      Zebra_result <- tryCatch({
-          Zebra$public_methods$validateJSON(input)
-          Zebra_instance <- Zebra$new()
-          instance <- Zebra_instance$fromJSON(input)
+      `Zebra_result` <- tryCatch({
+          `Zebra`$public_methods$validateJSON(input)
+          `Zebra_instance` <- `Zebra`$new()
+          instance <- `Zebra_instance`$fromJSON(input)
           instance_type <- "Zebra"
           matched_schemas <- append(matched_schemas, "Zebra")
           matched <- matched + 1
@@ -90,8 +90,8 @@ Mammal <- R6::R6Class(
         error = function(err) err
       )
 
-      if (!is.null(Zebra_result["error"])) {
-        error_messages <- append(error_messages, Zebra_result["message"])
+      if (!is.null(`Zebra_result`["error"])) {
+        error_messages <- append(error_messages, `Zebra_result`["message"])
       }
 
       if (matched == 1) {
diff --git a/samples/client/petstore/R-httr2/R/nested_one_of.R b/samples/client/petstore/R-httr2/R/nested_one_of.R
index a2c5fc4b83ce1b4094754a7fd1e4545989b6f169..a62902ac4fb18e966ac4b523b3607e991ac498a5 100644
--- a/samples/client/petstore/R-httr2/R/nested_one_of.R
+++ b/samples/client/petstore/R-httr2/R/nested_one_of.R
@@ -71,9 +71,9 @@ NestedOneOf <- R6::R6Class(
         self$`size` <- this_object$`size`
       }
       if (!is.null(this_object$`nested_pig`)) {
-        nested_pig_object <- Pig$new()
-        nested_pig_object$fromJSON(jsonlite::toJSON(this_object$nested_pig, auto_unbox = TRUE, digits = NA))
-        self$`nested_pig` <- nested_pig_object
+        `nested_pig_object` <- Pig$new()
+        `nested_pig_object`$fromJSON(jsonlite::toJSON(this_object$`nested_pig`, auto_unbox = TRUE, digits = NA))
+        self$`nested_pig` <- `nested_pig_object`
       }
       self
     },
@@ -117,7 +117,7 @@ NestedOneOf <- R6::R6Class(
     fromJSONString = function(input_json) {
       this_object <- jsonlite::fromJSON(input_json)
       self$`size` <- this_object$`size`
-      self$`nested_pig` <- Pig$new()$fromJSON(jsonlite::toJSON(this_object$nested_pig, auto_unbox = TRUE, digits = NA))
+      self$`nested_pig` <- Pig$new()$fromJSON(jsonlite::toJSON(this_object$`nested_pig`, auto_unbox = TRUE, digits = NA))
       self
     },
     #' Validate JSON input with respect to NestedOneOf
diff --git a/samples/client/petstore/R-httr2/R/one_of_primitive_type_test.R b/samples/client/petstore/R-httr2/R/one_of_primitive_type_test.R
index faf3f7850ab8162af0490434ba905c1538ea3fd9..da4d226dd3bb50bd1a08b1bf93ff96ffe3761f37 100644
--- a/samples/client/petstore/R-httr2/R/one_of_primitive_type_test.R
+++ b/samples/client/petstore/R-httr2/R/one_of_primitive_type_test.R
@@ -64,7 +64,7 @@ OneOfPrimitiveTypeTest <- R6::R6Class(
       error_messages <- list()
       instance <- NULL
 
-      integer_result <- tryCatch({
+      `integer_result` <- tryCatch({
           instance <- jsonlite::fromJSON(input, simplifyVector = FALSE)
           if (typeof(instance) != "integer") {
             stop(sprintf("Data type doesn't match. Expected: %s. Actual: %s.", "integer", typeof(instance)))
@@ -76,11 +76,11 @@ OneOfPrimitiveTypeTest <- R6::R6Class(
         error = function(err) err
       )
 
-      if (!is.null(integer_result["error"])) {
-        error_messages <- append(error_messages, integer_result["message"])
+      if (!is.null(`integer_result`["error"])) {
+        error_messages <- append(error_messages, `integer_result`["message"])
       }
 
-      character_result <- tryCatch({
+      `character_result` <- tryCatch({
           instance <- jsonlite::fromJSON(input, simplifyVector = FALSE)
           if (typeof(instance) != "character") {
             stop(sprintf("Data type doesn't match. Expected: %s. Actual: %s.", "character", typeof(instance)))
@@ -92,8 +92,8 @@ OneOfPrimitiveTypeTest <- R6::R6Class(
         error = function(err) err
       )
 
-      if (!is.null(character_result["error"])) {
-        error_messages <- append(error_messages, character_result["message"])
+      if (!is.null(`character_result`["error"])) {
+        error_messages <- append(error_messages, `character_result`["message"])
       }
 
       if (matched == 1) {
diff --git a/samples/client/petstore/R-httr2/R/pet.R b/samples/client/petstore/R-httr2/R/pet.R
index 7070dc689ea735b183e79c9f30aa26eb10723f50..7ce7c6336774bbd42f70ba0517bbfbf9fd5cae04 100644
--- a/samples/client/petstore/R-httr2/R/pet.R
+++ b/samples/client/petstore/R-httr2/R/pet.R
@@ -124,9 +124,9 @@ Pet <- R6::R6Class(
         self$`id` <- this_object$`id`
       }
       if (!is.null(this_object$`category`)) {
-        category_object <- Category$new()
-        category_object$fromJSON(jsonlite::toJSON(this_object$category, auto_unbox = TRUE, digits = NA))
-        self$`category` <- category_object
+        `category_object` <- Category$new()
+        `category_object`$fromJSON(jsonlite::toJSON(this_object$`category`, auto_unbox = TRUE, digits = NA))
+        self$`category` <- `category_object`
       }
       if (!is.null(this_object$`name`)) {
         self$`name` <- this_object$`name`
@@ -217,7 +217,7 @@ Pet <- R6::R6Class(
     fromJSONString = function(input_json) {
       this_object <- jsonlite::fromJSON(input_json)
       self$`id` <- this_object$`id`
-      self$`category` <- Category$new()$fromJSON(jsonlite::toJSON(this_object$category, auto_unbox = TRUE, digits = NA))
+      self$`category` <- Category$new()$fromJSON(jsonlite::toJSON(this_object$`category`, auto_unbox = TRUE, digits = NA))
       self$`name` <- this_object$`name`
       self$`photoUrls` <- ApiClient$new()$deserializeObj(this_object$`photoUrls`, "array[character]", loadNamespace("petstore"))
       self$`tags` <- ApiClient$new()$deserializeObj(this_object$`tags`, "array[Tag]", loadNamespace("petstore"))
diff --git a/samples/client/petstore/R-httr2/R/pig.R b/samples/client/petstore/R-httr2/R/pig.R
index d497bc2803907d61e0f8c8f6d3311f092f35ec25..05bfeebe4ced1687912f98c3a459cbec76ef2e0f 100644
--- a/samples/client/petstore/R-httr2/R/pig.R
+++ b/samples/client/petstore/R-httr2/R/pig.R
@@ -64,10 +64,10 @@ Pig <- R6::R6Class(
       error_messages <- list()
       instance <- NULL
 
-      BasquePig_result <- tryCatch({
-          BasquePig$public_methods$validateJSON(input)
-          BasquePig_instance <- BasquePig$new()
-          instance <- BasquePig_instance$fromJSON(input)
+      `BasquePig_result` <- tryCatch({
+          `BasquePig`$public_methods$validateJSON(input)
+          `BasquePig_instance` <- `BasquePig`$new()
+          instance <- `BasquePig_instance`$fromJSON(input)
           instance_type <- "BasquePig"
           matched_schemas <- append(matched_schemas, "BasquePig")
           matched <- matched + 1
@@ -75,14 +75,14 @@ Pig <- R6::R6Class(
         error = function(err) err
       )
 
-      if (!is.null(BasquePig_result["error"])) {
-        error_messages <- append(error_messages, BasquePig_result["message"])
+      if (!is.null(`BasquePig_result`["error"])) {
+        error_messages <- append(error_messages, `BasquePig_result`["message"])
       }
 
-      DanishPig_result <- tryCatch({
-          DanishPig$public_methods$validateJSON(input)
-          DanishPig_instance <- DanishPig$new()
-          instance <- DanishPig_instance$fromJSON(input)
+      `DanishPig_result` <- tryCatch({
+          `DanishPig`$public_methods$validateJSON(input)
+          `DanishPig_instance` <- `DanishPig`$new()
+          instance <- `DanishPig_instance`$fromJSON(input)
           instance_type <- "DanishPig"
           matched_schemas <- append(matched_schemas, "DanishPig")
           matched <- matched + 1
@@ -90,8 +90,8 @@ Pig <- R6::R6Class(
         error = function(err) err
       )
 
-      if (!is.null(DanishPig_result["error"])) {
-        error_messages <- append(error_messages, DanishPig_result["message"])
+      if (!is.null(`DanishPig_result`["error"])) {
+        error_messages <- append(error_messages, `DanishPig_result`["message"])
       }
 
       if (matched == 1) {
diff --git a/samples/client/petstore/R-httr2/R/update_pet_request.R b/samples/client/petstore/R-httr2/R/update_pet_request.R
index a2da076f8ded797d17d07630ce06172b2f229e2e..62f5c7948839d7fe23a2fcabfee2e214c103ef95 100644
--- a/samples/client/petstore/R-httr2/R/update_pet_request.R
+++ b/samples/client/petstore/R-httr2/R/update_pet_request.R
@@ -65,9 +65,9 @@ UpdatePetRequest <- R6::R6Class(
     fromJSON = function(input_json) {
       this_object <- jsonlite::fromJSON(input_json)
       if (!is.null(this_object$`jsonData`)) {
-        jsondata_object <- Pet$new()
-        jsondata_object$fromJSON(jsonlite::toJSON(this_object$jsonData, auto_unbox = TRUE, digits = NA))
-        self$`jsonData` <- jsondata_object
+        `jsondata_object` <- Pet$new()
+        `jsondata_object`$fromJSON(jsonlite::toJSON(this_object$`jsonData`, auto_unbox = TRUE, digits = NA))
+        self$`jsonData` <- `jsondata_object`
       }
       if (!is.null(this_object$`binaryDataN2Information`)) {
         self$`binaryDataN2Information` <- this_object$`binaryDataN2Information`
@@ -113,7 +113,7 @@ UpdatePetRequest <- R6::R6Class(
     #' @export
     fromJSONString = function(input_json) {
       this_object <- jsonlite::fromJSON(input_json)
-      self$`jsonData` <- Pet$new()$fromJSON(jsonlite::toJSON(this_object$jsonData, auto_unbox = TRUE, digits = NA))
+      self$`jsonData` <- Pet$new()$fromJSON(jsonlite::toJSON(this_object$`jsonData`, auto_unbox = TRUE, digits = NA))
       self$`binaryDataN2Information` <- this_object$`binaryDataN2Information`
       self
     },
diff --git a/samples/client/petstore/R/R/any_of_pig.R b/samples/client/petstore/R/R/any_of_pig.R
index 34736dc7f38c24aea439fb9da22209572bb7f96b..53213832fc94910e74411463468645bc54f37031 100644
--- a/samples/client/petstore/R/R/any_of_pig.R
+++ b/samples/client/petstore/R/R/any_of_pig.R
@@ -61,32 +61,32 @@ AnyOfPig <- R6::R6Class(
     fromJSON = function(input) {
       error_messages <- list()
 
-      BasquePig_result <- tryCatch({
-          BasquePig$public_methods$validateJSON(input)
-          BasquePig_instance <- BasquePig$new()
-          self$actual_instance <- BasquePig_instance$fromJSON(input)
+      `BasquePig_result` <- tryCatch({
+          `BasquePig`$public_methods$validateJSON(input)
+          `BasquePig_instance` <- `BasquePig`$new()
+          self$actual_instance <- `BasquePig_instance`$fromJSON(input)
           self$actual_type <- "BasquePig"
           return(self)
         },
         error = function(err) err
       )
 
-      if (!is.null(BasquePig_result["error"])) {
-        error_messages <- append(error_messages, BasquePig_result["message"])
+      if (!is.null(`BasquePig_result`["error"])) {
+        error_messages <- append(error_messages, `BasquePig_result`["message"])
       }
 
-      DanishPig_result <- tryCatch({
-          DanishPig$public_methods$validateJSON(input)
-          DanishPig_instance <- DanishPig$new()
-          self$actual_instance <- DanishPig_instance$fromJSON(input)
+      `DanishPig_result` <- tryCatch({
+          `DanishPig`$public_methods$validateJSON(input)
+          `DanishPig_instance` <- `DanishPig`$new()
+          self$actual_instance <- `DanishPig_instance`$fromJSON(input)
           self$actual_type <- "DanishPig"
           return(self)
         },
         error = function(err) err
       )
 
-      if (!is.null(DanishPig_result["error"])) {
-        error_messages <- append(error_messages, DanishPig_result["message"])
+      if (!is.null(`DanishPig_result`["error"])) {
+        error_messages <- append(error_messages, `DanishPig_result`["message"])
       }
 
       # no match
diff --git a/samples/client/petstore/R/R/any_of_primitive_type_test.R b/samples/client/petstore/R/R/any_of_primitive_type_test.R
index c34326a3161fbd6f41473841d8d0ec1d7f240a74..9b8d2a4d15b178fb0694223f6436966bec8592e7 100644
--- a/samples/client/petstore/R/R/any_of_primitive_type_test.R
+++ b/samples/client/petstore/R/R/any_of_primitive_type_test.R
@@ -64,7 +64,7 @@ AnyOfPrimitiveTypeTest <- R6::R6Class(
       error_messages <- list()
       instance <- NULL
 
-      integer_result <- tryCatch({
+      `integer_result` <- tryCatch({
           instance <- jsonlite::fromJSON(input, simplifyVector = FALSE)
           if (typeof(instance) != "integer") {
             stop(sprintf("Data type doesn't match. Expected: %s. Actual: %s.", "integer", typeof(instance)))
@@ -76,11 +76,11 @@ AnyOfPrimitiveTypeTest <- R6::R6Class(
         error = function(err) err
       )
 
-      if (!is.null(integer_result["error"])) {
-        error_messages <- append(error_messages, integer_result["message"])
+      if (!is.null(`integer_result`["error"])) {
+        error_messages <- append(error_messages, `integer_result`["message"])
       }
 
-      character_result <- tryCatch({
+      `character_result` <- tryCatch({
           instance <- jsonlite::fromJSON(input, simplifyVector = FALSE)
           if (typeof(instance) != "character") {
             stop(sprintf("Data type doesn't match. Expected: %s. Actual: %s.", "character", typeof(instance)))
@@ -92,8 +92,8 @@ AnyOfPrimitiveTypeTest <- R6::R6Class(
         error = function(err) err
       )
 
-      if (!is.null(character_result["error"])) {
-        error_messages <- append(error_messages, character_result["message"])
+      if (!is.null(`character_result`["error"])) {
+        error_messages <- append(error_messages, `character_result`["message"])
       }
 
       if (matched == 1) {
diff --git a/samples/client/petstore/R/R/mammal.R b/samples/client/petstore/R/R/mammal.R
index a5af6d76d644e8aec51f4b08217cf912958ebd2e..13bb0da875e208e85b3ee6101b9ee0b54c639950 100644
--- a/samples/client/petstore/R/R/mammal.R
+++ b/samples/client/petstore/R/R/mammal.R
@@ -64,10 +64,10 @@ Mammal <- R6::R6Class(
       error_messages <- list()
       instance <- NULL
 
-      Whale_result <- tryCatch({
-          Whale$public_methods$validateJSON(input)
-          Whale_instance <- Whale$new()
-          instance <- Whale_instance$fromJSON(input)
+      `Whale_result` <- tryCatch({
+          `Whale`$public_methods$validateJSON(input)
+          `Whale_instance` <- `Whale`$new()
+          instance <- `Whale_instance`$fromJSON(input)
           instance_type <- "Whale"
           matched_schemas <- append(matched_schemas, "Whale")
           matched <- matched + 1
@@ -75,14 +75,14 @@ Mammal <- R6::R6Class(
         error = function(err) err
       )
 
-      if (!is.null(Whale_result["error"])) {
-        error_messages <- append(error_messages, Whale_result["message"])
+      if (!is.null(`Whale_result`["error"])) {
+        error_messages <- append(error_messages, `Whale_result`["message"])
       }
 
-      Zebra_result <- tryCatch({
-          Zebra$public_methods$validateJSON(input)
-          Zebra_instance <- Zebra$new()
-          instance <- Zebra_instance$fromJSON(input)
+      `Zebra_result` <- tryCatch({
+          `Zebra`$public_methods$validateJSON(input)
+          `Zebra_instance` <- `Zebra`$new()
+          instance <- `Zebra_instance`$fromJSON(input)
           instance_type <- "Zebra"
           matched_schemas <- append(matched_schemas, "Zebra")
           matched <- matched + 1
@@ -90,8 +90,8 @@ Mammal <- R6::R6Class(
         error = function(err) err
       )
 
-      if (!is.null(Zebra_result["error"])) {
-        error_messages <- append(error_messages, Zebra_result["message"])
+      if (!is.null(`Zebra_result`["error"])) {
+        error_messages <- append(error_messages, `Zebra_result`["message"])
       }
 
       if (matched == 1) {
diff --git a/samples/client/petstore/R/R/nested_one_of.R b/samples/client/petstore/R/R/nested_one_of.R
index d2a670b4eddb809bcf7bd0313a551779a1f48417..8fbdf43b466eac44bedb712c7e9fa83f07bd38f5 100644
--- a/samples/client/petstore/R/R/nested_one_of.R
+++ b/samples/client/petstore/R/R/nested_one_of.R
@@ -85,9 +85,9 @@ NestedOneOf <- R6::R6Class(
         self$`size` <- this_object$`size`
       }
       if (!is.null(this_object$`nested_pig`)) {
-        nested_pig_object <- Pig$new()
-        nested_pig_object$fromJSON(jsonlite::toJSON(this_object$nested_pig, auto_unbox = TRUE, digits = NA))
-        self$`nested_pig` <- nested_pig_object
+        `nested_pig_object` <- Pig$new()
+        `nested_pig_object`$fromJSON(jsonlite::toJSON(this_object$`nested_pig`, auto_unbox = TRUE, digits = NA))
+        self$`nested_pig` <- `nested_pig_object`
       }
       # process additional properties/fields in the payload
       for (key in names(this_object)) {
@@ -143,7 +143,7 @@ NestedOneOf <- R6::R6Class(
     fromJSONString = function(input_json) {
       this_object <- jsonlite::fromJSON(input_json)
       self$`size` <- this_object$`size`
-      self$`nested_pig` <- Pig$new()$fromJSON(jsonlite::toJSON(this_object$nested_pig, auto_unbox = TRUE, digits = NA))
+      self$`nested_pig` <- Pig$new()$fromJSON(jsonlite::toJSON(this_object$`nested_pig`, auto_unbox = TRUE, digits = NA))
       # process additional properties/fields in the payload
       for (key in names(this_object)) {
         if (!(key %in% self$`_field_list`)) { # json key not in list of fields
diff --git a/samples/client/petstore/R/R/one_of_primitive_type_test.R b/samples/client/petstore/R/R/one_of_primitive_type_test.R
index faf3f7850ab8162af0490434ba905c1538ea3fd9..da4d226dd3bb50bd1a08b1bf93ff96ffe3761f37 100644
--- a/samples/client/petstore/R/R/one_of_primitive_type_test.R
+++ b/samples/client/petstore/R/R/one_of_primitive_type_test.R
@@ -64,7 +64,7 @@ OneOfPrimitiveTypeTest <- R6::R6Class(
       error_messages <- list()
       instance <- NULL
 
-      integer_result <- tryCatch({
+      `integer_result` <- tryCatch({
           instance <- jsonlite::fromJSON(input, simplifyVector = FALSE)
           if (typeof(instance) != "integer") {
             stop(sprintf("Data type doesn't match. Expected: %s. Actual: %s.", "integer", typeof(instance)))
@@ -76,11 +76,11 @@ OneOfPrimitiveTypeTest <- R6::R6Class(
         error = function(err) err
       )
 
-      if (!is.null(integer_result["error"])) {
-        error_messages <- append(error_messages, integer_result["message"])
+      if (!is.null(`integer_result`["error"])) {
+        error_messages <- append(error_messages, `integer_result`["message"])
       }
 
-      character_result <- tryCatch({
+      `character_result` <- tryCatch({
           instance <- jsonlite::fromJSON(input, simplifyVector = FALSE)
           if (typeof(instance) != "character") {
             stop(sprintf("Data type doesn't match. Expected: %s. Actual: %s.", "character", typeof(instance)))
@@ -92,8 +92,8 @@ OneOfPrimitiveTypeTest <- R6::R6Class(
         error = function(err) err
       )
 
-      if (!is.null(character_result["error"])) {
-        error_messages <- append(error_messages, character_result["message"])
+      if (!is.null(`character_result`["error"])) {
+        error_messages <- append(error_messages, `character_result`["message"])
       }
 
       if (matched == 1) {
diff --git a/samples/client/petstore/R/R/pet.R b/samples/client/petstore/R/R/pet.R
index 42db1ecb88550c1e236bedbc5b5cee3a895e58ee..ea3b23ce96809fe0a3c914dddfc51897cc66d015 100644
--- a/samples/client/petstore/R/R/pet.R
+++ b/samples/client/petstore/R/R/pet.R
@@ -138,9 +138,9 @@ Pet <- R6::R6Class(
         self$`id` <- this_object$`id`
       }
       if (!is.null(this_object$`category`)) {
-        category_object <- Category$new()
-        category_object$fromJSON(jsonlite::toJSON(this_object$category, auto_unbox = TRUE, digits = NA))
-        self$`category` <- category_object
+        `category_object` <- Category$new()
+        `category_object`$fromJSON(jsonlite::toJSON(this_object$`category`, auto_unbox = TRUE, digits = NA))
+        self$`category` <- `category_object`
       }
       if (!is.null(this_object$`name`)) {
         self$`name` <- this_object$`name`
@@ -243,7 +243,7 @@ Pet <- R6::R6Class(
     fromJSONString = function(input_json) {
       this_object <- jsonlite::fromJSON(input_json)
       self$`id` <- this_object$`id`
-      self$`category` <- Category$new()$fromJSON(jsonlite::toJSON(this_object$category, auto_unbox = TRUE, digits = NA))
+      self$`category` <- Category$new()$fromJSON(jsonlite::toJSON(this_object$`category`, auto_unbox = TRUE, digits = NA))
       self$`name` <- this_object$`name`
       self$`photoUrls` <- ApiClient$new()$deserializeObj(this_object$`photoUrls`, "array[character]", loadNamespace("petstore"))
       self$`tags` <- ApiClient$new()$deserializeObj(this_object$`tags`, "array[Tag]", loadNamespace("petstore"))
diff --git a/samples/client/petstore/R/R/pig.R b/samples/client/petstore/R/R/pig.R
index d497bc2803907d61e0f8c8f6d3311f092f35ec25..05bfeebe4ced1687912f98c3a459cbec76ef2e0f 100644
--- a/samples/client/petstore/R/R/pig.R
+++ b/samples/client/petstore/R/R/pig.R
@@ -64,10 +64,10 @@ Pig <- R6::R6Class(
       error_messages <- list()
       instance <- NULL
 
-      BasquePig_result <- tryCatch({
-          BasquePig$public_methods$validateJSON(input)
-          BasquePig_instance <- BasquePig$new()
-          instance <- BasquePig_instance$fromJSON(input)
+      `BasquePig_result` <- tryCatch({
+          `BasquePig`$public_methods$validateJSON(input)
+          `BasquePig_instance` <- `BasquePig`$new()
+          instance <- `BasquePig_instance`$fromJSON(input)
           instance_type <- "BasquePig"
           matched_schemas <- append(matched_schemas, "BasquePig")
           matched <- matched + 1
@@ -75,14 +75,14 @@ Pig <- R6::R6Class(
         error = function(err) err
       )
 
-      if (!is.null(BasquePig_result["error"])) {
-        error_messages <- append(error_messages, BasquePig_result["message"])
+      if (!is.null(`BasquePig_result`["error"])) {
+        error_messages <- append(error_messages, `BasquePig_result`["message"])
       }
 
-      DanishPig_result <- tryCatch({
-          DanishPig$public_methods$validateJSON(input)
-          DanishPig_instance <- DanishPig$new()
-          instance <- DanishPig_instance$fromJSON(input)
+      `DanishPig_result` <- tryCatch({
+          `DanishPig`$public_methods$validateJSON(input)
+          `DanishPig_instance` <- `DanishPig`$new()
+          instance <- `DanishPig_instance`$fromJSON(input)
           instance_type <- "DanishPig"
           matched_schemas <- append(matched_schemas, "DanishPig")
           matched <- matched + 1
@@ -90,8 +90,8 @@ Pig <- R6::R6Class(
         error = function(err) err
       )
 
-      if (!is.null(DanishPig_result["error"])) {
-        error_messages <- append(error_messages, DanishPig_result["message"])
+      if (!is.null(`DanishPig_result`["error"])) {
+        error_messages <- append(error_messages, `DanishPig_result`["message"])
       }
 
       if (matched == 1) {
diff --git a/samples/client/petstore/R/R/update_pet_request.R b/samples/client/petstore/R/R/update_pet_request.R
index 2fc96ab4fffa4fded2a7a9bf0b5c2ced9ae6f8c2..c29abc945abc2adc2ab3ee7701bec44fa63bae6d 100644
--- a/samples/client/petstore/R/R/update_pet_request.R
+++ b/samples/client/petstore/R/R/update_pet_request.R
@@ -79,9 +79,9 @@ UpdatePetRequest <- R6::R6Class(
     fromJSON = function(input_json) {
       this_object <- jsonlite::fromJSON(input_json)
       if (!is.null(this_object$`jsonData`)) {
-        jsondata_object <- Pet$new()
-        jsondata_object$fromJSON(jsonlite::toJSON(this_object$jsonData, auto_unbox = TRUE, digits = NA))
-        self$`jsonData` <- jsondata_object
+        `jsondata_object` <- Pet$new()
+        `jsondata_object`$fromJSON(jsonlite::toJSON(this_object$`jsonData`, auto_unbox = TRUE, digits = NA))
+        self$`jsonData` <- `jsondata_object`
       }
       if (!is.null(this_object$`binaryDataN2Information`)) {
         self$`binaryDataN2Information` <- this_object$`binaryDataN2Information`
@@ -139,7 +139,7 @@ UpdatePetRequest <- R6::R6Class(
     #' @export
     fromJSONString = function(input_json) {
       this_object <- jsonlite::fromJSON(input_json)
-      self$`jsonData` <- Pet$new()$fromJSON(jsonlite::toJSON(this_object$jsonData, auto_unbox = TRUE, digits = NA))
+      self$`jsonData` <- Pet$new()$fromJSON(jsonlite::toJSON(this_object$`jsonData`, auto_unbox = TRUE, digits = NA))
       self$`binaryDataN2Information` <- this_object$`binaryDataN2Information`
       # process additional properties/fields in the payload
       for (key in names(this_object)) {