forked from loafle/openapi-generator-original
[R sample] fix CircleCI error of outdated sample (#2313)
This commit is contained in:
parent
e6b7ee6f4c
commit
a55fb7adc5
@ -7,8 +7,6 @@ export(ApiResponse)
|
|||||||
|
|
||||||
# Models
|
# Models
|
||||||
export(Category)
|
export(Category)
|
||||||
export(InlineObject)
|
|
||||||
export(InlineObject1)
|
|
||||||
export(ModelApiResponse)
|
export(ModelApiResponse)
|
||||||
export(Order)
|
export(Order)
|
||||||
export(Pet)
|
export(Pet)
|
||||||
|
@ -56,17 +56,17 @@ PetApi <- R6::R6Class(
|
|||||||
self$apiClient <- ApiClient$new()
|
self$apiClient <- ApiClient$new()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
AddPet = function(pet, ...){
|
AddPet = function(body, ...){
|
||||||
args <- list(...)
|
args <- list(...)
|
||||||
queryParams <- list()
|
queryParams <- list()
|
||||||
headerParams <- c()
|
headerParams <- c()
|
||||||
|
|
||||||
if (missing(`pet`)) {
|
if (missing(`body`)) {
|
||||||
stop("Missing required parameter `pet`.")
|
stop("Missing required parameter `body`.")
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!missing(`pet`)) {
|
if (!missing(`body`)) {
|
||||||
body <- `pet`$toJSONString()
|
body <- `body`$toJSONString()
|
||||||
} else {
|
} else {
|
||||||
body <- NULL
|
body <- NULL
|
||||||
}
|
}
|
||||||
@ -223,17 +223,17 @@ PetApi <- R6::R6Class(
|
|||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
UpdatePet = function(pet, ...){
|
UpdatePet = function(body, ...){
|
||||||
args <- list(...)
|
args <- list(...)
|
||||||
queryParams <- list()
|
queryParams <- list()
|
||||||
headerParams <- c()
|
headerParams <- c()
|
||||||
|
|
||||||
if (missing(`pet`)) {
|
if (missing(`body`)) {
|
||||||
stop("Missing required parameter `pet`.")
|
stop("Missing required parameter `body`.")
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!missing(`pet`)) {
|
if (!missing(`body`)) {
|
||||||
body <- `pet`$toJSONString()
|
body <- `body`$toJSONString()
|
||||||
} else {
|
} else {
|
||||||
body <- NULL
|
body <- NULL
|
||||||
}
|
}
|
||||||
|
@ -133,17 +133,17 @@ StoreApi <- R6::R6Class(
|
|||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
PlaceOrder = function(order, ...){
|
PlaceOrder = function(body, ...){
|
||||||
args <- list(...)
|
args <- list(...)
|
||||||
queryParams <- list()
|
queryParams <- list()
|
||||||
headerParams <- c()
|
headerParams <- c()
|
||||||
|
|
||||||
if (missing(`order`)) {
|
if (missing(`body`)) {
|
||||||
stop("Missing required parameter `order`.")
|
stop("Missing required parameter `body`.")
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!missing(`order`)) {
|
if (!missing(`body`)) {
|
||||||
body <- `order`$toJSONString()
|
body <- `body`$toJSONString()
|
||||||
} else {
|
} else {
|
||||||
body <- NULL
|
body <- NULL
|
||||||
}
|
}
|
||||||
|
@ -56,17 +56,17 @@ UserApi <- R6::R6Class(
|
|||||||
self$apiClient <- ApiClient$new()
|
self$apiClient <- ApiClient$new()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
CreateUser = function(user, ...){
|
CreateUser = function(body, ...){
|
||||||
args <- list(...)
|
args <- list(...)
|
||||||
queryParams <- list()
|
queryParams <- list()
|
||||||
headerParams <- c()
|
headerParams <- c()
|
||||||
|
|
||||||
if (missing(`user`)) {
|
if (missing(`body`)) {
|
||||||
stop("Missing required parameter `user`.")
|
stop("Missing required parameter `body`.")
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!missing(`user`)) {
|
if (!missing(`body`)) {
|
||||||
body <- `user`$toJSONString()
|
body <- `body`$toJSONString()
|
||||||
} else {
|
} else {
|
||||||
body <- NULL
|
body <- NULL
|
||||||
}
|
}
|
||||||
@ -89,17 +89,17 @@ UserApi <- R6::R6Class(
|
|||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
CreateUsersWithArrayInput = function(user, ...){
|
CreateUsersWithArrayInput = function(body, ...){
|
||||||
args <- list(...)
|
args <- list(...)
|
||||||
queryParams <- list()
|
queryParams <- list()
|
||||||
headerParams <- c()
|
headerParams <- c()
|
||||||
|
|
||||||
if (missing(`user`)) {
|
if (missing(`body`)) {
|
||||||
stop("Missing required parameter `user`.")
|
stop("Missing required parameter `body`.")
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!missing(`user`)) {
|
if (!missing(`body`)) {
|
||||||
body <- `user`$toJSONString()
|
body <- `body`$toJSONString()
|
||||||
} else {
|
} else {
|
||||||
body <- NULL
|
body <- NULL
|
||||||
}
|
}
|
||||||
@ -122,17 +122,17 @@ UserApi <- R6::R6Class(
|
|||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
CreateUsersWithListInput = function(user, ...){
|
CreateUsersWithListInput = function(body, ...){
|
||||||
args <- list(...)
|
args <- list(...)
|
||||||
queryParams <- list()
|
queryParams <- list()
|
||||||
headerParams <- c()
|
headerParams <- c()
|
||||||
|
|
||||||
if (missing(`user`)) {
|
if (missing(`body`)) {
|
||||||
stop("Missing required parameter `user`.")
|
stop("Missing required parameter `body`.")
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!missing(`user`)) {
|
if (!missing(`body`)) {
|
||||||
body <- `user`$toJSONString()
|
body <- `body`$toJSONString()
|
||||||
} else {
|
} else {
|
||||||
body <- NULL
|
body <- NULL
|
||||||
}
|
}
|
||||||
@ -275,7 +275,7 @@ UserApi <- R6::R6Class(
|
|||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
UpdateUser = function(username, user, ...){
|
UpdateUser = function(username, body, ...){
|
||||||
args <- list(...)
|
args <- list(...)
|
||||||
queryParams <- list()
|
queryParams <- list()
|
||||||
headerParams <- c()
|
headerParams <- c()
|
||||||
@ -284,12 +284,12 @@ UserApi <- R6::R6Class(
|
|||||||
stop("Missing required parameter `username`.")
|
stop("Missing required parameter `username`.")
|
||||||
}
|
}
|
||||||
|
|
||||||
if (missing(`user`)) {
|
if (missing(`body`)) {
|
||||||
stop("Missing required parameter `user`.")
|
stop("Missing required parameter `body`.")
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!missing(`user`)) {
|
if (!missing(`body`)) {
|
||||||
body <- `user`$toJSONString()
|
body <- `body`$toJSONString()
|
||||||
} else {
|
} else {
|
||||||
body <- NULL
|
body <- NULL
|
||||||
}
|
}
|
||||||
|
@ -81,8 +81,6 @@ Class | Method | HTTP request | Description
|
|||||||
## Documentation for Models
|
## Documentation for Models
|
||||||
|
|
||||||
- [Category](docs/Category.md)
|
- [Category](docs/Category.md)
|
||||||
- [InlineObject](docs/InlineObject.md)
|
|
||||||
- [InlineObject1](docs/InlineObject1.md)
|
|
||||||
- [ModelApiResponse](docs/ModelApiResponse.md)
|
- [ModelApiResponse](docs/ModelApiResponse.md)
|
||||||
- [Order](docs/Order.md)
|
- [Order](docs/Order.md)
|
||||||
- [Pet](docs/Pet.md)
|
- [Pet](docs/Pet.md)
|
||||||
|
@ -15,7 +15,7 @@ Method | HTTP request | Description
|
|||||||
|
|
||||||
|
|
||||||
# **AddPet**
|
# **AddPet**
|
||||||
> AddPet(pet)
|
> AddPet(body)
|
||||||
|
|
||||||
Add a new pet to the store
|
Add a new pet to the store
|
||||||
|
|
||||||
@ -23,20 +23,20 @@ Add a new pet to the store
|
|||||||
```R
|
```R
|
||||||
library(petstore)
|
library(petstore)
|
||||||
|
|
||||||
var.pet <- Pet$new() # Pet | Pet object that needs to be added to the store
|
var.body <- Pet$new() # Pet | Pet object that needs to be added to the store
|
||||||
|
|
||||||
#Add a new pet to the store
|
#Add a new pet to the store
|
||||||
api.instance <- PetApi$new()
|
api.instance <- PetApi$new()
|
||||||
# Configure OAuth2 access token for authorization: petstore_auth
|
# Configure OAuth2 access token for authorization: petstore_auth
|
||||||
api.instance$apiClient$accessToken <- 'TODO_YOUR_ACCESS_TOKEN';
|
api.instance$apiClient$accessToken <- 'TODO_YOUR_ACCESS_TOKEN';
|
||||||
api.instance$AddPet(var.pet)
|
api.instance$AddPet(var.body)
|
||||||
```
|
```
|
||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
|
**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
@ -221,7 +221,7 @@ Name | Type | Description | Notes
|
|||||||
|
|
||||||
|
|
||||||
# **UpdatePet**
|
# **UpdatePet**
|
||||||
> UpdatePet(pet)
|
> UpdatePet(body)
|
||||||
|
|
||||||
Update an existing pet
|
Update an existing pet
|
||||||
|
|
||||||
@ -229,20 +229,20 @@ Update an existing pet
|
|||||||
```R
|
```R
|
||||||
library(petstore)
|
library(petstore)
|
||||||
|
|
||||||
var.pet <- Pet$new() # Pet | Pet object that needs to be added to the store
|
var.body <- Pet$new() # Pet | Pet object that needs to be added to the store
|
||||||
|
|
||||||
#Update an existing pet
|
#Update an existing pet
|
||||||
api.instance <- PetApi$new()
|
api.instance <- PetApi$new()
|
||||||
# Configure OAuth2 access token for authorization: petstore_auth
|
# Configure OAuth2 access token for authorization: petstore_auth
|
||||||
api.instance$apiClient$accessToken <- 'TODO_YOUR_ACCESS_TOKEN';
|
api.instance$apiClient$accessToken <- 'TODO_YOUR_ACCESS_TOKEN';
|
||||||
api.instance$UpdatePet(var.pet)
|
api.instance$UpdatePet(var.body)
|
||||||
```
|
```
|
||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
|
**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
|
@ -128,7 +128,7 @@ No authorization required
|
|||||||
|
|
||||||
|
|
||||||
# **PlaceOrder**
|
# **PlaceOrder**
|
||||||
> Order PlaceOrder(order)
|
> Order PlaceOrder(body)
|
||||||
|
|
||||||
Place an order for a pet
|
Place an order for a pet
|
||||||
|
|
||||||
@ -136,11 +136,11 @@ Place an order for a pet
|
|||||||
```R
|
```R
|
||||||
library(petstore)
|
library(petstore)
|
||||||
|
|
||||||
var.order <- Order$new() # Order | order placed for purchasing the pet
|
var.body <- Order$new() # Order | order placed for purchasing the pet
|
||||||
|
|
||||||
#Place an order for a pet
|
#Place an order for a pet
|
||||||
api.instance <- StoreApi$new()
|
api.instance <- StoreApi$new()
|
||||||
result <- api.instance$PlaceOrder(var.order)
|
result <- api.instance$PlaceOrder(var.body)
|
||||||
dput(result)
|
dput(result)
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -148,7 +148,7 @@ dput(result)
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**order** | [**Order**](Order.md)| order placed for purchasing the pet |
|
**body** | [**Order**](Order.md)| order placed for purchasing the pet |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
@ -160,7 +160,7 @@ No authorization required
|
|||||||
|
|
||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: application/json
|
- **Content-Type**: Not defined
|
||||||
- **Accept**: application/xml, application/json
|
- **Accept**: application/xml, application/json
|
||||||
|
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ Method | HTTP request | Description
|
|||||||
|
|
||||||
|
|
||||||
# **CreateUser**
|
# **CreateUser**
|
||||||
> CreateUser(user)
|
> CreateUser(body)
|
||||||
|
|
||||||
Create user
|
Create user
|
||||||
|
|
||||||
@ -25,18 +25,18 @@ This can only be done by the logged in user.
|
|||||||
```R
|
```R
|
||||||
library(petstore)
|
library(petstore)
|
||||||
|
|
||||||
var.user <- User$new() # User | Created user object
|
var.body <- User$new() # User | Created user object
|
||||||
|
|
||||||
#Create user
|
#Create user
|
||||||
api.instance <- UserApi$new()
|
api.instance <- UserApi$new()
|
||||||
api.instance$CreateUser(var.user)
|
api.instance$CreateUser(var.body)
|
||||||
```
|
```
|
||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**user** | [**User**](User.md)| Created user object |
|
**body** | [**User**](User.md)| Created user object |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
@ -48,13 +48,13 @@ No authorization required
|
|||||||
|
|
||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: application/json
|
- **Content-Type**: Not defined
|
||||||
- **Accept**: Not defined
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# **CreateUsersWithArrayInput**
|
# **CreateUsersWithArrayInput**
|
||||||
> CreateUsersWithArrayInput(user)
|
> CreateUsersWithArrayInput(body)
|
||||||
|
|
||||||
Creates list of users with given input array
|
Creates list of users with given input array
|
||||||
|
|
||||||
@ -62,18 +62,18 @@ Creates list of users with given input array
|
|||||||
```R
|
```R
|
||||||
library(petstore)
|
library(petstore)
|
||||||
|
|
||||||
var.user <- [array$new()] # User | List of user object
|
var.body <- [array$new()] # User | List of user object
|
||||||
|
|
||||||
#Creates list of users with given input array
|
#Creates list of users with given input array
|
||||||
api.instance <- UserApi$new()
|
api.instance <- UserApi$new()
|
||||||
api.instance$CreateUsersWithArrayInput(var.user)
|
api.instance$CreateUsersWithArrayInput(var.body)
|
||||||
```
|
```
|
||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**user** | [**User**](array.md)| List of user object |
|
**body** | [**User**](array.md)| List of user object |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
@ -85,13 +85,13 @@ No authorization required
|
|||||||
|
|
||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: application/json
|
- **Content-Type**: Not defined
|
||||||
- **Accept**: Not defined
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# **CreateUsersWithListInput**
|
# **CreateUsersWithListInput**
|
||||||
> CreateUsersWithListInput(user)
|
> CreateUsersWithListInput(body)
|
||||||
|
|
||||||
Creates list of users with given input array
|
Creates list of users with given input array
|
||||||
|
|
||||||
@ -99,18 +99,18 @@ Creates list of users with given input array
|
|||||||
```R
|
```R
|
||||||
library(petstore)
|
library(petstore)
|
||||||
|
|
||||||
var.user <- [array$new()] # User | List of user object
|
var.body <- [array$new()] # User | List of user object
|
||||||
|
|
||||||
#Creates list of users with given input array
|
#Creates list of users with given input array
|
||||||
api.instance <- UserApi$new()
|
api.instance <- UserApi$new()
|
||||||
api.instance$CreateUsersWithListInput(var.user)
|
api.instance$CreateUsersWithListInput(var.body)
|
||||||
```
|
```
|
||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**user** | [**User**](array.md)| List of user object |
|
**body** | [**User**](array.md)| List of user object |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
@ -122,7 +122,7 @@ No authorization required
|
|||||||
|
|
||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: application/json
|
- **Content-Type**: Not defined
|
||||||
- **Accept**: Not defined
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
|
||||||
@ -278,7 +278,7 @@ No authorization required
|
|||||||
|
|
||||||
|
|
||||||
# **UpdateUser**
|
# **UpdateUser**
|
||||||
> UpdateUser(username, user)
|
> UpdateUser(username, body)
|
||||||
|
|
||||||
Updated user
|
Updated user
|
||||||
|
|
||||||
@ -289,11 +289,11 @@ This can only be done by the logged in user.
|
|||||||
library(petstore)
|
library(petstore)
|
||||||
|
|
||||||
var.username <- 'username_example' # character | name that need to be deleted
|
var.username <- 'username_example' # character | name that need to be deleted
|
||||||
var.user <- User$new() # User | Updated user object
|
var.body <- User$new() # User | Updated user object
|
||||||
|
|
||||||
#Updated user
|
#Updated user
|
||||||
api.instance <- UserApi$new()
|
api.instance <- UserApi$new()
|
||||||
api.instance$UpdateUser(var.username, var.user)
|
api.instance$UpdateUser(var.username, var.body)
|
||||||
```
|
```
|
||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
@ -301,7 +301,7 @@ api.instance$UpdateUser(var.username, var.user)
|
|||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**username** | **character**| name that need to be deleted |
|
**username** | **character**| name that need to be deleted |
|
||||||
**user** | [**User**](User.md)| Updated user object |
|
**body** | [**User**](User.md)| Updated user object |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
@ -313,7 +313,7 @@ No authorization required
|
|||||||
|
|
||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: application/json
|
- **Content-Type**: Not defined
|
||||||
- **Accept**: Not defined
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user