Skip to content
GitLab
    • Explore Projects Groups Snippets
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • O openapi-generator
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,476
    • Issues 3,476
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 402
    • Merge requests 402
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • OpenAPI Tools
  • openapi-generator
  • Merge requests
  • !12706
An error occurred while fetching the assigned milestone of the selected merge_request.

[R] Add toString method in models

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged William Cheng requested to merge r-tostring into master 3 years ago
  • Overview 0
  • Commits 1
  • Pipelines 0
  • Changes 18
  • added toString method to easily print out the object

PR checklist

  • Read the contribution guidelines.
  • Pull Request title clearly describes the work in the pull request and Pull Request description provides details about how to validate the work. Missing information here may result in delayed response from the community.
  • Run the following to build the project and update samples:
    ./mvnw clean package 
    ./bin/generate-samples.sh
    ./bin/utils/export_docs_generators.sh
    Commit all changed files. This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master. These must match the expectations made by your contribution. You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example ./bin/generate-samples.sh bin/configs/java*. For Windows users, please run the script in Git BASH.
  • File the PR against the correct branch: master (6.0.1) (patch release), 6.1.x (breaking changes with fallbacks), 7.0.x (breaking changes without fallbacks)
  • If your PR is targeting a particular programming language, @mention the technical committee members, so they are more likely to review the pull request.

cc @Ramanth (2019/07) @saigiridhar21 (2019/07)

Compare
  • master (base)

and
  • latest version
    d0c46b2b
    1 commit, 2 years ago

18 files
+ 172
- 18

    Preferences

    File browser
    Compare changes
modules/openapi-‎generator/…/…/…/r‎
modelGener‎ic.mustache‎ +10 -1
samples/clie‎nt/petstore/R‎
‎R‎
allof_tag_ap‎i_response.R‎ +10 -1
anim‎al.R‎ +10 -1
basque‎_pig.R‎ +10 -1
ca‎t.R‎ +10 -1
cat_al‎l_of.R‎ +10 -1
categ‎ory.R‎ +10 -1
danish‎_pig.R‎ +10 -1
do‎g.R‎ +10 -1
dog_al‎l_of.R‎ +10 -1
model_api_‎response.R‎ +10 -1
ord‎er.R‎ +10 -1
pe‎t.R‎ +10 -1
spec‎ial.R‎ +10 -1
ta‎g.R‎ +10 -1
update_pet‎_request.R‎ +10 -1
use‎r.R‎ +10 -1
test_pe‎tstore.R‎ +2 -1
modules/openapi-generator/src/main/resources/r/modelGeneric.mustache
+ 10
- 1
  • View file @ d0c46b2b

  • Edit in single-file editor

  • Open in Web IDE


@@ -349,8 +349,17 @@
stop(paste("The JSON input `", input, "` is invalid for {{classname}}: the required field `{{name}}` is missing."))
}
{{/requiredVars}}
},
#' To string (JSON format)
#'
#' @description
#' To string (JSON format)
#'
#' @return String representation of {{{classname}}}
#' @export
toString = function() {
self$toJSONString()
}
)
)
{{/isEnum}}
samples/client/petstore/R/R/allof_tag_api_response.R
+ 10
- 1
  • View file @ d0c46b2b

  • Edit in single-file editor

  • Open in Web IDE


@@ -195,8 +195,17 @@ AllofTagApiResponse <- R6::R6Class(
#' @export
validateJSON = function(input) {
input_json <- jsonlite::fromJSON(input)
},
#' To string (JSON format)
#'
#' @description
#' To string (JSON format)
#'
#' @return String representation of AllofTagApiResponse
#' @export
toString = function() {
self$toJSONString()
}
)
)
samples/client/petstore/R/R/animal.R
+ 10
- 1
  • View file @ d0c46b2b

  • Edit in single-file editor

  • Open in Web IDE


@@ -135,8 +135,17 @@ Animal <- R6::R6Class(
} else {
stop(paste("The JSON input `", input, "` is invalid for Animal: the required field `className` is missing."))
}
},
#' To string (JSON format)
#'
#' @description
#' To string (JSON format)
#'
#' @return String representation of Animal
#' @export
toString = function() {
self$toJSONString()
}
)
)
samples/client/petstore/R/R/basque_pig.R
+ 10
- 1
  • View file @ d0c46b2b

  • Edit in single-file editor

  • Open in Web IDE


@@ -141,8 +141,17 @@ BasquePig <- R6::R6Class(
} else {
stop(paste("The JSON input `", input, "` is invalid for BasquePig: the required field `color` is missing."))
}
},
#' To string (JSON format)
#'
#' @description
#' To string (JSON format)
#'
#' @return String representation of BasquePig
#' @export
toString = function() {
self$toJSONString()
}
)
)
samples/client/petstore/R/R/cat.R
+ 10
- 1
  • View file @ d0c46b2b

  • Edit in single-file editor

  • Open in Web IDE


@@ -158,8 +158,17 @@ Cat <- R6::R6Class(
} else {
stop(paste("The JSON input `", input, "` is invalid for Cat: the required field `className` is missing."))
}
},
#' To string (JSON format)
#'
#' @description
#' To string (JSON format)
#'
#' @return String representation of Cat
#' @export
toString = function() {
self$toJSONString()
}
)
)
0 Assignees
None
Assign to
0 Reviewers
None
Request review from
Labels
0
None
0
None
    Assign labels
  • Manage project labels

Milestone
No milestone
None
None
Time tracking
No estimate or time spent
Lock merge request
Unlocked
0
0 participants
Reference:
Source branch: r-tostring

Menu

Explore Projects Groups Snippets