forked from loafle/openapi-generator-original
[R] Minor improvements to the documentation (#13226)
* minor improvement to r doc * better scopes
This commit is contained in:
parent
18bb5466bb
commit
ed3666fbde
@ -115,14 +115,20 @@ Class | Method | HTTP request | Description
|
|||||||
- **Refresh URL**: {{refreshUrl}}
|
- **Refresh URL**: {{refreshUrl}}
|
||||||
{{/refreshUrl}}
|
{{/refreshUrl}}
|
||||||
- **Scopes**: {{^scopes}}N/A{{/scopes}}
|
- **Scopes**: {{^scopes}}N/A{{/scopes}}
|
||||||
{{#scopes}} - {{scope}}: {{description}}
|
{{#scopes}} - `{{scope}}`: {{description}}
|
||||||
{{/scopes}}
|
{{/scopes}}
|
||||||
{{/isOAuth}}
|
{{/isOAuth}}
|
||||||
|
|
||||||
{{/authMethods}}
|
{{/authMethods}}
|
||||||
|
|
||||||
|
{{#apiInfo}}
|
||||||
|
{{#apis}}
|
||||||
|
{{#-last}}
|
||||||
|
{{#infoEmail}}
|
||||||
## Author
|
## Author
|
||||||
|
|
||||||
{{#apiInfo}}{{#apis}}{{#-last}}{{infoEmail}}
|
{{{infoEmail}}}
|
||||||
{{/-last}}{{/apis}}{{/apiInfo}}
|
{{/infoEmail}}
|
||||||
|
{{/-last}}
|
||||||
|
{{/apis}}
|
||||||
|
{{/apiInfo}}
|
||||||
|
@ -62,10 +62,10 @@ api_instance$api_client$access_token <- Sys.getenv("ACCESS_TOKEN")
|
|||||||
result <- tryCatch(
|
result <- tryCatch(
|
||||||
{{#returnType}}
|
{{#returnType}}
|
||||||
# to save the result into a file, simply add the optional `data_file` parameter, e.g.
|
# to save the result into a file, simply add the optional `data_file` parameter, e.g.
|
||||||
# api_instance${{{operationId}}}({{#requiredParams}}var_{{{paramName}}}{{^-last}}, {{/-last}}{{/requiredParams}}{{#optionalParams}}{{#-first}}{{#requiredParams.0}}, {{/requiredParams.0}}{{/-first}}{{{paramName}}} = var_{{{paramName}}}{{^-last}}, {{/-last}}{{/optionalParams}}{{#allParams}}{{#-first}}, {{/-first}}{{/allParams}}data_file = "result.txt"),
|
# api_instance{{#generateWrapper}}${{#lambda.snakecase}}{{{classname}}}{{/lambda.snakecase}}{{/generateWrapper}}${{{operationId}}}({{#requiredParams}}var_{{{paramName}}}{{^-last}}, {{/-last}}{{/requiredParams}}{{#optionalParams}}{{#-first}}{{#requiredParams.0}}, {{/requiredParams.0}}{{/-first}}{{{paramName}}} = var_{{{paramName}}}{{^-last}}, {{/-last}}{{/optionalParams}}{{#allParams}}{{#-first}}, {{/-first}}{{/allParams}}data_file = "result.txt"),
|
||||||
{{#vendorExtensions.x-streaming}}
|
{{#vendorExtensions.x-streaming}}
|
||||||
# this endpoint supports data streaming via a callback function using the optional `stream_callback` parameter, e.g.
|
# this endpoint supports data streaming via a callback function using the optional `stream_callback` parameter, e.g.
|
||||||
# api_instance${{{operationId}}}({{#requiredParams}}var_{{{paramName}}}{{^-last}}, {{/-last}}{{/requiredParams}}{{#optionalParams}}{{#-first}}{{#requiredParams.0}}, {{/requiredParams.0}}{{/-first}}{{{paramName}}} = var_{{{paramName}}}{{^-last}}, {{/-last}}{{/optionalParams}}{{#allParams}}{{#-first}}, {{/-first}}{{/allParams}}stream_callback = function(x){ print(length(x)) }),
|
# api_instance{{#generateWrapper}}${{#lambda.snakecase}}{{{classname}}}{{/lambda.snakecase}}{{/generateWrapper}}${{{operationId}}}({{#requiredParams}}var_{{{paramName}}}{{^-last}}, {{/-last}}{{/requiredParams}}{{#optionalParams}}{{#-first}}{{#requiredParams.0}}, {{/requiredParams.0}}{{/-first}}{{{paramName}}} = var_{{{paramName}}}{{^-last}}, {{/-last}}{{/optionalParams}}{{#allParams}}{{#-first}}, {{/-first}}{{/allParams}}stream_callback = function(x){ print(length(x)) }),
|
||||||
{{/vendorExtensions.x-streaming}}
|
{{/vendorExtensions.x-streaming}}
|
||||||
{{/returnType}}
|
{{/returnType}}
|
||||||
api_instance{{#generateWrapper}}${{#lambda.snakecase}}{{{classname}}}{{/lambda.snakecase}}{{/generateWrapper}}${{{operationId}}}({{#requiredParams}}var_{{{paramName}}}{{^-last}}, {{/-last}}{{/requiredParams}}{{#optionalParams}}{{#-first}}{{#requiredParams.0}}, {{/requiredParams.0}}{{/-first}}{{{paramName}}} = var_{{{paramName}}}{{^-last}}, {{/-last}}{{/optionalParams}}),
|
api_instance{{#generateWrapper}}${{#lambda.snakecase}}{{{classname}}}{{/lambda.snakecase}}{{/generateWrapper}}${{{operationId}}}({{#requiredParams}}var_{{{paramName}}}{{^-last}}, {{/-last}}{{/requiredParams}}{{#optionalParams}}{{#-first}}{{#requiredParams.0}}, {{/requiredParams.0}}{{/-first}}{{{paramName}}} = var_{{{paramName}}}{{^-last}}, {{/-last}}{{/optionalParams}}),
|
||||||
|
@ -133,12 +133,7 @@ Class | Method | HTTP request | Description
|
|||||||
- **Flow**: implicit
|
- **Flow**: implicit
|
||||||
- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog
|
- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog
|
||||||
- **Scopes**:
|
- **Scopes**:
|
||||||
- write:pets: modify pets in your account
|
- `write:pets`: modify pets in your account
|
||||||
- read:pets: read your pets
|
- `read:pets`: read your pets
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Author
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ var_var_data_file <- "var_data_file_example" # character | header data file (Opt
|
|||||||
api_instance <- petstore_api$new()
|
api_instance <- petstore_api$new()
|
||||||
result <- tryCatch(
|
result <- tryCatch(
|
||||||
# to save the result into a file, simply add the optional `data_file` parameter, e.g.
|
# to save the result into a file, simply add the optional `data_file` parameter, e.g.
|
||||||
# api_instance$fake_data_file(var_dummy, var_data_file = var_var_data_file, data_file = "result.txt"),
|
# api_instance$fake_api$fake_data_file(var_dummy, var_data_file = var_var_data_file, data_file = "result.txt"),
|
||||||
api_instance$fake_api$fake_data_file(var_dummy, var_data_file = var_var_data_file),
|
api_instance$fake_api$fake_data_file(var_dummy, var_data_file = var_var_data_file),
|
||||||
ApiException = function(ex) ex
|
ApiException = function(ex) ex
|
||||||
)
|
)
|
||||||
|
@ -36,7 +36,7 @@ api_instance$api_client$username <- Sys.getenv("USERNAME")
|
|||||||
api_instance$api_client$password <- Sys.getenv("PASSWORD")
|
api_instance$api_client$password <- Sys.getenv("PASSWORD")
|
||||||
result <- tryCatch(
|
result <- tryCatch(
|
||||||
# to save the result into a file, simply add the optional `data_file` parameter, e.g.
|
# to save the result into a file, simply add the optional `data_file` parameter, e.g.
|
||||||
# api_instance$add_pet(var_pet, data_file = "result.txt"),
|
# api_instance$pet_api$add_pet(var_pet, data_file = "result.txt"),
|
||||||
api_instance$pet_api$add_pet(var_pet),
|
api_instance$pet_api$add_pet(var_pet),
|
||||||
ApiException = function(ex) ex
|
ApiException = function(ex) ex
|
||||||
)
|
)
|
||||||
@ -155,7 +155,7 @@ api_instance <- petstore_api$new()
|
|||||||
api_instance$api_client$access_token <- Sys.getenv("ACCESS_TOKEN")
|
api_instance$api_client$access_token <- Sys.getenv("ACCESS_TOKEN")
|
||||||
result <- tryCatch(
|
result <- tryCatch(
|
||||||
# to save the result into a file, simply add the optional `data_file` parameter, e.g.
|
# to save the result into a file, simply add the optional `data_file` parameter, e.g.
|
||||||
# api_instance$find_pets_by_status(var_status, data_file = "result.txt"),
|
# api_instance$pet_api$find_pets_by_status(var_status, data_file = "result.txt"),
|
||||||
api_instance$pet_api$find_pets_by_status(var_status),
|
api_instance$pet_api$find_pets_by_status(var_status),
|
||||||
ApiException = function(ex) ex
|
ApiException = function(ex) ex
|
||||||
)
|
)
|
||||||
@ -217,7 +217,7 @@ api_instance <- petstore_api$new()
|
|||||||
api_instance$api_client$access_token <- Sys.getenv("ACCESS_TOKEN")
|
api_instance$api_client$access_token <- Sys.getenv("ACCESS_TOKEN")
|
||||||
result <- tryCatch(
|
result <- tryCatch(
|
||||||
# to save the result into a file, simply add the optional `data_file` parameter, e.g.
|
# to save the result into a file, simply add the optional `data_file` parameter, e.g.
|
||||||
# api_instance$find_pets_by_tags(var_tags, data_file = "result.txt"),
|
# api_instance$pet_api$find_pets_by_tags(var_tags, data_file = "result.txt"),
|
||||||
api_instance$pet_api$find_pets_by_tags(var_tags),
|
api_instance$pet_api$find_pets_by_tags(var_tags),
|
||||||
ApiException = function(ex) ex
|
ApiException = function(ex) ex
|
||||||
)
|
)
|
||||||
@ -279,7 +279,7 @@ api_instance <- petstore_api$new()
|
|||||||
api_instance$api_client$bearer_token <- Sys.getenv("BEARER_TOKEN")
|
api_instance$api_client$bearer_token <- Sys.getenv("BEARER_TOKEN")
|
||||||
result <- tryCatch(
|
result <- tryCatch(
|
||||||
# to save the result into a file, simply add the optional `data_file` parameter, e.g.
|
# to save the result into a file, simply add the optional `data_file` parameter, e.g.
|
||||||
# api_instance$get_pet_by_id(var_pet_id, data_file = "result.txt"),
|
# api_instance$pet_api$get_pet_by_id(var_pet_id, data_file = "result.txt"),
|
||||||
api_instance$pet_api$get_pet_by_id(var_pet_id),
|
api_instance$pet_api$get_pet_by_id(var_pet_id),
|
||||||
ApiException = function(ex) ex
|
ApiException = function(ex) ex
|
||||||
)
|
)
|
||||||
@ -342,9 +342,9 @@ api_instance <- petstore_api$new()
|
|||||||
api_instance$api_client$api_keys["api_key"] <- Sys.getenv("API_KEY")
|
api_instance$api_client$api_keys["api_key"] <- Sys.getenv("API_KEY")
|
||||||
result <- tryCatch(
|
result <- tryCatch(
|
||||||
# to save the result into a file, simply add the optional `data_file` parameter, e.g.
|
# to save the result into a file, simply add the optional `data_file` parameter, e.g.
|
||||||
# api_instance$get_pet_by_id_streaming(var_pet_id, data_file = "result.txt"),
|
# api_instance$pet_api$get_pet_by_id_streaming(var_pet_id, data_file = "result.txt"),
|
||||||
# this endpoint supports data streaming via a callback function using the optional `stream_callback` parameter, e.g.
|
# this endpoint supports data streaming via a callback function using the optional `stream_callback` parameter, e.g.
|
||||||
# api_instance$get_pet_by_id_streaming(var_pet_id, stream_callback = function(x){ print(length(x)) }),
|
# api_instance$pet_api$get_pet_by_id_streaming(var_pet_id, stream_callback = function(x){ print(length(x)) }),
|
||||||
api_instance$pet_api$get_pet_by_id_streaming(var_pet_id),
|
api_instance$pet_api$get_pet_by_id_streaming(var_pet_id),
|
||||||
ApiException = function(ex) ex
|
ApiException = function(ex) ex
|
||||||
)
|
)
|
||||||
@ -407,9 +407,9 @@ api_instance <- petstore_api$new()
|
|||||||
api_instance$api_client$api_keys["api_key"] <- Sys.getenv("API_KEY")
|
api_instance$api_client$api_keys["api_key"] <- Sys.getenv("API_KEY")
|
||||||
result <- tryCatch(
|
result <- tryCatch(
|
||||||
# to save the result into a file, simply add the optional `data_file` parameter, e.g.
|
# to save the result into a file, simply add the optional `data_file` parameter, e.g.
|
||||||
# api_instance$test_header(var_header_test_int, data_file = "result.txt"),
|
# api_instance$pet_api$test_header(var_header_test_int, data_file = "result.txt"),
|
||||||
# this endpoint supports data streaming via a callback function using the optional `stream_callback` parameter, e.g.
|
# this endpoint supports data streaming via a callback function using the optional `stream_callback` parameter, e.g.
|
||||||
# api_instance$test_header(var_header_test_int, stream_callback = function(x){ print(length(x)) }),
|
# api_instance$pet_api$test_header(var_header_test_int, stream_callback = function(x){ print(length(x)) }),
|
||||||
api_instance$pet_api$test_header(var_header_test_int),
|
api_instance$pet_api$test_header(var_header_test_int),
|
||||||
ApiException = function(ex) ex
|
ApiException = function(ex) ex
|
||||||
)
|
)
|
||||||
@ -472,7 +472,7 @@ api_instance <- petstore_api$new()
|
|||||||
api_instance$api_client$access_token <- Sys.getenv("ACCESS_TOKEN")
|
api_instance$api_client$access_token <- Sys.getenv("ACCESS_TOKEN")
|
||||||
result <- tryCatch(
|
result <- tryCatch(
|
||||||
# to save the result into a file, simply add the optional `data_file` parameter, e.g.
|
# to save the result into a file, simply add the optional `data_file` parameter, e.g.
|
||||||
# api_instance$update_pet(var_pet, data_file = "result.txt"),
|
# api_instance$pet_api$update_pet(var_pet, data_file = "result.txt"),
|
||||||
api_instance$pet_api$update_pet(var_pet),
|
api_instance$pet_api$update_pet(var_pet),
|
||||||
ApiException = function(ex) ex
|
ApiException = function(ex) ex
|
||||||
)
|
)
|
||||||
@ -595,7 +595,7 @@ api_instance <- petstore_api$new()
|
|||||||
api_instance$api_client$access_token <- Sys.getenv("ACCESS_TOKEN")
|
api_instance$api_client$access_token <- Sys.getenv("ACCESS_TOKEN")
|
||||||
result <- tryCatch(
|
result <- tryCatch(
|
||||||
# to save the result into a file, simply add the optional `data_file` parameter, e.g.
|
# to save the result into a file, simply add the optional `data_file` parameter, e.g.
|
||||||
# api_instance$upload_file(var_pet_id, additional_metadata = var_additional_metadata, file = var_file, data_file = "result.txt"),
|
# api_instance$pet_api$upload_file(var_pet_id, additional_metadata = var_additional_metadata, file = var_file, data_file = "result.txt"),
|
||||||
api_instance$pet_api$upload_file(var_pet_id, additional_metadata = var_additional_metadata, file = var_file),
|
api_instance$pet_api$upload_file(var_pet_id, additional_metadata = var_additional_metadata, file = var_file),
|
||||||
ApiException = function(ex) ex
|
ApiException = function(ex) ex
|
||||||
)
|
)
|
||||||
|
@ -82,7 +82,7 @@ api_instance <- petstore_api$new()
|
|||||||
api_instance$api_client$api_keys["api_key"] <- Sys.getenv("API_KEY")
|
api_instance$api_client$api_keys["api_key"] <- Sys.getenv("API_KEY")
|
||||||
result <- tryCatch(
|
result <- tryCatch(
|
||||||
# to save the result into a file, simply add the optional `data_file` parameter, e.g.
|
# to save the result into a file, simply add the optional `data_file` parameter, e.g.
|
||||||
# api_instance$get_inventory(data_file = "result.txt"),
|
# api_instance$store_api$get_inventory(data_file = "result.txt"),
|
||||||
api_instance$store_api$get_inventory(),
|
api_instance$store_api$get_inventory(),
|
||||||
ApiException = function(ex) ex
|
ApiException = function(ex) ex
|
||||||
)
|
)
|
||||||
@ -138,7 +138,7 @@ var_order_id <- 56 # integer | ID of pet that needs to be fetched
|
|||||||
api_instance <- petstore_api$new()
|
api_instance <- petstore_api$new()
|
||||||
result <- tryCatch(
|
result <- tryCatch(
|
||||||
# to save the result into a file, simply add the optional `data_file` parameter, e.g.
|
# to save the result into a file, simply add the optional `data_file` parameter, e.g.
|
||||||
# api_instance$get_order_by_id(var_order_id, data_file = "result.txt"),
|
# api_instance$store_api$get_order_by_id(var_order_id, data_file = "result.txt"),
|
||||||
api_instance$store_api$get_order_by_id(var_order_id),
|
api_instance$store_api$get_order_by_id(var_order_id),
|
||||||
ApiException = function(ex) ex
|
ApiException = function(ex) ex
|
||||||
)
|
)
|
||||||
@ -199,7 +199,7 @@ var_order <- Order$new(123, 123, 123, "shipDate_example", "placed", "complete_ex
|
|||||||
api_instance <- petstore_api$new()
|
api_instance <- petstore_api$new()
|
||||||
result <- tryCatch(
|
result <- tryCatch(
|
||||||
# to save the result into a file, simply add the optional `data_file` parameter, e.g.
|
# to save the result into a file, simply add the optional `data_file` parameter, e.g.
|
||||||
# api_instance$place_order(var_order, data_file = "result.txt"),
|
# api_instance$store_api$place_order(var_order, data_file = "result.txt"),
|
||||||
api_instance$store_api$place_order(var_order),
|
api_instance$store_api$place_order(var_order),
|
||||||
ApiException = function(ex) ex
|
ApiException = function(ex) ex
|
||||||
)
|
)
|
||||||
|
@ -252,7 +252,7 @@ var_username <- "username_example" # character | The name that needs to be fetch
|
|||||||
api_instance <- petstore_api$new()
|
api_instance <- petstore_api$new()
|
||||||
result <- tryCatch(
|
result <- tryCatch(
|
||||||
# to save the result into a file, simply add the optional `data_file` parameter, e.g.
|
# to save the result into a file, simply add the optional `data_file` parameter, e.g.
|
||||||
# api_instance$get_user_by_name(var_username, data_file = "result.txt"),
|
# api_instance$user_api$get_user_by_name(var_username, data_file = "result.txt"),
|
||||||
api_instance$user_api$get_user_by_name(var_username),
|
api_instance$user_api$get_user_by_name(var_username),
|
||||||
ApiException = function(ex) ex
|
ApiException = function(ex) ex
|
||||||
)
|
)
|
||||||
@ -314,7 +314,7 @@ var_password <- "password_example" # character | The password for login in clear
|
|||||||
api_instance <- petstore_api$new()
|
api_instance <- petstore_api$new()
|
||||||
result <- tryCatch(
|
result <- tryCatch(
|
||||||
# to save the result into a file, simply add the optional `data_file` parameter, e.g.
|
# to save the result into a file, simply add the optional `data_file` parameter, e.g.
|
||||||
# api_instance$login_user(var_username, var_password, data_file = "result.txt"),
|
# api_instance$user_api$login_user(var_username, var_password, data_file = "result.txt"),
|
||||||
api_instance$user_api$login_user(var_username, var_password),
|
api_instance$user_api$login_user(var_username, var_password),
|
||||||
ApiException = function(ex) ex
|
ApiException = function(ex) ex
|
||||||
)
|
)
|
||||||
|
@ -133,12 +133,7 @@ Class | Method | HTTP request | Description
|
|||||||
- **Flow**: implicit
|
- **Flow**: implicit
|
||||||
- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog
|
- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog
|
||||||
- **Scopes**:
|
- **Scopes**:
|
||||||
- write:pets: modify pets in your account
|
- `write:pets`: modify pets in your account
|
||||||
- read:pets: read your pets
|
- `read:pets`: read your pets
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Author
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -133,12 +133,7 @@ Class | Method | HTTP request | Description
|
|||||||
- **Flow**: implicit
|
- **Flow**: implicit
|
||||||
- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog
|
- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog
|
||||||
- **Scopes**:
|
- **Scopes**:
|
||||||
- write:pets: modify pets in your account
|
- `write:pets`: modify pets in your account
|
||||||
- read:pets: read your pets
|
- `read:pets`: read your pets
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Author
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user