fix query param, fix spec (#13065)

This commit is contained in:
William Cheng 2022-08-03 11:49:34 +08:00 committed by GitHub
parent 1cf9d178d6
commit d8771de9c1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
16 changed files with 119 additions and 97 deletions

View File

@ -233,7 +233,7 @@
#' @export #' @export
{{{operationId}}}{{WithHttpInfo}} = function({{#requiredParams}}{{paramName}}, {{/requiredParams}}{{#optionalParams}}{{paramName}} = {{^defaultValue}}NULL{{/defaultValue}}{{{defaultValue}}}, {{/optionalParams}}{{#vendorExtensions.x-streaming}}stream_callback = NULL, {{/vendorExtensions.x-streaming}}{{#returnType}}data_file = NULL, {{/returnType}}...) { {{{operationId}}}{{WithHttpInfo}} = function({{#requiredParams}}{{paramName}}, {{/requiredParams}}{{#optionalParams}}{{paramName}} = {{^defaultValue}}NULL{{/defaultValue}}{{{defaultValue}}}, {{/optionalParams}}{{#vendorExtensions.x-streaming}}stream_callback = NULL, {{/vendorExtensions.x-streaming}}{{#returnType}}data_file = NULL, {{/returnType}}...) {
args <- list(...) args <- list(...)
query_params <- c() query_params <- list()
header_params <- c() header_params <- c()
{{#requiredParams}} {{#requiredParams}}

View File

@ -133,6 +133,8 @@ ApiClient <- R6::R6Class(
#' @param method HTTP method. #' @param method HTTP method.
#' @param query_params The query parameters. #' @param query_params The query parameters.
#' @param header_params The header parameters. #' @param header_params The header parameters.
#' @param form_params The form parameters.
#' @param file_params The form parameters for uploading files.
#' @param accepts The list of Accept headers. #' @param accepts The list of Accept headers.
#' @param content_types The list of Content-Type headers. #' @param content_types The list of Content-Type headers.
#' @param body The HTTP request body. #' @param body The HTTP request body.
@ -140,10 +142,13 @@ ApiClient <- R6::R6Class(
#' @param ... Other optional arguments. #' @param ... Other optional arguments.
#' @return HTTP response #' @return HTTP response
#' @export #' @export
CallApi = function(url, method, query_params, header_params, accepts, content_types, CallApi = function(url, method, query_params, header_params, form_params,
file_params, accepts, content_types,
body, stream_callback = NULL, ...) { body, stream_callback = NULL, ...) {
resp <- self$Execute(url, method, query_params, header_params, accepts, content_types, resp <- self$Execute(url, method, query_params, header_params,
form_params, file_params,
accepts, content_types,
body, stream_callback = stream_callback, ...) body, stream_callback = stream_callback, ...)
if (is.null(self$max_retry_attempts)) { if (is.null(self$max_retry_attempts)) {
@ -155,7 +160,9 @@ ApiClient <- R6::R6Class(
for (i in 1 : self$max_retry_attempts) { for (i in 1 : self$max_retry_attempts) {
if (resp$status_code %in% self$retry_status_codes) { if (resp$status_code %in% self$retry_status_codes) {
Sys.sleep((2 ^ i) + stats::runif(n = 1, min = 0, max = 1)) Sys.sleep((2 ^ i) + stats::runif(n = 1, min = 0, max = 1))
resp <- self$Execute(url, method, query_params, header_params, body, stream_callback = stream_callback, ...) resp <- self$Execute(url, method, query_params, header_params,
form_params, file_params, body,
stream_callback = stream_callback, ...)
} else { } else {
break break
} }
@ -173,6 +180,8 @@ ApiClient <- R6::R6Class(
#' @param method HTTP method. #' @param method HTTP method.
#' @param query_params The query parameters. #' @param query_params The query parameters.
#' @param header_params The header parameters. #' @param header_params The header parameters.
#' @param form_params The form parameters.
#' @param file_params The form parameters for uploading files.
#' @param accepts The list of Accept headers #' @param accepts The list of Accept headers
#' @param content_types The list of Content-Type headers #' @param content_types The list of Content-Type headers
#' @param body The HTTP request body. #' @param body The HTTP request body.
@ -180,7 +189,9 @@ ApiClient <- R6::R6Class(
#' @param ... Other optional arguments. #' @param ... Other optional arguments.
#' @return HTTP response #' @return HTTP response
#' @export #' @export
Execute = function(url, method, query_params, header_params, accepts, content_types, Execute = function(url, method, query_params, header_params,
form_params, file_params,
accepts, content_types,
body, stream_callback = NULL, ...) { body, stream_callback = NULL, ...) {
headers <- httr::add_headers(c(header_params, self$default_headers)) headers <- httr::add_headers(c(header_params, self$default_headers))

View File

@ -183,38 +183,6 @@ paths:
description: Pet not found description: Pet not found
security: security:
- BearerToken: [] - BearerToken: []
'/pet/{petId}?streaming':
get:
tags:
- pet
summary: Find pet by ID (streaming)
description: Returns a single pet
operationId: getPetByIdStreaming
x-streaming: true
parameters:
- name: petId
in: path
description: ID of pet to return
required: true
schema:
type: integer
format: int64
responses:
'200':
description: successful operation
content:
application/xml:
schema:
$ref: '#/components/schemas/Pet'
application/json:
schema:
$ref: '#/components/schemas/Pet'
'400':
description: Invalid ID supplied
'404':
description: Pet not found
security:
- api_key: []
post: post:
tags: tags:
- pet - pet
@ -274,6 +242,38 @@ paths:
- petstore_auth: - petstore_auth:
- 'write:pets' - 'write:pets'
- 'read:pets' - 'read:pets'
'/pet/{petId}?streaming':
get:
tags:
- pet
summary: Find pet by ID (streaming)
description: Returns a single pet
operationId: getPetByIdStreaming
x-streaming: true
parameters:
- name: petId
in: path
description: ID of pet to return
required: true
schema:
type: integer
format: int64
responses:
'200':
description: successful operation
content:
application/xml:
schema:
$ref: '#/components/schemas/Pet'
application/json:
schema:
$ref: '#/components/schemas/Pet'
'400':
description: Invalid ID supplied
'404':
description: Pet not found
security:
- api_key: []
'/pet/{petId}/uploadImage': '/pet/{petId}/uploadImage':
post: post:
tags: tags:

View File

@ -123,7 +123,7 @@ FakeApi <- R6::R6Class(
#' @export #' @export
fake_data_file_with_http_info = function(dummy, var_data_file = NULL, data_file = NULL, ...) { fake_data_file_with_http_info = function(dummy, var_data_file = NULL, data_file = NULL, ...) {
args <- list(...) args <- list(...)
query_params <- c() query_params <- list()
header_params <- c() header_params <- c()
if (missing(`dummy`)) { if (missing(`dummy`)) {

View File

@ -567,7 +567,7 @@ PetApi <- R6::R6Class(
#' @export #' @export
add_pet_with_http_info = function(pet, data_file = NULL, ...) { add_pet_with_http_info = function(pet, data_file = NULL, ...) {
args <- list(...) args <- list(...)
query_params <- c() query_params <- list()
header_params <- c() header_params <- c()
if (missing(`pet`)) { if (missing(`pet`)) {
@ -684,7 +684,7 @@ PetApi <- R6::R6Class(
#' @export #' @export
delete_pet_with_http_info = function(pet_id, api_key = NULL, ...) { delete_pet_with_http_info = function(pet_id, api_key = NULL, ...) {
args <- list(...) args <- list(...)
query_params <- c() query_params <- list()
header_params <- c() header_params <- c()
if (missing(`pet_id`)) { if (missing(`pet_id`)) {
@ -697,7 +697,7 @@ PetApi <- R6::R6Class(
header_params["api_key"] <- `api_key` header_params["api_key"] <- `api_key`
local_var_body <- NULL local_var_body <- NULL
local_var_url_path <- "/pet/{petId}?streaming" local_var_url_path <- "/pet/{petId}"
if (!missing(`pet_id`)) { if (!missing(`pet_id`)) {
local_var_url_path <- gsub(paste0("\\{", "petId", "\\}"), URLencode(as.character(`pet_id`), reserved = TRUE), local_var_url_path) local_var_url_path <- gsub(paste0("\\{", "petId", "\\}"), URLencode(as.character(`pet_id`), reserved = TRUE), local_var_url_path)
} }
@ -783,7 +783,7 @@ PetApi <- R6::R6Class(
#' @export #' @export
find_pets_by_status_with_http_info = function(status, data_file = NULL, ...) { find_pets_by_status_with_http_info = function(status, data_file = NULL, ...) {
args <- list(...) args <- list(...)
query_params <- c() query_params <- list()
header_params <- c() header_params <- c()
if (missing(`status`)) { if (missing(`status`)) {
@ -891,7 +891,7 @@ PetApi <- R6::R6Class(
#' @export #' @export
find_pets_by_tags_with_http_info = function(tags, data_file = NULL, ...) { find_pets_by_tags_with_http_info = function(tags, data_file = NULL, ...) {
args <- list(...) args <- list(...)
query_params <- c() query_params <- list()
header_params <- c() header_params <- c()
if (missing(`tags`)) { if (missing(`tags`)) {
@ -999,7 +999,7 @@ PetApi <- R6::R6Class(
#' @export #' @export
get_pet_by_id_with_http_info = function(pet_id, data_file = NULL, ...) { get_pet_by_id_with_http_info = function(pet_id, data_file = NULL, ...) {
args <- list(...) args <- list(...)
query_params <- c() query_params <- list()
header_params <- c() header_params <- c()
if (missing(`pet_id`)) { if (missing(`pet_id`)) {
@ -1114,7 +1114,7 @@ PetApi <- R6::R6Class(
#' @export #' @export
get_pet_by_id_streaming_with_http_info = function(pet_id, stream_callback = NULL, data_file = NULL, ...) { get_pet_by_id_streaming_with_http_info = function(pet_id, stream_callback = NULL, data_file = NULL, ...) {
args <- list(...) args <- list(...)
query_params <- c() query_params <- list()
header_params <- c() header_params <- c()
if (missing(`pet_id`)) { if (missing(`pet_id`)) {
@ -1231,7 +1231,7 @@ PetApi <- R6::R6Class(
#' @export #' @export
update_pet_with_http_info = function(pet, data_file = NULL, ...) { update_pet_with_http_info = function(pet, data_file = NULL, ...) {
args <- list(...) args <- list(...)
query_params <- c() query_params <- list()
header_params <- c() header_params <- c()
if (missing(`pet`)) { if (missing(`pet`)) {
@ -1344,7 +1344,7 @@ PetApi <- R6::R6Class(
#' @export #' @export
update_pet_with_form_with_http_info = function(pet_id, name = NULL, status = NULL, ...) { update_pet_with_form_with_http_info = function(pet_id, name = NULL, status = NULL, ...) {
args <- list(...) args <- list(...)
query_params <- c() query_params <- list()
header_params <- c() header_params <- c()
if (missing(`pet_id`)) { if (missing(`pet_id`)) {
@ -1359,7 +1359,7 @@ PetApi <- R6::R6Class(
"status" = status "status" = status
) )
local_var_url_path <- "/pet/{petId}?streaming" local_var_url_path <- "/pet/{petId}"
if (!missing(`pet_id`)) { if (!missing(`pet_id`)) {
local_var_url_path <- gsub(paste0("\\{", "petId", "\\}"), URLencode(as.character(`pet_id`), reserved = TRUE), local_var_url_path) local_var_url_path <- gsub(paste0("\\{", "petId", "\\}"), URLencode(as.character(`pet_id`), reserved = TRUE), local_var_url_path)
} }
@ -1449,7 +1449,7 @@ PetApi <- R6::R6Class(
#' @export #' @export
upload_file_with_http_info = function(pet_id, additional_metadata = NULL, file = NULL, data_file = NULL, ...) { upload_file_with_http_info = function(pet_id, additional_metadata = NULL, file = NULL, data_file = NULL, ...) {
args <- list(...) args <- list(...)
query_params <- c() query_params <- list()
header_params <- c() header_params <- c()
if (missing(`pet_id`)) { if (missing(`pet_id`)) {

View File

@ -271,7 +271,7 @@ StoreApi <- R6::R6Class(
#' @export #' @export
delete_order_with_http_info = function(order_id, ...) { delete_order_with_http_info = function(order_id, ...) {
args <- list(...) args <- list(...)
query_params <- c() query_params <- list()
header_params <- c() header_params <- c()
if (missing(`order_id`)) { if (missing(`order_id`)) {
@ -364,7 +364,7 @@ StoreApi <- R6::R6Class(
#' @export #' @export
get_inventory_with_http_info = function(data_file = NULL, ...) { get_inventory_with_http_info = function(data_file = NULL, ...) {
args <- list(...) args <- list(...)
query_params <- c() query_params <- list()
header_params <- c() header_params <- c()
local_var_body <- NULL local_var_body <- NULL
@ -465,7 +465,7 @@ StoreApi <- R6::R6Class(
#' @export #' @export
get_order_by_id_with_http_info = function(order_id, data_file = NULL, ...) { get_order_by_id_with_http_info = function(order_id, data_file = NULL, ...) {
args <- list(...) args <- list(...)
query_params <- c() query_params <- list()
header_params <- c() header_params <- c()
if (missing(`order_id`)) { if (missing(`order_id`)) {
@ -573,7 +573,7 @@ StoreApi <- R6::R6Class(
#' @export #' @export
place_order_with_http_info = function(order, data_file = NULL, ...) { place_order_with_http_info = function(order, data_file = NULL, ...) {
args <- list(...) args <- list(...)
query_params <- c() query_params <- list()
header_params <- c() header_params <- c()
if (missing(`order`)) { if (missing(`order`)) {

View File

@ -457,7 +457,7 @@ UserApi <- R6::R6Class(
#' @export #' @export
create_user_with_http_info = function(user, ...) { create_user_with_http_info = function(user, ...) {
args <- list(...) args <- list(...)
query_params <- c() query_params <- list()
header_params <- c() header_params <- c()
if (missing(`user`)) { if (missing(`user`)) {
@ -555,7 +555,7 @@ UserApi <- R6::R6Class(
#' @export #' @export
create_users_with_array_input_with_http_info = function(user, ...) { create_users_with_array_input_with_http_info = function(user, ...) {
args <- list(...) args <- list(...)
query_params <- c() query_params <- list()
header_params <- c() header_params <- c()
if (missing(`user`)) { if (missing(`user`)) {
@ -656,7 +656,7 @@ UserApi <- R6::R6Class(
#' @export #' @export
create_users_with_list_input_with_http_info = function(user, ...) { create_users_with_list_input_with_http_info = function(user, ...) {
args <- list(...) args <- list(...)
query_params <- c() query_params <- list()
header_params <- c() header_params <- c()
if (missing(`user`)) { if (missing(`user`)) {
@ -757,7 +757,7 @@ UserApi <- R6::R6Class(
#' @export #' @export
delete_user_with_http_info = function(username, ...) { delete_user_with_http_info = function(username, ...) {
args <- list(...) args <- list(...)
query_params <- c() query_params <- list()
header_params <- c() header_params <- c()
if (missing(`username`)) { if (missing(`username`)) {
@ -856,7 +856,7 @@ UserApi <- R6::R6Class(
#' @export #' @export
get_user_by_name_with_http_info = function(username, data_file = NULL, ...) { get_user_by_name_with_http_info = function(username, data_file = NULL, ...) {
args <- list(...) args <- list(...)
query_params <- c() query_params <- list()
header_params <- c() header_params <- c()
if (missing(`username`)) { if (missing(`username`)) {
@ -966,7 +966,7 @@ UserApi <- R6::R6Class(
#' @export #' @export
login_user_with_http_info = function(username, password, data_file = NULL, ...) { login_user_with_http_info = function(username, password, data_file = NULL, ...) {
args <- list(...) args <- list(...)
query_params <- c() query_params <- list()
header_params <- c() header_params <- c()
if (missing(`username`)) { if (missing(`username`)) {
@ -1077,7 +1077,7 @@ UserApi <- R6::R6Class(
#' @export #' @export
logout_user_with_http_info = function(...) { logout_user_with_http_info = function(...) {
args <- list(...) args <- list(...)
query_params <- c() query_params <- list()
header_params <- c() header_params <- c()
local_var_body <- NULL local_var_body <- NULL
@ -1165,7 +1165,7 @@ UserApi <- R6::R6Class(
#' @export #' @export
update_user_with_http_info = function(username, user, ...) { update_user_with_http_info = function(username, user, ...) {
args <- list(...) args <- list(...)
query_params <- c() query_params <- list()
header_params <- c() header_params <- c()
if (missing(`username`)) { if (missing(`username`)) {

View File

@ -63,13 +63,13 @@ Class | Method | HTTP request | Description
------------ | ------------- | ------------- | ------------- ------------ | ------------- | ------------- | -------------
*FakeApi* | [**fake_data_file**](docs/FakeApi.md#fake_data_file) | **GET** /fake/data_file | test data_file to ensure it's escaped correctly *FakeApi* | [**fake_data_file**](docs/FakeApi.md#fake_data_file) | **GET** /fake/data_file | test data_file to ensure it's escaped correctly
*PetApi* | [**add_pet**](docs/PetApi.md#add_pet) | **POST** /pet | Add a new pet to the store *PetApi* | [**add_pet**](docs/PetApi.md#add_pet) | **POST** /pet | Add a new pet to the store
*PetApi* | [**delete_pet**](docs/PetApi.md#delete_pet) | **DELETE** /pet/{petId}?streaming | Deletes a pet *PetApi* | [**delete_pet**](docs/PetApi.md#delete_pet) | **DELETE** /pet/{petId} | Deletes a pet
*PetApi* | [**find_pets_by_status**](docs/PetApi.md#find_pets_by_status) | **GET** /pet/findByStatus | Finds Pets by status *PetApi* | [**find_pets_by_status**](docs/PetApi.md#find_pets_by_status) | **GET** /pet/findByStatus | Finds Pets by status
*PetApi* | [**find_pets_by_tags**](docs/PetApi.md#find_pets_by_tags) | **GET** /pet/findByTags | Finds Pets by tags *PetApi* | [**find_pets_by_tags**](docs/PetApi.md#find_pets_by_tags) | **GET** /pet/findByTags | Finds Pets by tags
*PetApi* | [**get_pet_by_id**](docs/PetApi.md#get_pet_by_id) | **GET** /pet/{petId} | Find pet by ID *PetApi* | [**get_pet_by_id**](docs/PetApi.md#get_pet_by_id) | **GET** /pet/{petId} | Find pet by ID
*PetApi* | [**get_pet_by_id_streaming**](docs/PetApi.md#get_pet_by_id_streaming) | **GET** /pet/{petId}?streaming | Find pet by ID (streaming) *PetApi* | [**get_pet_by_id_streaming**](docs/PetApi.md#get_pet_by_id_streaming) | **GET** /pet/{petId}?streaming | Find pet by ID (streaming)
*PetApi* | [**update_pet**](docs/PetApi.md#update_pet) | **PUT** /pet | Update an existing pet *PetApi* | [**update_pet**](docs/PetApi.md#update_pet) | **PUT** /pet | Update an existing pet
*PetApi* | [**update_pet_with_form**](docs/PetApi.md#update_pet_with_form) | **POST** /pet/{petId}?streaming | Updates a pet in the store with form data *PetApi* | [**update_pet_with_form**](docs/PetApi.md#update_pet_with_form) | **POST** /pet/{petId} | Updates a pet in the store with form data
*PetApi* | [**upload_file**](docs/PetApi.md#upload_file) | **POST** /pet/{petId}/uploadImage | uploads an image *PetApi* | [**upload_file**](docs/PetApi.md#upload_file) | **POST** /pet/{petId}/uploadImage | uploads an image
*StoreApi* | [**delete_order**](docs/StoreApi.md#delete_order) | **DELETE** /store/order/{orderId} | Delete purchase order by ID *StoreApi* | [**delete_order**](docs/StoreApi.md#delete_order) | **DELETE** /store/order/{orderId} | Delete purchase order by ID
*StoreApi* | [**get_inventory**](docs/StoreApi.md#get_inventory) | **GET** /store/inventory | Returns pet inventories by status *StoreApi* | [**get_inventory**](docs/StoreApi.md#get_inventory) | **GET** /store/inventory | Returns pet inventories by status

View File

@ -5,13 +5,13 @@ All URIs are relative to *http://petstore.swagger.io/v2*
Method | HTTP request | Description Method | HTTP request | Description
------------- | ------------- | ------------- ------------- | ------------- | -------------
[**add_pet**](PetApi.md#add_pet) | **POST** /pet | Add a new pet to the store [**add_pet**](PetApi.md#add_pet) | **POST** /pet | Add a new pet to the store
[**delete_pet**](PetApi.md#delete_pet) | **DELETE** /pet/{petId}?streaming | Deletes a pet [**delete_pet**](PetApi.md#delete_pet) | **DELETE** /pet/{petId} | Deletes a pet
[**find_pets_by_status**](PetApi.md#find_pets_by_status) | **GET** /pet/findByStatus | Finds Pets by status [**find_pets_by_status**](PetApi.md#find_pets_by_status) | **GET** /pet/findByStatus | Finds Pets by status
[**find_pets_by_tags**](PetApi.md#find_pets_by_tags) | **GET** /pet/findByTags | Finds Pets by tags [**find_pets_by_tags**](PetApi.md#find_pets_by_tags) | **GET** /pet/findByTags | Finds Pets by tags
[**get_pet_by_id**](PetApi.md#get_pet_by_id) | **GET** /pet/{petId} | Find pet by ID [**get_pet_by_id**](PetApi.md#get_pet_by_id) | **GET** /pet/{petId} | Find pet by ID
[**get_pet_by_id_streaming**](PetApi.md#get_pet_by_id_streaming) | **GET** /pet/{petId}?streaming | Find pet by ID (streaming) [**get_pet_by_id_streaming**](PetApi.md#get_pet_by_id_streaming) | **GET** /pet/{petId}?streaming | Find pet by ID (streaming)
[**update_pet**](PetApi.md#update_pet) | **PUT** /pet | Update an existing pet [**update_pet**](PetApi.md#update_pet) | **PUT** /pet | Update an existing pet
[**update_pet_with_form**](PetApi.md#update_pet_with_form) | **POST** /pet/{petId}?streaming | Updates a pet in the store with form data [**update_pet_with_form**](PetApi.md#update_pet_with_form) | **POST** /pet/{petId} | Updates a pet in the store with form data
[**upload_file**](PetApi.md#upload_file) | **POST** /pet/{petId}/uploadImage | uploads an image [**upload_file**](PetApi.md#upload_file) | **POST** /pet/{petId}/uploadImage | uploads an image

View File

@ -138,6 +138,8 @@ ApiClient <- R6::R6Class(
#' @param method HTTP method. #' @param method HTTP method.
#' @param query_params The query parameters. #' @param query_params The query parameters.
#' @param header_params The header parameters. #' @param header_params The header parameters.
#' @param form_params The form parameters.
#' @param file_params The form parameters for uploading files.
#' @param accepts The list of Accept headers. #' @param accepts The list of Accept headers.
#' @param content_types The list of Content-Type headers. #' @param content_types The list of Content-Type headers.
#' @param body The HTTP request body. #' @param body The HTTP request body.
@ -145,10 +147,13 @@ ApiClient <- R6::R6Class(
#' @param ... Other optional arguments. #' @param ... Other optional arguments.
#' @return HTTP response #' @return HTTP response
#' @export #' @export
CallApi = function(url, method, query_params, header_params, accepts, content_types, CallApi = function(url, method, query_params, header_params, form_params,
file_params, accepts, content_types,
body, stream_callback = NULL, ...) { body, stream_callback = NULL, ...) {
resp <- self$Execute(url, method, query_params, header_params, accepts, content_types, resp <- self$Execute(url, method, query_params, header_params,
form_params, file_params,
accepts, content_types,
body, stream_callback = stream_callback, ...) body, stream_callback = stream_callback, ...)
if (is.null(self$max_retry_attempts)) { if (is.null(self$max_retry_attempts)) {
@ -160,7 +165,9 @@ ApiClient <- R6::R6Class(
for (i in 1 : self$max_retry_attempts) { for (i in 1 : self$max_retry_attempts) {
if (resp$status_code %in% self$retry_status_codes) { if (resp$status_code %in% self$retry_status_codes) {
Sys.sleep((2 ^ i) + stats::runif(n = 1, min = 0, max = 1)) Sys.sleep((2 ^ i) + stats::runif(n = 1, min = 0, max = 1))
resp <- self$Execute(url, method, query_params, header_params, body, stream_callback = stream_callback, ...) resp <- self$Execute(url, method, query_params, header_params,
form_params, file_params, body,
stream_callback = stream_callback, ...)
} else { } else {
break break
} }
@ -178,6 +185,8 @@ ApiClient <- R6::R6Class(
#' @param method HTTP method. #' @param method HTTP method.
#' @param query_params The query parameters. #' @param query_params The query parameters.
#' @param header_params The header parameters. #' @param header_params The header parameters.
#' @param form_params The form parameters.
#' @param file_params The form parameters for uploading files.
#' @param accepts The list of Accept headers #' @param accepts The list of Accept headers
#' @param content_types The list of Content-Type headers #' @param content_types The list of Content-Type headers
#' @param body The HTTP request body. #' @param body The HTTP request body.
@ -185,7 +194,9 @@ ApiClient <- R6::R6Class(
#' @param ... Other optional arguments. #' @param ... Other optional arguments.
#' @return HTTP response #' @return HTTP response
#' @export #' @export
Execute = function(url, method, query_params, header_params, accepts, content_types, Execute = function(url, method, query_params, header_params,
form_params, file_params,
accepts, content_types,
body, stream_callback = NULL, ...) { body, stream_callback = NULL, ...) {
headers <- httr::add_headers(c(header_params, self$default_headers)) headers <- httr::add_headers(c(header_params, self$default_headers))

View File

@ -123,7 +123,7 @@ FakeApi <- R6::R6Class(
#' @export #' @export
FakeDataFileWithHttpInfo = function(dummy, var_data_file = NULL, data_file = NULL, ...) { FakeDataFileWithHttpInfo = function(dummy, var_data_file = NULL, data_file = NULL, ...) {
args <- list(...) args <- list(...)
query_params <- c() query_params <- list()
header_params <- c() header_params <- c()
if (missing(`dummy`)) { if (missing(`dummy`)) {

View File

@ -567,7 +567,7 @@ PetApi <- R6::R6Class(
#' @export #' @export
AddPetWithHttpInfo = function(pet, data_file = NULL, ...) { AddPetWithHttpInfo = function(pet, data_file = NULL, ...) {
args <- list(...) args <- list(...)
query_params <- c() query_params <- list()
header_params <- c() header_params <- c()
if (missing(`pet`)) { if (missing(`pet`)) {
@ -684,7 +684,7 @@ PetApi <- R6::R6Class(
#' @export #' @export
DeletePetWithHttpInfo = function(pet_id, api_key = NULL, ...) { DeletePetWithHttpInfo = function(pet_id, api_key = NULL, ...) {
args <- list(...) args <- list(...)
query_params <- c() query_params <- list()
header_params <- c() header_params <- c()
if (missing(`pet_id`)) { if (missing(`pet_id`)) {
@ -697,7 +697,7 @@ PetApi <- R6::R6Class(
header_params["api_key"] <- `api_key` header_params["api_key"] <- `api_key`
local_var_body <- NULL local_var_body <- NULL
local_var_url_path <- "/pet/{petId}?streaming" local_var_url_path <- "/pet/{petId}"
if (!missing(`pet_id`)) { if (!missing(`pet_id`)) {
local_var_url_path <- gsub(paste0("\\{", "petId", "\\}"), URLencode(as.character(`pet_id`), reserved = TRUE), local_var_url_path) local_var_url_path <- gsub(paste0("\\{", "petId", "\\}"), URLencode(as.character(`pet_id`), reserved = TRUE), local_var_url_path)
} }
@ -783,7 +783,7 @@ PetApi <- R6::R6Class(
#' @export #' @export
FindPetsByStatusWithHttpInfo = function(status, data_file = NULL, ...) { FindPetsByStatusWithHttpInfo = function(status, data_file = NULL, ...) {
args <- list(...) args <- list(...)
query_params <- c() query_params <- list()
header_params <- c() header_params <- c()
if (missing(`status`)) { if (missing(`status`)) {
@ -891,7 +891,7 @@ PetApi <- R6::R6Class(
#' @export #' @export
FindPetsByTagsWithHttpInfo = function(tags, data_file = NULL, ...) { FindPetsByTagsWithHttpInfo = function(tags, data_file = NULL, ...) {
args <- list(...) args <- list(...)
query_params <- c() query_params <- list()
header_params <- c() header_params <- c()
if (missing(`tags`)) { if (missing(`tags`)) {
@ -999,7 +999,7 @@ PetApi <- R6::R6Class(
#' @export #' @export
GetPetByIdWithHttpInfo = function(pet_id, data_file = NULL, ...) { GetPetByIdWithHttpInfo = function(pet_id, data_file = NULL, ...) {
args <- list(...) args <- list(...)
query_params <- c() query_params <- list()
header_params <- c() header_params <- c()
if (missing(`pet_id`)) { if (missing(`pet_id`)) {
@ -1114,7 +1114,7 @@ PetApi <- R6::R6Class(
#' @export #' @export
GetPetByIdStreamingWithHttpInfo = function(pet_id, stream_callback = NULL, data_file = NULL, ...) { GetPetByIdStreamingWithHttpInfo = function(pet_id, stream_callback = NULL, data_file = NULL, ...) {
args <- list(...) args <- list(...)
query_params <- c() query_params <- list()
header_params <- c() header_params <- c()
if (missing(`pet_id`)) { if (missing(`pet_id`)) {
@ -1231,7 +1231,7 @@ PetApi <- R6::R6Class(
#' @export #' @export
UpdatePetWithHttpInfo = function(pet, data_file = NULL, ...) { UpdatePetWithHttpInfo = function(pet, data_file = NULL, ...) {
args <- list(...) args <- list(...)
query_params <- c() query_params <- list()
header_params <- c() header_params <- c()
if (missing(`pet`)) { if (missing(`pet`)) {
@ -1344,7 +1344,7 @@ PetApi <- R6::R6Class(
#' @export #' @export
UpdatePetWithFormWithHttpInfo = function(pet_id, name = NULL, status = NULL, ...) { UpdatePetWithFormWithHttpInfo = function(pet_id, name = NULL, status = NULL, ...) {
args <- list(...) args <- list(...)
query_params <- c() query_params <- list()
header_params <- c() header_params <- c()
if (missing(`pet_id`)) { if (missing(`pet_id`)) {
@ -1359,7 +1359,7 @@ PetApi <- R6::R6Class(
"status" = status "status" = status
) )
local_var_url_path <- "/pet/{petId}?streaming" local_var_url_path <- "/pet/{petId}"
if (!missing(`pet_id`)) { if (!missing(`pet_id`)) {
local_var_url_path <- gsub(paste0("\\{", "petId", "\\}"), URLencode(as.character(`pet_id`), reserved = TRUE), local_var_url_path) local_var_url_path <- gsub(paste0("\\{", "petId", "\\}"), URLencode(as.character(`pet_id`), reserved = TRUE), local_var_url_path)
} }
@ -1449,7 +1449,7 @@ PetApi <- R6::R6Class(
#' @export #' @export
UploadFileWithHttpInfo = function(pet_id, additional_metadata = NULL, file = NULL, data_file = NULL, ...) { UploadFileWithHttpInfo = function(pet_id, additional_metadata = NULL, file = NULL, data_file = NULL, ...) {
args <- list(...) args <- list(...)
query_params <- c() query_params <- list()
header_params <- c() header_params <- c()
if (missing(`pet_id`)) { if (missing(`pet_id`)) {

View File

@ -271,7 +271,7 @@ StoreApi <- R6::R6Class(
#' @export #' @export
DeleteOrderWithHttpInfo = function(order_id, ...) { DeleteOrderWithHttpInfo = function(order_id, ...) {
args <- list(...) args <- list(...)
query_params <- c() query_params <- list()
header_params <- c() header_params <- c()
if (missing(`order_id`)) { if (missing(`order_id`)) {
@ -364,7 +364,7 @@ StoreApi <- R6::R6Class(
#' @export #' @export
GetInventoryWithHttpInfo = function(data_file = NULL, ...) { GetInventoryWithHttpInfo = function(data_file = NULL, ...) {
args <- list(...) args <- list(...)
query_params <- c() query_params <- list()
header_params <- c() header_params <- c()
local_var_body <- NULL local_var_body <- NULL
@ -465,7 +465,7 @@ StoreApi <- R6::R6Class(
#' @export #' @export
GetOrderByIdWithHttpInfo = function(order_id, data_file = NULL, ...) { GetOrderByIdWithHttpInfo = function(order_id, data_file = NULL, ...) {
args <- list(...) args <- list(...)
query_params <- c() query_params <- list()
header_params <- c() header_params <- c()
if (missing(`order_id`)) { if (missing(`order_id`)) {
@ -573,7 +573,7 @@ StoreApi <- R6::R6Class(
#' @export #' @export
PlaceOrderWithHttpInfo = function(order, data_file = NULL, ...) { PlaceOrderWithHttpInfo = function(order, data_file = NULL, ...) {
args <- list(...) args <- list(...)
query_params <- c() query_params <- list()
header_params <- c() header_params <- c()
if (missing(`order`)) { if (missing(`order`)) {

View File

@ -457,7 +457,7 @@ UserApi <- R6::R6Class(
#' @export #' @export
CreateUserWithHttpInfo = function(user, ...) { CreateUserWithHttpInfo = function(user, ...) {
args <- list(...) args <- list(...)
query_params <- c() query_params <- list()
header_params <- c() header_params <- c()
if (missing(`user`)) { if (missing(`user`)) {
@ -555,7 +555,7 @@ UserApi <- R6::R6Class(
#' @export #' @export
CreateUsersWithArrayInputWithHttpInfo = function(user, ...) { CreateUsersWithArrayInputWithHttpInfo = function(user, ...) {
args <- list(...) args <- list(...)
query_params <- c() query_params <- list()
header_params <- c() header_params <- c()
if (missing(`user`)) { if (missing(`user`)) {
@ -656,7 +656,7 @@ UserApi <- R6::R6Class(
#' @export #' @export
CreateUsersWithListInputWithHttpInfo = function(user, ...) { CreateUsersWithListInputWithHttpInfo = function(user, ...) {
args <- list(...) args <- list(...)
query_params <- c() query_params <- list()
header_params <- c() header_params <- c()
if (missing(`user`)) { if (missing(`user`)) {
@ -757,7 +757,7 @@ UserApi <- R6::R6Class(
#' @export #' @export
DeleteUserWithHttpInfo = function(username, ...) { DeleteUserWithHttpInfo = function(username, ...) {
args <- list(...) args <- list(...)
query_params <- c() query_params <- list()
header_params <- c() header_params <- c()
if (missing(`username`)) { if (missing(`username`)) {
@ -856,7 +856,7 @@ UserApi <- R6::R6Class(
#' @export #' @export
GetUserByNameWithHttpInfo = function(username, data_file = NULL, ...) { GetUserByNameWithHttpInfo = function(username, data_file = NULL, ...) {
args <- list(...) args <- list(...)
query_params <- c() query_params <- list()
header_params <- c() header_params <- c()
if (missing(`username`)) { if (missing(`username`)) {
@ -966,7 +966,7 @@ UserApi <- R6::R6Class(
#' @export #' @export
LoginUserWithHttpInfo = function(username, password, data_file = NULL, ...) { LoginUserWithHttpInfo = function(username, password, data_file = NULL, ...) {
args <- list(...) args <- list(...)
query_params <- c() query_params <- list()
header_params <- c() header_params <- c()
if (missing(`username`)) { if (missing(`username`)) {
@ -1077,7 +1077,7 @@ UserApi <- R6::R6Class(
#' @export #' @export
LogoutUserWithHttpInfo = function(...) { LogoutUserWithHttpInfo = function(...) {
args <- list(...) args <- list(...)
query_params <- c() query_params <- list()
header_params <- c() header_params <- c()
local_var_body <- NULL local_var_body <- NULL
@ -1165,7 +1165,7 @@ UserApi <- R6::R6Class(
#' @export #' @export
UpdateUserWithHttpInfo = function(username, user, ...) { UpdateUserWithHttpInfo = function(username, user, ...) {
args <- list(...) args <- list(...)
query_params <- c() query_params <- list()
header_params <- c() header_params <- c()
if (missing(`username`)) { if (missing(`username`)) {

View File

@ -63,13 +63,13 @@ Class | Method | HTTP request | Description
------------ | ------------- | ------------- | ------------- ------------ | ------------- | ------------- | -------------
*FakeApi* | [**FakeDataFile**](docs/FakeApi.md#FakeDataFile) | **GET** /fake/data_file | test data_file to ensure it's escaped correctly *FakeApi* | [**FakeDataFile**](docs/FakeApi.md#FakeDataFile) | **GET** /fake/data_file | test data_file to ensure it's escaped correctly
*PetApi* | [**AddPet**](docs/PetApi.md#AddPet) | **POST** /pet | Add a new pet to the store *PetApi* | [**AddPet**](docs/PetApi.md#AddPet) | **POST** /pet | Add a new pet to the store
*PetApi* | [**DeletePet**](docs/PetApi.md#DeletePet) | **DELETE** /pet/{petId}?streaming | Deletes a pet *PetApi* | [**DeletePet**](docs/PetApi.md#DeletePet) | **DELETE** /pet/{petId} | Deletes a pet
*PetApi* | [**FindPetsByStatus**](docs/PetApi.md#FindPetsByStatus) | **GET** /pet/findByStatus | Finds Pets by status *PetApi* | [**FindPetsByStatus**](docs/PetApi.md#FindPetsByStatus) | **GET** /pet/findByStatus | Finds Pets by status
*PetApi* | [**FindPetsByTags**](docs/PetApi.md#FindPetsByTags) | **GET** /pet/findByTags | Finds Pets by tags *PetApi* | [**FindPetsByTags**](docs/PetApi.md#FindPetsByTags) | **GET** /pet/findByTags | Finds Pets by tags
*PetApi* | [**GetPetById**](docs/PetApi.md#GetPetById) | **GET** /pet/{petId} | Find pet by ID *PetApi* | [**GetPetById**](docs/PetApi.md#GetPetById) | **GET** /pet/{petId} | Find pet by ID
*PetApi* | [**GetPetByIdStreaming**](docs/PetApi.md#GetPetByIdStreaming) | **GET** /pet/{petId}?streaming | Find pet by ID (streaming) *PetApi* | [**GetPetByIdStreaming**](docs/PetApi.md#GetPetByIdStreaming) | **GET** /pet/{petId}?streaming | Find pet by ID (streaming)
*PetApi* | [**UpdatePet**](docs/PetApi.md#UpdatePet) | **PUT** /pet | Update an existing pet *PetApi* | [**UpdatePet**](docs/PetApi.md#UpdatePet) | **PUT** /pet | Update an existing pet
*PetApi* | [**UpdatePetWithForm**](docs/PetApi.md#UpdatePetWithForm) | **POST** /pet/{petId}?streaming | Updates a pet in the store with form data *PetApi* | [**UpdatePetWithForm**](docs/PetApi.md#UpdatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data
*PetApi* | [**UploadFile**](docs/PetApi.md#UploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image *PetApi* | [**UploadFile**](docs/PetApi.md#UploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image
*StoreApi* | [**DeleteOrder**](docs/StoreApi.md#DeleteOrder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID *StoreApi* | [**DeleteOrder**](docs/StoreApi.md#DeleteOrder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID
*StoreApi* | [**GetInventory**](docs/StoreApi.md#GetInventory) | **GET** /store/inventory | Returns pet inventories by status *StoreApi* | [**GetInventory**](docs/StoreApi.md#GetInventory) | **GET** /store/inventory | Returns pet inventories by status

View File

@ -5,13 +5,13 @@ All URIs are relative to *http://petstore.swagger.io/v2*
Method | HTTP request | Description Method | HTTP request | Description
------------- | ------------- | ------------- ------------- | ------------- | -------------
[**AddPet**](PetApi.md#AddPet) | **POST** /pet | Add a new pet to the store [**AddPet**](PetApi.md#AddPet) | **POST** /pet | Add a new pet to the store
[**DeletePet**](PetApi.md#DeletePet) | **DELETE** /pet/{petId}?streaming | Deletes a pet [**DeletePet**](PetApi.md#DeletePet) | **DELETE** /pet/{petId} | Deletes a pet
[**FindPetsByStatus**](PetApi.md#FindPetsByStatus) | **GET** /pet/findByStatus | Finds Pets by status [**FindPetsByStatus**](PetApi.md#FindPetsByStatus) | **GET** /pet/findByStatus | Finds Pets by status
[**FindPetsByTags**](PetApi.md#FindPetsByTags) | **GET** /pet/findByTags | Finds Pets by tags [**FindPetsByTags**](PetApi.md#FindPetsByTags) | **GET** /pet/findByTags | Finds Pets by tags
[**GetPetById**](PetApi.md#GetPetById) | **GET** /pet/{petId} | Find pet by ID [**GetPetById**](PetApi.md#GetPetById) | **GET** /pet/{petId} | Find pet by ID
[**GetPetByIdStreaming**](PetApi.md#GetPetByIdStreaming) | **GET** /pet/{petId}?streaming | Find pet by ID (streaming) [**GetPetByIdStreaming**](PetApi.md#GetPetByIdStreaming) | **GET** /pet/{petId}?streaming | Find pet by ID (streaming)
[**UpdatePet**](PetApi.md#UpdatePet) | **PUT** /pet | Update an existing pet [**UpdatePet**](PetApi.md#UpdatePet) | **PUT** /pet | Update an existing pet
[**UpdatePetWithForm**](PetApi.md#UpdatePetWithForm) | **POST** /pet/{petId}?streaming | Updates a pet in the store with form data [**UpdatePetWithForm**](PetApi.md#UpdatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data
[**UploadFile**](PetApi.md#UploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image [**UploadFile**](PetApi.md#UploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image