From 863dbc7c3ee39af1ac931d2949388f7f84896ec4 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Sat, 17 Sep 2022 14:59:02 +0800 Subject: [PATCH] r better doc (#13447) --- .../src/main/resources/r/api_doc.mustache | 20 ++++++---- .../src/main/resources/r/model_doc.mustache | 2 +- .../petstore/R-httr2-wrapper/docs/Animal.md | 2 +- .../petstore/R-httr2-wrapper/docs/Cat.md | 2 +- .../petstore/R-httr2-wrapper/docs/Category.md | 2 +- .../petstore/R-httr2-wrapper/docs/Dog.md | 2 +- .../petstore/R-httr2-wrapper/docs/FakeApi.md | 12 ++++-- .../petstore/R-httr2-wrapper/docs/Mammal.md | 2 +- .../petstore/R-httr2-wrapper/docs/Order.md | 4 +- .../petstore/R-httr2-wrapper/docs/Pet.md | 2 +- .../petstore/R-httr2-wrapper/docs/PetApi.md | 40 ++++++++++++++----- .../petstore/R-httr2-wrapper/docs/StoreApi.md | 15 +++++-- .../petstore/R-httr2-wrapper/docs/UserApi.md | 31 ++++++++++---- .../petstore/R-httr2-wrapper/docs/Zebra.md | 2 +- .../client/petstore/R-httr2/docs/Animal.md | 2 +- samples/client/petstore/R-httr2/docs/Cat.md | 2 +- .../client/petstore/R-httr2/docs/Category.md | 2 +- samples/client/petstore/R-httr2/docs/Dog.md | 2 +- .../client/petstore/R-httr2/docs/FakeApi.md | 12 ++++-- .../client/petstore/R-httr2/docs/Mammal.md | 2 +- samples/client/petstore/R-httr2/docs/Order.md | 4 +- samples/client/petstore/R-httr2/docs/Pet.md | 2 +- .../client/petstore/R-httr2/docs/PetApi.md | 40 ++++++++++++++----- .../client/petstore/R-httr2/docs/StoreApi.md | 15 +++++-- .../client/petstore/R-httr2/docs/UserApi.md | 31 ++++++++++---- samples/client/petstore/R-httr2/docs/Zebra.md | 2 +- samples/client/petstore/R/docs/Animal.md | 2 +- samples/client/petstore/R/docs/Cat.md | 2 +- samples/client/petstore/R/docs/Category.md | 2 +- samples/client/petstore/R/docs/Dog.md | 2 +- samples/client/petstore/R/docs/FakeApi.md | 12 ++++-- samples/client/petstore/R/docs/Mammal.md | 2 +- samples/client/petstore/R/docs/Order.md | 4 +- samples/client/petstore/R/docs/Pet.md | 2 +- samples/client/petstore/R/docs/PetApi.md | 40 ++++++++++++++----- samples/client/petstore/R/docs/StoreApi.md | 15 +++++-- samples/client/petstore/R/docs/UserApi.md | 31 ++++++++++---- samples/client/petstore/R/docs/Zebra.md | 2 +- 38 files changed, 259 insertions(+), 111 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/r/api_doc.mustache b/modules/openapi-generator/src/main/resources/r/api_doc.mustache index 632dadf874c3..f75f21193ecd 100644 --- a/modules/openapi-generator/src/main/resources/r/api_doc.mustache +++ b/modules/openapi-generator/src/main/resources/r/api_doc.mustache @@ -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}} diff --git a/modules/openapi-generator/src/main/resources/r/model_doc.mustache b/modules/openapi-generator/src/main/resources/r/model_doc.mustache index c6ba5702e711..c0c8f5b7dfc0 100644 --- a/modules/openapi-generator/src/main/resources/r/model_doc.mustache +++ b/modules/openapi-generator/src/main/resources/r/model_doc.mustache @@ -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}} diff --git a/samples/client/petstore/R-httr2-wrapper/docs/Animal.md b/samples/client/petstore/R-httr2-wrapper/docs/Animal.md index 5cb0eb8bbf27..21af972e0f0d 100644 --- a/samples/client/petstore/R-httr2-wrapper/docs/Animal.md +++ b/samples/client/petstore/R-httr2-wrapper/docs/Animal.md @@ -5,6 +5,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **className** | **character** | | -**color** | **character** | | [optional] [default to "red"] +**color** | **character** | | [optional] [default to "red"] diff --git a/samples/client/petstore/R-httr2-wrapper/docs/Cat.md b/samples/client/petstore/R-httr2-wrapper/docs/Cat.md index ba23ea86a33e..9a717492c09c 100644 --- a/samples/client/petstore/R-httr2-wrapper/docs/Cat.md +++ b/samples/client/petstore/R-httr2-wrapper/docs/Cat.md @@ -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] diff --git a/samples/client/petstore/R-httr2-wrapper/docs/Category.md b/samples/client/petstore/R-httr2-wrapper/docs/Category.md index 7fa99ae82e0f..41b20285b80a 100644 --- a/samples/client/petstore/R-httr2-wrapper/docs/Category.md +++ b/samples/client/petstore/R-httr2-wrapper/docs/Category.md @@ -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]+$] diff --git a/samples/client/petstore/R-httr2-wrapper/docs/Dog.md b/samples/client/petstore/R-httr2-wrapper/docs/Dog.md index b2e732df451b..6893a5e18efc 100644 --- a/samples/client/petstore/R-httr2-wrapper/docs/Dog.md +++ b/samples/client/petstore/R-httr2-wrapper/docs/Dog.md @@ -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] diff --git a/samples/client/petstore/R-httr2-wrapper/docs/FakeApi.md b/samples/client/petstore/R-httr2-wrapper/docs/FakeApi.md index 4c565e28194c..a5a5cae74c1c 100644 --- a/samples/client/petstore/R-httr2-wrapper/docs/FakeApi.md +++ b/samples/client/petstore/R-httr2-wrapper/docs/FakeApi.md @@ -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), diff --git a/samples/client/petstore/R-httr2-wrapper/docs/Mammal.md b/samples/client/petstore/R-httr2-wrapper/docs/Mammal.md index d9746cd2df19..a2835af3f4f7 100644 --- a/samples/client/petstore/R-httr2-wrapper/docs/Mammal.md +++ b/samples/client/petstore/R-httr2-wrapper/docs/Mammal.md @@ -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]] diff --git a/samples/client/petstore/R-httr2-wrapper/docs/Order.md b/samples/client/petstore/R-httr2-wrapper/docs/Order.md index 2e41a351352b..85860b2fb896 100644 --- a/samples/client/petstore/R-httr2-wrapper/docs/Order.md +++ b/samples/client/petstore/R-httr2-wrapper/docs/Order.md @@ -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] diff --git a/samples/client/petstore/R-httr2-wrapper/docs/Pet.md b/samples/client/petstore/R-httr2-wrapper/docs/Pet.md index 63021a8294ad..29186b2a14a3 100644 --- a/samples/client/petstore/R-httr2-wrapper/docs/Pet.md +++ b/samples/client/petstore/R-httr2-wrapper/docs/Pet.md @@ -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]] diff --git a/samples/client/petstore/R-httr2-wrapper/docs/PetApi.md b/samples/client/petstore/R-httr2-wrapper/docs/PetApi.md index db8aa8d7a6aa..c7cc5d956964 100644 --- a/samples/client/petstore/R-httr2-wrapper/docs/PetApi.md +++ b/samples/client/petstore/R-httr2-wrapper/docs/PetApi.md @@ -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") diff --git a/samples/client/petstore/R-httr2-wrapper/docs/StoreApi.md b/samples/client/petstore/R-httr2-wrapper/docs/StoreApi.md index 3933cdb256d7..91cfa8e765d0 100644 --- a/samples/client/petstore/R-httr2-wrapper/docs/StoreApi.md +++ b/samples/client/petstore/R-httr2-wrapper/docs/StoreApi.md @@ -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. diff --git a/samples/client/petstore/R-httr2-wrapper/docs/UserApi.md b/samples/client/petstore/R-httr2-wrapper/docs/UserApi.md index da8f0201268c..4417f05e9b99 100644 --- a/samples/client/petstore/R-httr2-wrapper/docs/UserApi.md +++ b/samples/client/petstore/R-httr2-wrapper/docs/UserApi.md @@ -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") diff --git a/samples/client/petstore/R-httr2-wrapper/docs/Zebra.md b/samples/client/petstore/R-httr2-wrapper/docs/Zebra.md index 84e4d20ce941..51b709412621 100644 --- a/samples/client/petstore/R-httr2-wrapper/docs/Zebra.md +++ b/samples/client/petstore/R-httr2-wrapper/docs/Zebra.md @@ -4,7 +4,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**type** | **character** | | [optional] +**type** | **character** | | [optional] [Enum: [plains, mountain, grevys]] **className** | **character** | | diff --git a/samples/client/petstore/R-httr2/docs/Animal.md b/samples/client/petstore/R-httr2/docs/Animal.md index 5cb0eb8bbf27..21af972e0f0d 100644 --- a/samples/client/petstore/R-httr2/docs/Animal.md +++ b/samples/client/petstore/R-httr2/docs/Animal.md @@ -5,6 +5,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **className** | **character** | | -**color** | **character** | | [optional] [default to "red"] +**color** | **character** | | [optional] [default to "red"] diff --git a/samples/client/petstore/R-httr2/docs/Cat.md b/samples/client/petstore/R-httr2/docs/Cat.md index ba23ea86a33e..9a717492c09c 100644 --- a/samples/client/petstore/R-httr2/docs/Cat.md +++ b/samples/client/petstore/R-httr2/docs/Cat.md @@ -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] diff --git a/samples/client/petstore/R-httr2/docs/Category.md b/samples/client/petstore/R-httr2/docs/Category.md index 7fa99ae82e0f..41b20285b80a 100644 --- a/samples/client/petstore/R-httr2/docs/Category.md +++ b/samples/client/petstore/R-httr2/docs/Category.md @@ -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]+$] diff --git a/samples/client/petstore/R-httr2/docs/Dog.md b/samples/client/petstore/R-httr2/docs/Dog.md index b2e732df451b..6893a5e18efc 100644 --- a/samples/client/petstore/R-httr2/docs/Dog.md +++ b/samples/client/petstore/R-httr2/docs/Dog.md @@ -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] diff --git a/samples/client/petstore/R-httr2/docs/FakeApi.md b/samples/client/petstore/R-httr2/docs/FakeApi.md index e78e99db5b54..9ed020060266 100644 --- a/samples/client/petstore/R-httr2/docs/FakeApi.md +++ b/samples/client/petstore/R-httr2/docs/FakeApi.md @@ -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), diff --git a/samples/client/petstore/R-httr2/docs/Mammal.md b/samples/client/petstore/R-httr2/docs/Mammal.md index d9746cd2df19..a2835af3f4f7 100644 --- a/samples/client/petstore/R-httr2/docs/Mammal.md +++ b/samples/client/petstore/R-httr2/docs/Mammal.md @@ -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]] diff --git a/samples/client/petstore/R-httr2/docs/Order.md b/samples/client/petstore/R-httr2/docs/Order.md index 2e41a351352b..85860b2fb896 100644 --- a/samples/client/petstore/R-httr2/docs/Order.md +++ b/samples/client/petstore/R-httr2/docs/Order.md @@ -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] diff --git a/samples/client/petstore/R-httr2/docs/Pet.md b/samples/client/petstore/R-httr2/docs/Pet.md index 63021a8294ad..29186b2a14a3 100644 --- a/samples/client/petstore/R-httr2/docs/Pet.md +++ b/samples/client/petstore/R-httr2/docs/Pet.md @@ -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]] diff --git a/samples/client/petstore/R-httr2/docs/PetApi.md b/samples/client/petstore/R-httr2/docs/PetApi.md index 64b08e54db09..26936a4b787f 100644 --- a/samples/client/petstore/R-httr2/docs/PetApi.md +++ b/samples/client/petstore/R-httr2/docs/PetApi.md @@ -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") diff --git a/samples/client/petstore/R-httr2/docs/StoreApi.md b/samples/client/petstore/R-httr2/docs/StoreApi.md index 454f019b4d8f..c0453bb3610c 100644 --- a/samples/client/petstore/R-httr2/docs/StoreApi.md +++ b/samples/client/petstore/R-httr2/docs/StoreApi.md @@ -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. diff --git a/samples/client/petstore/R-httr2/docs/UserApi.md b/samples/client/petstore/R-httr2/docs/UserApi.md index beba3ffadcae..7bb012fd1b47 100644 --- a/samples/client/petstore/R-httr2/docs/UserApi.md +++ b/samples/client/petstore/R-httr2/docs/UserApi.md @@ -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") diff --git a/samples/client/petstore/R-httr2/docs/Zebra.md b/samples/client/petstore/R-httr2/docs/Zebra.md index 84e4d20ce941..51b709412621 100644 --- a/samples/client/petstore/R-httr2/docs/Zebra.md +++ b/samples/client/petstore/R-httr2/docs/Zebra.md @@ -4,7 +4,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**type** | **character** | | [optional] +**type** | **character** | | [optional] [Enum: [plains, mountain, grevys]] **className** | **character** | | diff --git a/samples/client/petstore/R/docs/Animal.md b/samples/client/petstore/R/docs/Animal.md index 5cb0eb8bbf27..21af972e0f0d 100644 --- a/samples/client/petstore/R/docs/Animal.md +++ b/samples/client/petstore/R/docs/Animal.md @@ -5,6 +5,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **className** | **character** | | -**color** | **character** | | [optional] [default to "red"] +**color** | **character** | | [optional] [default to "red"] diff --git a/samples/client/petstore/R/docs/Cat.md b/samples/client/petstore/R/docs/Cat.md index ba23ea86a33e..9a717492c09c 100644 --- a/samples/client/petstore/R/docs/Cat.md +++ b/samples/client/petstore/R/docs/Cat.md @@ -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] diff --git a/samples/client/petstore/R/docs/Category.md b/samples/client/petstore/R/docs/Category.md index 7fa99ae82e0f..41b20285b80a 100644 --- a/samples/client/petstore/R/docs/Category.md +++ b/samples/client/petstore/R/docs/Category.md @@ -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]+$] diff --git a/samples/client/petstore/R/docs/Dog.md b/samples/client/petstore/R/docs/Dog.md index b2e732df451b..6893a5e18efc 100644 --- a/samples/client/petstore/R/docs/Dog.md +++ b/samples/client/petstore/R/docs/Dog.md @@ -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] diff --git a/samples/client/petstore/R/docs/FakeApi.md b/samples/client/petstore/R/docs/FakeApi.md index fbc398cd8147..1d56f96dcc32 100644 --- a/samples/client/petstore/R/docs/FakeApi.md +++ b/samples/client/petstore/R/docs/FakeApi.md @@ -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), diff --git a/samples/client/petstore/R/docs/Mammal.md b/samples/client/petstore/R/docs/Mammal.md index d9746cd2df19..a2835af3f4f7 100644 --- a/samples/client/petstore/R/docs/Mammal.md +++ b/samples/client/petstore/R/docs/Mammal.md @@ -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]] diff --git a/samples/client/petstore/R/docs/Order.md b/samples/client/petstore/R/docs/Order.md index 2e41a351352b..85860b2fb896 100644 --- a/samples/client/petstore/R/docs/Order.md +++ b/samples/client/petstore/R/docs/Order.md @@ -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] diff --git a/samples/client/petstore/R/docs/Pet.md b/samples/client/petstore/R/docs/Pet.md index 63021a8294ad..29186b2a14a3 100644 --- a/samples/client/petstore/R/docs/Pet.md +++ b/samples/client/petstore/R/docs/Pet.md @@ -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]] diff --git a/samples/client/petstore/R/docs/PetApi.md b/samples/client/petstore/R/docs/PetApi.md index 2dce1e400ddd..c493fe2da37e 100644 --- a/samples/client/petstore/R/docs/PetApi.md +++ b/samples/client/petstore/R/docs/PetApi.md @@ -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") diff --git a/samples/client/petstore/R/docs/StoreApi.md b/samples/client/petstore/R/docs/StoreApi.md index d7e35f1614cc..b58b49eb7629 100644 --- a/samples/client/petstore/R/docs/StoreApi.md +++ b/samples/client/petstore/R/docs/StoreApi.md @@ -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. diff --git a/samples/client/petstore/R/docs/UserApi.md b/samples/client/petstore/R/docs/UserApi.md index b128ef520df5..ffc5e09b9e63 100644 --- a/samples/client/petstore/R/docs/UserApi.md +++ b/samples/client/petstore/R/docs/UserApi.md @@ -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") diff --git a/samples/client/petstore/R/docs/Zebra.md b/samples/client/petstore/R/docs/Zebra.md index 84e4d20ce941..51b709412621 100644 --- a/samples/client/petstore/R/docs/Zebra.md +++ b/samples/client/petstore/R/docs/Zebra.md @@ -4,7 +4,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**type** | **character** | | [optional] +**type** | **character** | | [optional] [Enum: [plains, mountain, grevys]] **className** | **character** | |