forked from loafle/openapi-generator-original
R echo client tests (#17629)
* add r echo api client sample * add r workflow * fix * add env * set r version * install curl * install dep * fix * comment out installation
This commit is contained in:
50
samples/client/echo_api/r/R/api_response.R
Normal file
50
samples/client/echo_api/r/R/api_response.R
Normal file
@@ -0,0 +1,50 @@
|
||||
#' Echo Server API
|
||||
#'
|
||||
#' Echo Server API
|
||||
#'
|
||||
#' The version of the OpenAPI document: 0.1.0
|
||||
#' Contact: team@openapitools.org
|
||||
#' Generated by: https://openapi-generator.tech
|
||||
#'
|
||||
#' @docType class
|
||||
#' @title ApiResponse
|
||||
#' @description ApiResponse Class
|
||||
#' @format An \code{R6Class} generator object
|
||||
#' @field content The deserialized response body.
|
||||
#' @field response The raw response from the endpoint.
|
||||
#' @field status_code The HTTP response status code.
|
||||
#' @field status_code_desc The brief description of the HTTP response status code.
|
||||
#' @field headers The HTTP response headers.
|
||||
#' @export
|
||||
ApiResponse <- R6::R6Class(
|
||||
"ApiResponse",
|
||||
public = list(
|
||||
content = NULL,
|
||||
response = NULL,
|
||||
status_code = NULL,
|
||||
status_code_desc = NULL,
|
||||
headers = NULL,
|
||||
#' Initialize a new ApiResponse class.
|
||||
#'
|
||||
#' @description
|
||||
#' Initialize a new ApiResponse class.
|
||||
#'
|
||||
#' @param content The deserialized response body.
|
||||
#' @param response The raw response from the endpoint.
|
||||
#' @param status_code The HTTP response status code.
|
||||
#' @param status_code_desc The brief description of the HTTP response status code.
|
||||
#' @param headers The HTTP response headers.
|
||||
#' @export
|
||||
initialize = function(content = NULL,
|
||||
response = NULL,
|
||||
status_code = NULL,
|
||||
status_code_desc = NULL,
|
||||
headers = NULL) {
|
||||
self$content <- content
|
||||
self$response <- response
|
||||
self$status_code <- status_code
|
||||
self$status_code_desc <- status_code_desc
|
||||
self$headers <- headers
|
||||
}
|
||||
)
|
||||
)
|
||||
Reference in New Issue
Block a user