forked from loafle/openapi-generator-original
r better doc (#13447)
This commit is contained in:
parent
7e87b5d109
commit
863dbc7c3e
@ -21,13 +21,17 @@ Method | HTTP request | Description
|
||||
```R
|
||||
library({{{packageName}}})
|
||||
|
||||
{{#summary}}
|
||||
# {{{.}}}
|
||||
#
|
||||
{{/summary}}
|
||||
{{#allParams}}
|
||||
{{#-first}}
|
||||
# prepare function argument(s)
|
||||
{{/-first}}
|
||||
var_{{{paramName}}} <- {{{vendorExtensions.x-r-example}}} # {{{dataType}}} | {{{description}}}{{^required}} (Optional){{/required}}
|
||||
{{/allParams}}
|
||||
|
||||
{{#summary}}
|
||||
# {{{.}}}
|
||||
{{/summary}}
|
||||
{{#generateWrapper}}
|
||||
api_instance <- {{#lambda.lowercase}}{{{packageName}}}{{/lambda.lowercase}}_api$new()
|
||||
{{/generateWrapper}}
|
||||
@ -39,21 +43,21 @@ api_instance <- {{{classname}}}$new()
|
||||
{{#isBasic}}
|
||||
{{#isBasicBasic}}
|
||||
# Configure HTTP basic authorization: {{{name}}}
|
||||
api_instance$api_client$username <- Sys.getenv("USERNAME")
|
||||
api_instance$api_client$password <- Sys.getenv("PASSWORD")
|
||||
{{^-first}}# {{/-first}}api_instance$api_client$username <- Sys.getenv("USERNAME")
|
||||
{{^-first}}# {{/-first}}api_instance$api_client$password <- Sys.getenv("PASSWORD")
|
||||
{{/isBasicBasic}}
|
||||
{{#isBasicBearer}}
|
||||
# Configure HTTP bearer authorization: {{{name}}}
|
||||
api_instance$api_client$bearer_token <- Sys.getenv("BEARER_TOKEN")
|
||||
{{^-first}}# {{/-first}}api_instance$api_client$bearer_token <- Sys.getenv("BEARER_TOKEN")
|
||||
{{/isBasicBearer}}
|
||||
{{/isBasic}}
|
||||
{{#isApiKey}}
|
||||
# Configure API key authorization: {{{name}}}
|
||||
api_instance$api_client$api_keys["{{{keyParamName}}}"] <- Sys.getenv("API_KEY")
|
||||
{{^-first}}# {{/-first}}api_instance$api_client$api_keys["{{{keyParamName}}}"] <- Sys.getenv("API_KEY")
|
||||
{{/isApiKey}}
|
||||
{{#isOAuth}}
|
||||
# Configure OAuth2 access token for authorization: {{{name}}}
|
||||
api_instance$api_client$access_token <- Sys.getenv("ACCESS_TOKEN")
|
||||
{{^-first}}# {{/-first}}api_instance$api_client$access_token <- Sys.getenv("ACCESS_TOKEN")
|
||||
{{/isOAuth}}
|
||||
{{/authMethods}}
|
||||
{{/hasAuthMethods}}
|
||||
|
@ -6,7 +6,7 @@
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#isReadOnly}}[readonly] {{/isReadOnly}}{{#defaultValue}}[default to {{.}}]{{/defaultValue}}
|
||||
{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#isReadOnly}}[readonly] {{/isReadOnly}}{{#defaultValue}}[default to {{.}}] {{/defaultValue}}{{#maximum}}[Max: {{{.}}}] {{/maximum}}{{#minimum}}[Min: {{{.}}}] {{/minimum}}{{#isEnum}}[Enum: {{_enum}}] {{/isEnum}}{{#pattern}}[Pattern: {{.}}] {{/pattern}}{{#maxItems}}[Max. items: {{.}}] {{/maxItems}}{{#minItems}}[Min. items: {{.}}] {{/minItems}}{{#maxLength}}[Max. length: {{.}}] {{/maxLength}}{{#minLength}}[Min. length: {{.}}] {{/minLength}}
|
||||
{{/vars}}
|
||||
|
||||
{{/model}}{{/models}}
|
||||
|
@ -5,6 +5,6 @@
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**className** | **character** | |
|
||||
**color** | **character** | | [optional] [default to "red"]
|
||||
**color** | **character** | | [optional] [default to "red"]
|
||||
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**className** | **character** | |
|
||||
**color** | **character** | | [optional] [default to "red"]
|
||||
**color** | **character** | | [optional] [default to "red"]
|
||||
**declawed** | **character** | | [optional]
|
||||
|
||||
|
||||
|
@ -6,6 +6,6 @@ A category for a pet
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **integer** | | [optional]
|
||||
**name** | **character** | | [optional]
|
||||
**name** | **character** | | [optional] [Pattern: ^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$]
|
||||
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**className** | **character** | |
|
||||
**color** | **character** | | [optional] [default to "red"]
|
||||
**color** | **character** | | [optional] [default to "red"]
|
||||
**breed** | **character** | | [optional]
|
||||
|
||||
|
||||
|
@ -20,10 +20,12 @@ test data_file to ensure it's escaped correctly
|
||||
```R
|
||||
library(petstore)
|
||||
|
||||
# test data_file to ensure it's escaped correctly
|
||||
#
|
||||
# prepare function argument(s)
|
||||
var_dummy <- "dummy_example" # character | dummy required parameter
|
||||
var_var_data_file <- "var_data_file_example" # character | header data file (Optional)
|
||||
|
||||
# test data_file to ensure it's escaped correctly
|
||||
api_instance <- petstore_api$new()
|
||||
result <- tryCatch(
|
||||
# to save the result into a file, simply add the optional `data_file` parameter, e.g.
|
||||
@ -81,9 +83,11 @@ test regular expression to ensure no exception
|
||||
```R
|
||||
library(petstore)
|
||||
|
||||
# test regular expression to ensure no exception
|
||||
#
|
||||
# prepare function argument(s)
|
||||
var_reg_exp_test <- "reg_exp_test_example" # character | dummy required parameter
|
||||
|
||||
# test regular expression to ensure no exception
|
||||
api_instance <- petstore_api$new()
|
||||
result <- tryCatch(
|
||||
api_instance$fake_api$fake_regular_expression(var_reg_exp_test),
|
||||
@ -134,10 +138,12 @@ test set query parameter
|
||||
```R
|
||||
library(petstore)
|
||||
|
||||
# test set query parameter
|
||||
#
|
||||
# prepare function argument(s)
|
||||
var_set_dummy <- list("inner_example") # set[character] | set query
|
||||
var_array_dummy <- list("inner_example") # array[character] | array query
|
||||
|
||||
# test set query parameter
|
||||
api_instance <- petstore_api$new()
|
||||
result <- tryCatch(
|
||||
api_instance$fake_api$fake_set_query(var_set_dummy, var_array_dummy),
|
||||
|
@ -7,6 +7,6 @@ Name | Type | Description | Notes
|
||||
**hasBaleen** | **character** | | [optional]
|
||||
**hasTeeth** | **character** | | [optional]
|
||||
**className** | **character** | |
|
||||
**type** | **character** | | [optional]
|
||||
**type** | **character** | | [optional] [Enum: [plains, mountain, grevys]]
|
||||
|
||||
|
||||
|
@ -9,7 +9,7 @@ Name | Type | Description | Notes
|
||||
**petId** | **integer** | | [optional]
|
||||
**quantity** | **integer** | | [optional]
|
||||
**shipDate** | **character** | | [optional]
|
||||
**status** | **character** | Order Status | [optional]
|
||||
**complete** | **character** | | [optional] [default to FALSE]
|
||||
**status** | **character** | Order Status | [optional] [Enum: [placed, approved, delivered]]
|
||||
**complete** | **character** | | [optional] [default to FALSE]
|
||||
|
||||
|
||||
|
@ -10,6 +10,6 @@ Name | Type | Description | Notes
|
||||
**name** | **character** | |
|
||||
**photoUrls** | **array[character]** | |
|
||||
**tags** | [**array[Tag]**](Tag.md) | | [optional]
|
||||
**status** | **character** | pet status in the store | [optional]
|
||||
**status** | **character** | pet status in the store | [optional] [Enum: [available, pending, sold]]
|
||||
|
||||
|
||||
|
@ -27,9 +27,11 @@ Add a new pet to the store
|
||||
```R
|
||||
library(petstore)
|
||||
|
||||
# Add a new pet to the store
|
||||
#
|
||||
# prepare function argument(s)
|
||||
var_pet <- Pet$new("name_example", list("photoUrls_example"), 123, Category$new(123, "name_example"), list(Tag$new(123, "name_example")), "available") # Pet | Pet object that needs to be added to the store
|
||||
|
||||
# Add a new pet to the store
|
||||
api_instance <- petstore_api$new()
|
||||
# Configure HTTP basic authorization: http_auth
|
||||
api_instance$api_client$username <- Sys.getenv("USERNAME")
|
||||
@ -90,10 +92,12 @@ Deletes a pet
|
||||
```R
|
||||
library(petstore)
|
||||
|
||||
# Deletes a pet
|
||||
#
|
||||
# prepare function argument(s)
|
||||
var_pet_id <- 56 # integer | Pet id to delete
|
||||
var_api_key <- "api_key_example" # character | (Optional)
|
||||
|
||||
# Deletes a pet
|
||||
api_instance <- petstore_api$new()
|
||||
# Configure OAuth2 access token for authorization: petstore_auth
|
||||
api_instance$api_client$access_token <- Sys.getenv("ACCESS_TOKEN")
|
||||
@ -147,9 +151,11 @@ Multiple status values can be provided with comma separated strings
|
||||
```R
|
||||
library(petstore)
|
||||
|
||||
# Finds Pets by status
|
||||
#
|
||||
# prepare function argument(s)
|
||||
var_status <- list("available") # array[character] | Status values that need to be considered for filter
|
||||
|
||||
# Finds Pets by status
|
||||
api_instance <- petstore_api$new()
|
||||
# Configure OAuth2 access token for authorization: petstore_auth
|
||||
api_instance$api_client$access_token <- Sys.getenv("ACCESS_TOKEN")
|
||||
@ -209,9 +215,11 @@ Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3
|
||||
```R
|
||||
library(petstore)
|
||||
|
||||
# Finds Pets by tags
|
||||
#
|
||||
# prepare function argument(s)
|
||||
var_tags <- list("inner_example") # array[character] | Tags to filter by
|
||||
|
||||
# Finds Pets by tags
|
||||
api_instance <- petstore_api$new()
|
||||
result <- tryCatch(
|
||||
# to save the result into a file, simply add the optional `data_file` parameter, e.g.
|
||||
@ -269,9 +277,11 @@ Returns a single pet
|
||||
```R
|
||||
library(petstore)
|
||||
|
||||
# Find pet by ID
|
||||
#
|
||||
# prepare function argument(s)
|
||||
var_pet_id <- 56 # integer | ID of pet to return
|
||||
|
||||
# Find pet by ID
|
||||
api_instance <- petstore_api$new()
|
||||
# Configure HTTP bearer authorization: BearerToken
|
||||
api_instance$api_client$bearer_token <- Sys.getenv("BEARER_TOKEN")
|
||||
@ -332,9 +342,11 @@ Returns a single pet
|
||||
```R
|
||||
library(petstore)
|
||||
|
||||
# Find pet by ID (streaming)
|
||||
#
|
||||
# prepare function argument(s)
|
||||
var_pet_id <- 56 # integer | ID of pet to return
|
||||
|
||||
# Find pet by ID (streaming)
|
||||
api_instance <- petstore_api$new()
|
||||
# Configure API key authorization: api_key
|
||||
api_instance$api_client$api_keys["api_key"] <- Sys.getenv("API_KEY")
|
||||
@ -397,9 +409,11 @@ Header test
|
||||
```R
|
||||
library(petstore)
|
||||
|
||||
# Header test
|
||||
#
|
||||
# prepare function argument(s)
|
||||
var_header_test_int <- 56 # integer | header test int
|
||||
|
||||
# Header test
|
||||
api_instance <- petstore_api$new()
|
||||
# Configure API key authorization: api_key
|
||||
api_instance$api_client$api_keys["api_key"] <- Sys.getenv("API_KEY")
|
||||
@ -462,9 +476,11 @@ Update an existing pet
|
||||
```R
|
||||
library(petstore)
|
||||
|
||||
# Update an existing pet
|
||||
#
|
||||
# prepare function argument(s)
|
||||
var_pet <- Pet$new("name_example", list("photoUrls_example"), 123, Category$new(123, "name_example"), list(Tag$new(123, "name_example")), "available") # Pet | Pet object that needs to be added to the store
|
||||
|
||||
# Update an existing pet
|
||||
api_instance <- petstore_api$new()
|
||||
# Configure OAuth2 access token for authorization: petstore_auth
|
||||
api_instance$api_client$access_token <- Sys.getenv("ACCESS_TOKEN")
|
||||
@ -526,11 +542,13 @@ Updates a pet in the store with form data
|
||||
```R
|
||||
library(petstore)
|
||||
|
||||
# Updates a pet in the store with form data
|
||||
#
|
||||
# prepare function argument(s)
|
||||
var_pet_id <- 56 # integer | ID of pet that needs to be updated
|
||||
var_name <- "name_example" # character | Updated name of the pet (Optional)
|
||||
var_status <- "status_example" # character | Updated status of the pet (Optional)
|
||||
|
||||
# Updates a pet in the store with form data
|
||||
api_instance <- petstore_api$new()
|
||||
result <- tryCatch(
|
||||
api_instance$pet_api$update_pet_with_form(var_pet_id, name = var_name, status = var_status),
|
||||
@ -583,11 +601,13 @@ uploads an image
|
||||
```R
|
||||
library(petstore)
|
||||
|
||||
# uploads an image
|
||||
#
|
||||
# prepare function argument(s)
|
||||
var_pet_id <- 56 # integer | ID of pet to update
|
||||
var_additional_metadata <- "additional_metadata_example" # character | Additional data to pass to server (Optional)
|
||||
var_file <- File.new('/path/to/file') # data.frame | file to upload (Optional)
|
||||
|
||||
# uploads an image
|
||||
api_instance <- petstore_api$new()
|
||||
# Configure OAuth2 access token for authorization: petstore_auth
|
||||
api_instance$api_client$access_token <- Sys.getenv("ACCESS_TOKEN")
|
||||
|
@ -21,9 +21,11 @@ For valid response try integer IDs with value < 1000. Anything above 1000 or non
|
||||
```R
|
||||
library(petstore)
|
||||
|
||||
# Delete purchase order by ID
|
||||
#
|
||||
# prepare function argument(s)
|
||||
var_order_id <- "order_id_example" # character | ID of the order that needs to be deleted
|
||||
|
||||
# Delete purchase order by ID
|
||||
api_instance <- petstore_api$new()
|
||||
result <- tryCatch(
|
||||
api_instance$store_api$delete_order(var_order_id),
|
||||
@ -75,8 +77,9 @@ Returns a map of status codes to quantities
|
||||
```R
|
||||
library(petstore)
|
||||
|
||||
|
||||
# Returns pet inventories by status
|
||||
#
|
||||
|
||||
api_instance <- petstore_api$new()
|
||||
# Configure API key authorization: api_key
|
||||
api_instance$api_client$api_keys["api_key"] <- Sys.getenv("API_KEY")
|
||||
@ -132,9 +135,11 @@ For valid response try integer IDs with value <= 5 or > 10. Other values will ge
|
||||
```R
|
||||
library(petstore)
|
||||
|
||||
# Find purchase order by ID
|
||||
#
|
||||
# prepare function argument(s)
|
||||
var_order_id <- 56 # integer | ID of pet that needs to be fetched
|
||||
|
||||
# Find purchase order by ID
|
||||
api_instance <- petstore_api$new()
|
||||
result <- tryCatch(
|
||||
# to save the result into a file, simply add the optional `data_file` parameter, e.g.
|
||||
@ -193,9 +198,11 @@ Place an order for a pet
|
||||
```R
|
||||
library(petstore)
|
||||
|
||||
# Place an order for a pet
|
||||
#
|
||||
# prepare function argument(s)
|
||||
var_order <- Order$new(123, 123, 123, "shipDate_example", "placed", "complete_example") # Order | order placed for purchasing the pet
|
||||
|
||||
# Place an order for a pet
|
||||
api_instance <- petstore_api$new()
|
||||
result <- tryCatch(
|
||||
# to save the result into a file, simply add the optional `data_file` parameter, e.g.
|
||||
|
@ -25,9 +25,11 @@ This can only be done by the logged in user.
|
||||
```R
|
||||
library(petstore)
|
||||
|
||||
# Create user
|
||||
#
|
||||
# prepare function argument(s)
|
||||
var_user <- User$new(123, "username_example", "firstName_example", "lastName_example", "email_example", "password_example", "phone_example", 123) # User | Created user object
|
||||
|
||||
# Create user
|
||||
api_instance <- petstore_api$new()
|
||||
# Configure API key authorization: api_key
|
||||
api_instance$api_client$api_keys["api_key"] <- Sys.getenv("API_KEY")
|
||||
@ -80,9 +82,11 @@ Creates list of users with given input array
|
||||
```R
|
||||
library(petstore)
|
||||
|
||||
# Creates list of users with given input array
|
||||
#
|
||||
# prepare function argument(s)
|
||||
var_user <- list(User$new(123, "username_example", "firstName_example", "lastName_example", "email_example", "password_example", "phone_example", 123)) # array[User] | List of user object
|
||||
|
||||
# Creates list of users with given input array
|
||||
api_instance <- petstore_api$new()
|
||||
# Configure API key authorization: api_key
|
||||
api_instance$api_client$api_keys["api_key"] <- Sys.getenv("API_KEY")
|
||||
@ -135,9 +139,11 @@ Creates list of users with given input array
|
||||
```R
|
||||
library(petstore)
|
||||
|
||||
# Creates list of users with given input array
|
||||
#
|
||||
# prepare function argument(s)
|
||||
var_user <- list(User$new(123, "username_example", "firstName_example", "lastName_example", "email_example", "password_example", "phone_example", 123)) # array[User] | List of user object
|
||||
|
||||
# Creates list of users with given input array
|
||||
api_instance <- petstore_api$new()
|
||||
# Configure API key authorization: api_key
|
||||
api_instance$api_client$api_keys["api_key"] <- Sys.getenv("API_KEY")
|
||||
@ -190,9 +196,11 @@ This can only be done by the logged in user.
|
||||
```R
|
||||
library(petstore)
|
||||
|
||||
# Delete user
|
||||
#
|
||||
# prepare function argument(s)
|
||||
var_username <- "username_example" # character | The name that needs to be deleted
|
||||
|
||||
# Delete user
|
||||
api_instance <- petstore_api$new()
|
||||
# Configure API key authorization: api_key
|
||||
api_instance$api_client$api_keys["api_key"] <- Sys.getenv("API_KEY")
|
||||
@ -246,9 +254,11 @@ Get user by user name
|
||||
```R
|
||||
library(petstore)
|
||||
|
||||
# Get user by user name
|
||||
#
|
||||
# prepare function argument(s)
|
||||
var_username <- "username_example" # character | The name that needs to be fetched. Use user1 for testing.
|
||||
|
||||
# Get user by user name
|
||||
api_instance <- petstore_api$new()
|
||||
result <- tryCatch(
|
||||
# to save the result into a file, simply add the optional `data_file` parameter, e.g.
|
||||
@ -307,10 +317,12 @@ Logs user into the system
|
||||
```R
|
||||
library(petstore)
|
||||
|
||||
# Logs user into the system
|
||||
#
|
||||
# prepare function argument(s)
|
||||
var_username <- "username_example" # character | The user name for login
|
||||
var_password <- "password_example" # character | The password for login in clear text
|
||||
|
||||
# Logs user into the system
|
||||
api_instance <- petstore_api$new()
|
||||
result <- tryCatch(
|
||||
# to save the result into a file, simply add the optional `data_file` parameter, e.g.
|
||||
@ -369,8 +381,9 @@ Logs out current logged in user session
|
||||
```R
|
||||
library(petstore)
|
||||
|
||||
|
||||
# Logs out current logged in user session
|
||||
#
|
||||
|
||||
api_instance <- petstore_api$new()
|
||||
# Configure API key authorization: api_key
|
||||
api_instance$api_client$api_keys["api_key"] <- Sys.getenv("API_KEY")
|
||||
@ -420,10 +433,12 @@ This can only be done by the logged in user.
|
||||
```R
|
||||
library(petstore)
|
||||
|
||||
# Updated user
|
||||
#
|
||||
# prepare function argument(s)
|
||||
var_username <- "username_example" # character | name that need to be deleted
|
||||
var_user <- User$new(123, "username_example", "firstName_example", "lastName_example", "email_example", "password_example", "phone_example", 123) # User | Updated user object
|
||||
|
||||
# Updated user
|
||||
api_instance <- petstore_api$new()
|
||||
# Configure API key authorization: api_key
|
||||
api_instance$api_client$api_keys["api_key"] <- Sys.getenv("API_KEY")
|
||||
|
@ -4,7 +4,7 @@
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**type** | **character** | | [optional]
|
||||
**type** | **character** | | [optional] [Enum: [plains, mountain, grevys]]
|
||||
**className** | **character** | |
|
||||
|
||||
|
||||
|
@ -5,6 +5,6 @@
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**className** | **character** | |
|
||||
**color** | **character** | | [optional] [default to "red"]
|
||||
**color** | **character** | | [optional] [default to "red"]
|
||||
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**className** | **character** | |
|
||||
**color** | **character** | | [optional] [default to "red"]
|
||||
**color** | **character** | | [optional] [default to "red"]
|
||||
**declawed** | **character** | | [optional]
|
||||
|
||||
|
||||
|
@ -6,6 +6,6 @@ A category for a pet
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **integer** | | [optional]
|
||||
**name** | **character** | | [optional]
|
||||
**name** | **character** | | [optional] [Pattern: ^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$]
|
||||
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**className** | **character** | |
|
||||
**color** | **character** | | [optional] [default to "red"]
|
||||
**color** | **character** | | [optional] [default to "red"]
|
||||
**breed** | **character** | | [optional]
|
||||
|
||||
|
||||
|
@ -20,10 +20,12 @@ test data_file to ensure it's escaped correctly
|
||||
```R
|
||||
library(petstore)
|
||||
|
||||
# test data_file to ensure it's escaped correctly
|
||||
#
|
||||
# prepare function argument(s)
|
||||
var_dummy <- "dummy_example" # character | dummy required parameter
|
||||
var_var_data_file <- "var_data_file_example" # character | header data file (Optional)
|
||||
|
||||
# test data_file to ensure it's escaped correctly
|
||||
api_instance <- FakeApi$new()
|
||||
result <- tryCatch(
|
||||
# to save the result into a file, simply add the optional `data_file` parameter, e.g.
|
||||
@ -81,9 +83,11 @@ test regular expression to ensure no exception
|
||||
```R
|
||||
library(petstore)
|
||||
|
||||
# test regular expression to ensure no exception
|
||||
#
|
||||
# prepare function argument(s)
|
||||
var_reg_exp_test <- "reg_exp_test_example" # character | dummy required parameter
|
||||
|
||||
# test regular expression to ensure no exception
|
||||
api_instance <- FakeApi$new()
|
||||
result <- tryCatch(
|
||||
api_instance$fake_regular_expression(var_reg_exp_test),
|
||||
@ -134,10 +138,12 @@ test set query parameter
|
||||
```R
|
||||
library(petstore)
|
||||
|
||||
# test set query parameter
|
||||
#
|
||||
# prepare function argument(s)
|
||||
var_set_dummy <- list("inner_example") # set[character] | set query
|
||||
var_array_dummy <- list("inner_example") # array[character] | array query
|
||||
|
||||
# test set query parameter
|
||||
api_instance <- FakeApi$new()
|
||||
result <- tryCatch(
|
||||
api_instance$fake_set_query(var_set_dummy, var_array_dummy),
|
||||
|
@ -7,6 +7,6 @@ Name | Type | Description | Notes
|
||||
**hasBaleen** | **character** | | [optional]
|
||||
**hasTeeth** | **character** | | [optional]
|
||||
**className** | **character** | |
|
||||
**type** | **character** | | [optional]
|
||||
**type** | **character** | | [optional] [Enum: [plains, mountain, grevys]]
|
||||
|
||||
|
||||
|
@ -9,7 +9,7 @@ Name | Type | Description | Notes
|
||||
**petId** | **integer** | | [optional]
|
||||
**quantity** | **integer** | | [optional]
|
||||
**shipDate** | **character** | | [optional]
|
||||
**status** | **character** | Order Status | [optional]
|
||||
**complete** | **character** | | [optional] [default to FALSE]
|
||||
**status** | **character** | Order Status | [optional] [Enum: [placed, approved, delivered]]
|
||||
**complete** | **character** | | [optional] [default to FALSE]
|
||||
|
||||
|
||||
|
@ -10,6 +10,6 @@ Name | Type | Description | Notes
|
||||
**name** | **character** | |
|
||||
**photoUrls** | **array[character]** | |
|
||||
**tags** | [**array[Tag]**](Tag.md) | | [optional]
|
||||
**status** | **character** | pet status in the store | [optional]
|
||||
**status** | **character** | pet status in the store | [optional] [Enum: [available, pending, sold]]
|
||||
|
||||
|
||||
|
@ -27,9 +27,11 @@ Add a new pet to the store
|
||||
```R
|
||||
library(petstore)
|
||||
|
||||
# Add a new pet to the store
|
||||
#
|
||||
# prepare function argument(s)
|
||||
var_pet <- Pet$new("name_example", list("photoUrls_example"), 123, Category$new(123, "name_example"), list(Tag$new(123, "name_example")), "available") # Pet | Pet object that needs to be added to the store
|
||||
|
||||
# Add a new pet to the store
|
||||
api_instance <- PetApi$new()
|
||||
# Configure HTTP basic authorization: http_auth
|
||||
api_instance$api_client$username <- Sys.getenv("USERNAME")
|
||||
@ -90,10 +92,12 @@ Deletes a pet
|
||||
```R
|
||||
library(petstore)
|
||||
|
||||
# Deletes a pet
|
||||
#
|
||||
# prepare function argument(s)
|
||||
var_pet_id <- 56 # integer | Pet id to delete
|
||||
var_api_key <- "api_key_example" # character | (Optional)
|
||||
|
||||
# Deletes a pet
|
||||
api_instance <- PetApi$new()
|
||||
# Configure OAuth2 access token for authorization: petstore_auth
|
||||
api_instance$api_client$access_token <- Sys.getenv("ACCESS_TOKEN")
|
||||
@ -147,9 +151,11 @@ Multiple status values can be provided with comma separated strings
|
||||
```R
|
||||
library(petstore)
|
||||
|
||||
# Finds Pets by status
|
||||
#
|
||||
# prepare function argument(s)
|
||||
var_status <- list("available") # array[character] | Status values that need to be considered for filter
|
||||
|
||||
# Finds Pets by status
|
||||
api_instance <- PetApi$new()
|
||||
# Configure OAuth2 access token for authorization: petstore_auth
|
||||
api_instance$api_client$access_token <- Sys.getenv("ACCESS_TOKEN")
|
||||
@ -209,9 +215,11 @@ Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3
|
||||
```R
|
||||
library(petstore)
|
||||
|
||||
# Finds Pets by tags
|
||||
#
|
||||
# prepare function argument(s)
|
||||
var_tags <- list("inner_example") # array[character] | Tags to filter by
|
||||
|
||||
# Finds Pets by tags
|
||||
api_instance <- PetApi$new()
|
||||
result <- tryCatch(
|
||||
# to save the result into a file, simply add the optional `data_file` parameter, e.g.
|
||||
@ -269,9 +277,11 @@ Returns a single pet
|
||||
```R
|
||||
library(petstore)
|
||||
|
||||
# Find pet by ID
|
||||
#
|
||||
# prepare function argument(s)
|
||||
var_pet_id <- 56 # integer | ID of pet to return
|
||||
|
||||
# Find pet by ID
|
||||
api_instance <- PetApi$new()
|
||||
# Configure HTTP bearer authorization: BearerToken
|
||||
api_instance$api_client$bearer_token <- Sys.getenv("BEARER_TOKEN")
|
||||
@ -332,9 +342,11 @@ Returns a single pet
|
||||
```R
|
||||
library(petstore)
|
||||
|
||||
# Find pet by ID (streaming)
|
||||
#
|
||||
# prepare function argument(s)
|
||||
var_pet_id <- 56 # integer | ID of pet to return
|
||||
|
||||
# Find pet by ID (streaming)
|
||||
api_instance <- PetApi$new()
|
||||
# Configure API key authorization: api_key
|
||||
api_instance$api_client$api_keys["api_key"] <- Sys.getenv("API_KEY")
|
||||
@ -397,9 +409,11 @@ Header test
|
||||
```R
|
||||
library(petstore)
|
||||
|
||||
# Header test
|
||||
#
|
||||
# prepare function argument(s)
|
||||
var_header_test_int <- 56 # integer | header test int
|
||||
|
||||
# Header test
|
||||
api_instance <- PetApi$new()
|
||||
# Configure API key authorization: api_key
|
||||
api_instance$api_client$api_keys["api_key"] <- Sys.getenv("API_KEY")
|
||||
@ -462,9 +476,11 @@ Update an existing pet
|
||||
```R
|
||||
library(petstore)
|
||||
|
||||
# Update an existing pet
|
||||
#
|
||||
# prepare function argument(s)
|
||||
var_pet <- Pet$new("name_example", list("photoUrls_example"), 123, Category$new(123, "name_example"), list(Tag$new(123, "name_example")), "available") # Pet | Pet object that needs to be added to the store
|
||||
|
||||
# Update an existing pet
|
||||
api_instance <- PetApi$new()
|
||||
# Configure OAuth2 access token for authorization: petstore_auth
|
||||
api_instance$api_client$access_token <- Sys.getenv("ACCESS_TOKEN")
|
||||
@ -526,11 +542,13 @@ Updates a pet in the store with form data
|
||||
```R
|
||||
library(petstore)
|
||||
|
||||
# Updates a pet in the store with form data
|
||||
#
|
||||
# prepare function argument(s)
|
||||
var_pet_id <- 56 # integer | ID of pet that needs to be updated
|
||||
var_name <- "name_example" # character | Updated name of the pet (Optional)
|
||||
var_status <- "status_example" # character | Updated status of the pet (Optional)
|
||||
|
||||
# Updates a pet in the store with form data
|
||||
api_instance <- PetApi$new()
|
||||
result <- tryCatch(
|
||||
api_instance$update_pet_with_form(var_pet_id, name = var_name, status = var_status),
|
||||
@ -583,11 +601,13 @@ uploads an image
|
||||
```R
|
||||
library(petstore)
|
||||
|
||||
# uploads an image
|
||||
#
|
||||
# prepare function argument(s)
|
||||
var_pet_id <- 56 # integer | ID of pet to update
|
||||
var_additional_metadata <- "additional_metadata_example" # character | Additional data to pass to server (Optional)
|
||||
var_file <- File.new('/path/to/file') # data.frame | file to upload (Optional)
|
||||
|
||||
# uploads an image
|
||||
api_instance <- PetApi$new()
|
||||
# Configure OAuth2 access token for authorization: petstore_auth
|
||||
api_instance$api_client$access_token <- Sys.getenv("ACCESS_TOKEN")
|
||||
|
@ -21,9 +21,11 @@ For valid response try integer IDs with value < 1000. Anything above 1000 or non
|
||||
```R
|
||||
library(petstore)
|
||||
|
||||
# Delete purchase order by ID
|
||||
#
|
||||
# prepare function argument(s)
|
||||
var_order_id <- "order_id_example" # character | ID of the order that needs to be deleted
|
||||
|
||||
# Delete purchase order by ID
|
||||
api_instance <- StoreApi$new()
|
||||
result <- tryCatch(
|
||||
api_instance$delete_order(var_order_id),
|
||||
@ -75,8 +77,9 @@ Returns a map of status codes to quantities
|
||||
```R
|
||||
library(petstore)
|
||||
|
||||
|
||||
# Returns pet inventories by status
|
||||
#
|
||||
|
||||
api_instance <- StoreApi$new()
|
||||
# Configure API key authorization: api_key
|
||||
api_instance$api_client$api_keys["api_key"] <- Sys.getenv("API_KEY")
|
||||
@ -132,9 +135,11 @@ For valid response try integer IDs with value <= 5 or > 10. Other values will ge
|
||||
```R
|
||||
library(petstore)
|
||||
|
||||
# Find purchase order by ID
|
||||
#
|
||||
# prepare function argument(s)
|
||||
var_order_id <- 56 # integer | ID of pet that needs to be fetched
|
||||
|
||||
# Find purchase order by ID
|
||||
api_instance <- StoreApi$new()
|
||||
result <- tryCatch(
|
||||
# to save the result into a file, simply add the optional `data_file` parameter, e.g.
|
||||
@ -193,9 +198,11 @@ Place an order for a pet
|
||||
```R
|
||||
library(petstore)
|
||||
|
||||
# Place an order for a pet
|
||||
#
|
||||
# prepare function argument(s)
|
||||
var_order <- Order$new(123, 123, 123, "shipDate_example", "placed", "complete_example") # Order | order placed for purchasing the pet
|
||||
|
||||
# Place an order for a pet
|
||||
api_instance <- StoreApi$new()
|
||||
result <- tryCatch(
|
||||
# to save the result into a file, simply add the optional `data_file` parameter, e.g.
|
||||
|
@ -25,9 +25,11 @@ This can only be done by the logged in user.
|
||||
```R
|
||||
library(petstore)
|
||||
|
||||
# Create user
|
||||
#
|
||||
# prepare function argument(s)
|
||||
var_user <- User$new(123, "username_example", "firstName_example", "lastName_example", "email_example", "password_example", "phone_example", 123) # User | Created user object
|
||||
|
||||
# Create user
|
||||
api_instance <- UserApi$new()
|
||||
# Configure API key authorization: api_key
|
||||
api_instance$api_client$api_keys["api_key"] <- Sys.getenv("API_KEY")
|
||||
@ -80,9 +82,11 @@ Creates list of users with given input array
|
||||
```R
|
||||
library(petstore)
|
||||
|
||||
# Creates list of users with given input array
|
||||
#
|
||||
# prepare function argument(s)
|
||||
var_user <- list(User$new(123, "username_example", "firstName_example", "lastName_example", "email_example", "password_example", "phone_example", 123)) # array[User] | List of user object
|
||||
|
||||
# Creates list of users with given input array
|
||||
api_instance <- UserApi$new()
|
||||
# Configure API key authorization: api_key
|
||||
api_instance$api_client$api_keys["api_key"] <- Sys.getenv("API_KEY")
|
||||
@ -135,9 +139,11 @@ Creates list of users with given input array
|
||||
```R
|
||||
library(petstore)
|
||||
|
||||
# Creates list of users with given input array
|
||||
#
|
||||
# prepare function argument(s)
|
||||
var_user <- list(User$new(123, "username_example", "firstName_example", "lastName_example", "email_example", "password_example", "phone_example", 123)) # array[User] | List of user object
|
||||
|
||||
# Creates list of users with given input array
|
||||
api_instance <- UserApi$new()
|
||||
# Configure API key authorization: api_key
|
||||
api_instance$api_client$api_keys["api_key"] <- Sys.getenv("API_KEY")
|
||||
@ -190,9 +196,11 @@ This can only be done by the logged in user.
|
||||
```R
|
||||
library(petstore)
|
||||
|
||||
# Delete user
|
||||
#
|
||||
# prepare function argument(s)
|
||||
var_username <- "username_example" # character | The name that needs to be deleted
|
||||
|
||||
# Delete user
|
||||
api_instance <- UserApi$new()
|
||||
# Configure API key authorization: api_key
|
||||
api_instance$api_client$api_keys["api_key"] <- Sys.getenv("API_KEY")
|
||||
@ -246,9 +254,11 @@ Get user by user name
|
||||
```R
|
||||
library(petstore)
|
||||
|
||||
# Get user by user name
|
||||
#
|
||||
# prepare function argument(s)
|
||||
var_username <- "username_example" # character | The name that needs to be fetched. Use user1 for testing.
|
||||
|
||||
# Get user by user name
|
||||
api_instance <- UserApi$new()
|
||||
result <- tryCatch(
|
||||
# to save the result into a file, simply add the optional `data_file` parameter, e.g.
|
||||
@ -307,10 +317,12 @@ Logs user into the system
|
||||
```R
|
||||
library(petstore)
|
||||
|
||||
# Logs user into the system
|
||||
#
|
||||
# prepare function argument(s)
|
||||
var_username <- "username_example" # character | The user name for login
|
||||
var_password <- "password_example" # character | The password for login in clear text
|
||||
|
||||
# Logs user into the system
|
||||
api_instance <- UserApi$new()
|
||||
result <- tryCatch(
|
||||
# to save the result into a file, simply add the optional `data_file` parameter, e.g.
|
||||
@ -369,8 +381,9 @@ Logs out current logged in user session
|
||||
```R
|
||||
library(petstore)
|
||||
|
||||
|
||||
# Logs out current logged in user session
|
||||
#
|
||||
|
||||
api_instance <- UserApi$new()
|
||||
# Configure API key authorization: api_key
|
||||
api_instance$api_client$api_keys["api_key"] <- Sys.getenv("API_KEY")
|
||||
@ -420,10 +433,12 @@ This can only be done by the logged in user.
|
||||
```R
|
||||
library(petstore)
|
||||
|
||||
# Updated user
|
||||
#
|
||||
# prepare function argument(s)
|
||||
var_username <- "username_example" # character | name that need to be deleted
|
||||
var_user <- User$new(123, "username_example", "firstName_example", "lastName_example", "email_example", "password_example", "phone_example", 123) # User | Updated user object
|
||||
|
||||
# Updated user
|
||||
api_instance <- UserApi$new()
|
||||
# Configure API key authorization: api_key
|
||||
api_instance$api_client$api_keys["api_key"] <- Sys.getenv("API_KEY")
|
||||
|
@ -4,7 +4,7 @@
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**type** | **character** | | [optional]
|
||||
**type** | **character** | | [optional] [Enum: [plains, mountain, grevys]]
|
||||
**className** | **character** | |
|
||||
|
||||
|
||||
|
@ -5,6 +5,6 @@
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**className** | **character** | |
|
||||
**color** | **character** | | [optional] [default to "red"]
|
||||
**color** | **character** | | [optional] [default to "red"]
|
||||
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**className** | **character** | |
|
||||
**color** | **character** | | [optional] [default to "red"]
|
||||
**color** | **character** | | [optional] [default to "red"]
|
||||
**declawed** | **character** | | [optional]
|
||||
|
||||
|
||||
|
@ -6,6 +6,6 @@ A category for a pet
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **integer** | | [optional]
|
||||
**name** | **character** | | [optional]
|
||||
**name** | **character** | | [optional] [Pattern: ^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$]
|
||||
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**className** | **character** | |
|
||||
**color** | **character** | | [optional] [default to "red"]
|
||||
**color** | **character** | | [optional] [default to "red"]
|
||||
**breed** | **character** | | [optional]
|
||||
|
||||
|
||||
|
@ -20,10 +20,12 @@ test data_file to ensure it's escaped correctly
|
||||
```R
|
||||
library(petstore)
|
||||
|
||||
# test data_file to ensure it's escaped correctly
|
||||
#
|
||||
# prepare function argument(s)
|
||||
var_dummy <- "dummy_example" # character | dummy required parameter
|
||||
var_var_data_file <- "var_data_file_example" # character | header data file (Optional)
|
||||
|
||||
# test data_file to ensure it's escaped correctly
|
||||
api_instance <- FakeApi$new()
|
||||
result <- tryCatch(
|
||||
# to save the result into a file, simply add the optional `data_file` parameter, e.g.
|
||||
@ -81,9 +83,11 @@ test regular expression to ensure no exception
|
||||
```R
|
||||
library(petstore)
|
||||
|
||||
# test regular expression to ensure no exception
|
||||
#
|
||||
# prepare function argument(s)
|
||||
var_reg_exp_test <- "reg_exp_test_example" # character | dummy required parameter
|
||||
|
||||
# test regular expression to ensure no exception
|
||||
api_instance <- FakeApi$new()
|
||||
result <- tryCatch(
|
||||
api_instance$FakeRegularExpression(var_reg_exp_test),
|
||||
@ -134,10 +138,12 @@ test set query parameter
|
||||
```R
|
||||
library(petstore)
|
||||
|
||||
# test set query parameter
|
||||
#
|
||||
# prepare function argument(s)
|
||||
var_set_dummy <- list("inner_example") # set[character] | set query
|
||||
var_array_dummy <- list("inner_example") # array[character] | array query
|
||||
|
||||
# test set query parameter
|
||||
api_instance <- FakeApi$new()
|
||||
result <- tryCatch(
|
||||
api_instance$FakeSetQuery(var_set_dummy, var_array_dummy),
|
||||
|
@ -7,6 +7,6 @@ Name | Type | Description | Notes
|
||||
**hasBaleen** | **character** | | [optional]
|
||||
**hasTeeth** | **character** | | [optional]
|
||||
**className** | **character** | |
|
||||
**type** | **character** | | [optional]
|
||||
**type** | **character** | | [optional] [Enum: [plains, mountain, grevys]]
|
||||
|
||||
|
||||
|
@ -9,7 +9,7 @@ Name | Type | Description | Notes
|
||||
**petId** | **integer** | | [optional]
|
||||
**quantity** | **integer** | | [optional]
|
||||
**shipDate** | **character** | | [optional]
|
||||
**status** | **character** | Order Status | [optional]
|
||||
**complete** | **character** | | [optional] [default to FALSE]
|
||||
**status** | **character** | Order Status | [optional] [Enum: [placed, approved, delivered]]
|
||||
**complete** | **character** | | [optional] [default to FALSE]
|
||||
|
||||
|
||||
|
@ -10,6 +10,6 @@ Name | Type | Description | Notes
|
||||
**name** | **character** | |
|
||||
**photoUrls** | **array[character]** | |
|
||||
**tags** | [**array[Tag]**](Tag.md) | | [optional]
|
||||
**status** | **character** | pet status in the store | [optional]
|
||||
**status** | **character** | pet status in the store | [optional] [Enum: [available, pending, sold]]
|
||||
|
||||
|
||||
|
@ -27,9 +27,11 @@ Add a new pet to the store
|
||||
```R
|
||||
library(petstore)
|
||||
|
||||
# Add a new pet to the store
|
||||
#
|
||||
# prepare function argument(s)
|
||||
var_pet <- Pet$new("name_example", list("photoUrls_example"), 123, Category$new(123, "name_example"), list(Tag$new(123, "name_example")), "available") # Pet | Pet object that needs to be added to the store
|
||||
|
||||
# Add a new pet to the store
|
||||
api_instance <- PetApi$new()
|
||||
# Configure HTTP basic authorization: http_auth
|
||||
api_instance$api_client$username <- Sys.getenv("USERNAME")
|
||||
@ -90,10 +92,12 @@ Deletes a pet
|
||||
```R
|
||||
library(petstore)
|
||||
|
||||
# Deletes a pet
|
||||
#
|
||||
# prepare function argument(s)
|
||||
var_pet_id <- 56 # integer | Pet id to delete
|
||||
var_api_key <- "api_key_example" # character | (Optional)
|
||||
|
||||
# Deletes a pet
|
||||
api_instance <- PetApi$new()
|
||||
# Configure OAuth2 access token for authorization: petstore_auth
|
||||
api_instance$api_client$access_token <- Sys.getenv("ACCESS_TOKEN")
|
||||
@ -147,9 +151,11 @@ Multiple status values can be provided with comma separated strings
|
||||
```R
|
||||
library(petstore)
|
||||
|
||||
# Finds Pets by status
|
||||
#
|
||||
# prepare function argument(s)
|
||||
var_status <- list("available") # array[character] | Status values that need to be considered for filter
|
||||
|
||||
# Finds Pets by status
|
||||
api_instance <- PetApi$new()
|
||||
# Configure OAuth2 access token for authorization: petstore_auth
|
||||
api_instance$api_client$access_token <- Sys.getenv("ACCESS_TOKEN")
|
||||
@ -209,9 +215,11 @@ Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3
|
||||
```R
|
||||
library(petstore)
|
||||
|
||||
# Finds Pets by tags
|
||||
#
|
||||
# prepare function argument(s)
|
||||
var_tags <- list("inner_example") # array[character] | Tags to filter by
|
||||
|
||||
# Finds Pets by tags
|
||||
api_instance <- PetApi$new()
|
||||
result <- tryCatch(
|
||||
# to save the result into a file, simply add the optional `data_file` parameter, e.g.
|
||||
@ -269,9 +277,11 @@ Returns a single pet
|
||||
```R
|
||||
library(petstore)
|
||||
|
||||
# Find pet by ID
|
||||
#
|
||||
# prepare function argument(s)
|
||||
var_pet_id <- 56 # integer | ID of pet to return
|
||||
|
||||
# Find pet by ID
|
||||
api_instance <- PetApi$new()
|
||||
# Configure HTTP bearer authorization: BearerToken
|
||||
api_instance$api_client$bearer_token <- Sys.getenv("BEARER_TOKEN")
|
||||
@ -332,9 +342,11 @@ Returns a single pet
|
||||
```R
|
||||
library(petstore)
|
||||
|
||||
# Find pet by ID (streaming)
|
||||
#
|
||||
# prepare function argument(s)
|
||||
var_pet_id <- 56 # integer | ID of pet to return
|
||||
|
||||
# Find pet by ID (streaming)
|
||||
api_instance <- PetApi$new()
|
||||
# Configure API key authorization: api_key
|
||||
api_instance$api_client$api_keys["api_key"] <- Sys.getenv("API_KEY")
|
||||
@ -397,9 +409,11 @@ Header test
|
||||
```R
|
||||
library(petstore)
|
||||
|
||||
# Header test
|
||||
#
|
||||
# prepare function argument(s)
|
||||
var_header_test_int <- 56 # integer | header test int
|
||||
|
||||
# Header test
|
||||
api_instance <- PetApi$new()
|
||||
# Configure API key authorization: api_key
|
||||
api_instance$api_client$api_keys["api_key"] <- Sys.getenv("API_KEY")
|
||||
@ -462,9 +476,11 @@ Update an existing pet
|
||||
```R
|
||||
library(petstore)
|
||||
|
||||
# Update an existing pet
|
||||
#
|
||||
# prepare function argument(s)
|
||||
var_pet <- Pet$new("name_example", list("photoUrls_example"), 123, Category$new(123, "name_example"), list(Tag$new(123, "name_example")), "available") # Pet | Pet object that needs to be added to the store
|
||||
|
||||
# Update an existing pet
|
||||
api_instance <- PetApi$new()
|
||||
# Configure OAuth2 access token for authorization: petstore_auth
|
||||
api_instance$api_client$access_token <- Sys.getenv("ACCESS_TOKEN")
|
||||
@ -526,11 +542,13 @@ Updates a pet in the store with form data
|
||||
```R
|
||||
library(petstore)
|
||||
|
||||
# Updates a pet in the store with form data
|
||||
#
|
||||
# prepare function argument(s)
|
||||
var_pet_id <- 56 # integer | ID of pet that needs to be updated
|
||||
var_name <- "name_example" # character | Updated name of the pet (Optional)
|
||||
var_status <- "status_example" # character | Updated status of the pet (Optional)
|
||||
|
||||
# Updates a pet in the store with form data
|
||||
api_instance <- PetApi$new()
|
||||
result <- tryCatch(
|
||||
api_instance$UpdatePetWithForm(var_pet_id, name = var_name, status = var_status),
|
||||
@ -583,11 +601,13 @@ uploads an image
|
||||
```R
|
||||
library(petstore)
|
||||
|
||||
# uploads an image
|
||||
#
|
||||
# prepare function argument(s)
|
||||
var_pet_id <- 56 # integer | ID of pet to update
|
||||
var_additional_metadata <- "additional_metadata_example" # character | Additional data to pass to server (Optional)
|
||||
var_file <- File.new('/path/to/file') # data.frame | file to upload (Optional)
|
||||
|
||||
# uploads an image
|
||||
api_instance <- PetApi$new()
|
||||
# Configure OAuth2 access token for authorization: petstore_auth
|
||||
api_instance$api_client$access_token <- Sys.getenv("ACCESS_TOKEN")
|
||||
|
@ -21,9 +21,11 @@ For valid response try integer IDs with value < 1000. Anything above 1000 or non
|
||||
```R
|
||||
library(petstore)
|
||||
|
||||
# Delete purchase order by ID
|
||||
#
|
||||
# prepare function argument(s)
|
||||
var_order_id <- "order_id_example" # character | ID of the order that needs to be deleted
|
||||
|
||||
# Delete purchase order by ID
|
||||
api_instance <- StoreApi$new()
|
||||
result <- tryCatch(
|
||||
api_instance$DeleteOrder(var_order_id),
|
||||
@ -75,8 +77,9 @@ Returns a map of status codes to quantities
|
||||
```R
|
||||
library(petstore)
|
||||
|
||||
|
||||
# Returns pet inventories by status
|
||||
#
|
||||
|
||||
api_instance <- StoreApi$new()
|
||||
# Configure API key authorization: api_key
|
||||
api_instance$api_client$api_keys["api_key"] <- Sys.getenv("API_KEY")
|
||||
@ -132,9 +135,11 @@ For valid response try integer IDs with value <= 5 or > 10. Other values will ge
|
||||
```R
|
||||
library(petstore)
|
||||
|
||||
# Find purchase order by ID
|
||||
#
|
||||
# prepare function argument(s)
|
||||
var_order_id <- 56 # integer | ID of pet that needs to be fetched
|
||||
|
||||
# Find purchase order by ID
|
||||
api_instance <- StoreApi$new()
|
||||
result <- tryCatch(
|
||||
# to save the result into a file, simply add the optional `data_file` parameter, e.g.
|
||||
@ -193,9 +198,11 @@ Place an order for a pet
|
||||
```R
|
||||
library(petstore)
|
||||
|
||||
# Place an order for a pet
|
||||
#
|
||||
# prepare function argument(s)
|
||||
var_order <- Order$new(123, 123, 123, "shipDate_example", "placed", "complete_example") # Order | order placed for purchasing the pet
|
||||
|
||||
# Place an order for a pet
|
||||
api_instance <- StoreApi$new()
|
||||
result <- tryCatch(
|
||||
# to save the result into a file, simply add the optional `data_file` parameter, e.g.
|
||||
|
@ -25,9 +25,11 @@ This can only be done by the logged in user.
|
||||
```R
|
||||
library(petstore)
|
||||
|
||||
# Create user
|
||||
#
|
||||
# prepare function argument(s)
|
||||
var_user <- User$new(123, "username_example", "firstName_example", "lastName_example", "email_example", "password_example", "phone_example", 123) # User | Created user object
|
||||
|
||||
# Create user
|
||||
api_instance <- UserApi$new()
|
||||
# Configure API key authorization: api_key
|
||||
api_instance$api_client$api_keys["api_key"] <- Sys.getenv("API_KEY")
|
||||
@ -80,9 +82,11 @@ Creates list of users with given input array
|
||||
```R
|
||||
library(petstore)
|
||||
|
||||
# Creates list of users with given input array
|
||||
#
|
||||
# prepare function argument(s)
|
||||
var_user <- list(User$new(123, "username_example", "firstName_example", "lastName_example", "email_example", "password_example", "phone_example", 123)) # array[User] | List of user object
|
||||
|
||||
# Creates list of users with given input array
|
||||
api_instance <- UserApi$new()
|
||||
# Configure API key authorization: api_key
|
||||
api_instance$api_client$api_keys["api_key"] <- Sys.getenv("API_KEY")
|
||||
@ -135,9 +139,11 @@ Creates list of users with given input array
|
||||
```R
|
||||
library(petstore)
|
||||
|
||||
# Creates list of users with given input array
|
||||
#
|
||||
# prepare function argument(s)
|
||||
var_user <- list(User$new(123, "username_example", "firstName_example", "lastName_example", "email_example", "password_example", "phone_example", 123)) # array[User] | List of user object
|
||||
|
||||
# Creates list of users with given input array
|
||||
api_instance <- UserApi$new()
|
||||
# Configure API key authorization: api_key
|
||||
api_instance$api_client$api_keys["api_key"] <- Sys.getenv("API_KEY")
|
||||
@ -190,9 +196,11 @@ This can only be done by the logged in user.
|
||||
```R
|
||||
library(petstore)
|
||||
|
||||
# Delete user
|
||||
#
|
||||
# prepare function argument(s)
|
||||
var_username <- "username_example" # character | The name that needs to be deleted
|
||||
|
||||
# Delete user
|
||||
api_instance <- UserApi$new()
|
||||
# Configure API key authorization: api_key
|
||||
api_instance$api_client$api_keys["api_key"] <- Sys.getenv("API_KEY")
|
||||
@ -246,9 +254,11 @@ Get user by user name
|
||||
```R
|
||||
library(petstore)
|
||||
|
||||
# Get user by user name
|
||||
#
|
||||
# prepare function argument(s)
|
||||
var_username <- "username_example" # character | The name that needs to be fetched. Use user1 for testing.
|
||||
|
||||
# Get user by user name
|
||||
api_instance <- UserApi$new()
|
||||
result <- tryCatch(
|
||||
# to save the result into a file, simply add the optional `data_file` parameter, e.g.
|
||||
@ -307,10 +317,12 @@ Logs user into the system
|
||||
```R
|
||||
library(petstore)
|
||||
|
||||
# Logs user into the system
|
||||
#
|
||||
# prepare function argument(s)
|
||||
var_username <- "username_example" # character | The user name for login
|
||||
var_password <- "password_example" # character | The password for login in clear text
|
||||
|
||||
# Logs user into the system
|
||||
api_instance <- UserApi$new()
|
||||
result <- tryCatch(
|
||||
# to save the result into a file, simply add the optional `data_file` parameter, e.g.
|
||||
@ -369,8 +381,9 @@ Logs out current logged in user session
|
||||
```R
|
||||
library(petstore)
|
||||
|
||||
|
||||
# Logs out current logged in user session
|
||||
#
|
||||
|
||||
api_instance <- UserApi$new()
|
||||
# Configure API key authorization: api_key
|
||||
api_instance$api_client$api_keys["api_key"] <- Sys.getenv("API_KEY")
|
||||
@ -420,10 +433,12 @@ This can only be done by the logged in user.
|
||||
```R
|
||||
library(petstore)
|
||||
|
||||
# Updated user
|
||||
#
|
||||
# prepare function argument(s)
|
||||
var_username <- "username_example" # character | name that need to be deleted
|
||||
var_user <- User$new(123, "username_example", "firstName_example", "lastName_example", "email_example", "password_example", "phone_example", 123) # User | Updated user object
|
||||
|
||||
# Updated user
|
||||
api_instance <- UserApi$new()
|
||||
# Configure API key authorization: api_key
|
||||
api_instance$api_client$api_keys["api_key"] <- Sys.getenv("API_KEY")
|
||||
|
@ -4,7 +4,7 @@
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**type** | **character** | | [optional]
|
||||
**type** | **character** | | [optional] [Enum: [plains, mountain, grevys]]
|
||||
**className** | **character** | |
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user