Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions samples/client/petstore/R/NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ export(ApiResponse)

# Models
export(Category)
export(InlineObject)
export(InlineObject1)
export(ModelApiResponse)
export(Order)
export(Pet)
Expand Down
20 changes: 10 additions & 10 deletions samples/client/petstore/R/R/pet_api.R
Original file line number Diff line number Diff line change
Expand Up @@ -56,17 +56,17 @@ PetApi <- R6::R6Class(
self$apiClient <- ApiClient$new()
}
},
AddPet = function(pet, ...){
AddPet = function(body, ...){
args <- list(...)
queryParams <- list()
headerParams <- c()

if (missing(`pet`)) {
stop("Missing required parameter `pet`.")
if (missing(`body`)) {
stop("Missing required parameter `body`.")
}

if (!missing(`pet`)) {
body <- `pet`$toJSONString()
if (!missing(`body`)) {
body <- `body`$toJSONString()
} else {
body <- NULL
}
Expand Down Expand Up @@ -223,17 +223,17 @@ PetApi <- R6::R6Class(
}

},
UpdatePet = function(pet, ...){
UpdatePet = function(body, ...){
args <- list(...)
queryParams <- list()
headerParams <- c()

if (missing(`pet`)) {
stop("Missing required parameter `pet`.")
if (missing(`body`)) {
stop("Missing required parameter `body`.")
}

if (!missing(`pet`)) {
body <- `pet`$toJSONString()
if (!missing(`body`)) {
body <- `body`$toJSONString()
} else {
body <- NULL
}
Expand Down
10 changes: 5 additions & 5 deletions samples/client/petstore/R/R/store_api.R
Original file line number Diff line number Diff line change
Expand Up @@ -133,17 +133,17 @@ StoreApi <- R6::R6Class(
}

},
PlaceOrder = function(order, ...){
PlaceOrder = function(body, ...){
args <- list(...)
queryParams <- list()
headerParams <- c()

if (missing(`order`)) {
stop("Missing required parameter `order`.")
if (missing(`body`)) {
stop("Missing required parameter `body`.")
}

if (!missing(`order`)) {
body <- `order`$toJSONString()
if (!missing(`body`)) {
body <- `body`$toJSONString()
} else {
body <- NULL
}
Expand Down
40 changes: 20 additions & 20 deletions samples/client/petstore/R/R/user_api.R
Original file line number Diff line number Diff line change
Expand Up @@ -56,17 +56,17 @@ UserApi <- R6::R6Class(
self$apiClient <- ApiClient$new()
}
},
CreateUser = function(user, ...){
CreateUser = function(body, ...){
args <- list(...)
queryParams <- list()
headerParams <- c()

if (missing(`user`)) {
stop("Missing required parameter `user`.")
if (missing(`body`)) {
stop("Missing required parameter `body`.")
}

if (!missing(`user`)) {
body <- `user`$toJSONString()
if (!missing(`body`)) {
body <- `body`$toJSONString()
} else {
body <- NULL
}
Expand All @@ -89,17 +89,17 @@ UserApi <- R6::R6Class(
}

},
CreateUsersWithArrayInput = function(user, ...){
CreateUsersWithArrayInput = function(body, ...){
args <- list(...)
queryParams <- list()
headerParams <- c()

if (missing(`user`)) {
stop("Missing required parameter `user`.")
if (missing(`body`)) {
stop("Missing required parameter `body`.")
}

if (!missing(`user`)) {
body <- `user`$toJSONString()
if (!missing(`body`)) {
body <- `body`$toJSONString()
} else {
body <- NULL
}
Expand All @@ -122,17 +122,17 @@ UserApi <- R6::R6Class(
}

},
CreateUsersWithListInput = function(user, ...){
CreateUsersWithListInput = function(body, ...){
args <- list(...)
queryParams <- list()
headerParams <- c()

if (missing(`user`)) {
stop("Missing required parameter `user`.")
if (missing(`body`)) {
stop("Missing required parameter `body`.")
}

if (!missing(`user`)) {
body <- `user`$toJSONString()
if (!missing(`body`)) {
body <- `body`$toJSONString()
} else {
body <- NULL
}
Expand Down Expand Up @@ -275,7 +275,7 @@ UserApi <- R6::R6Class(
}

},
UpdateUser = function(username, user, ...){
UpdateUser = function(username, body, ...){
args <- list(...)
queryParams <- list()
headerParams <- c()
Expand All @@ -284,12 +284,12 @@ UserApi <- R6::R6Class(
stop("Missing required parameter `username`.")
}

if (missing(`user`)) {
stop("Missing required parameter `user`.")
if (missing(`body`)) {
stop("Missing required parameter `body`.")
}

if (!missing(`user`)) {
body <- `user`$toJSONString()
if (!missing(`body`)) {
body <- `body`$toJSONString()
} else {
body <- NULL
}
Expand Down
2 changes: 0 additions & 2 deletions samples/client/petstore/R/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,6 @@ Class | Method | HTTP request | Description
## Documentation for Models

- [Category](docs/Category.md)
- [InlineObject](docs/InlineObject.md)
- [InlineObject1](docs/InlineObject1.md)
- [ModelApiResponse](docs/ModelApiResponse.md)
- [Order](docs/Order.md)
- [Pet](docs/Pet.md)
Expand Down
16 changes: 8 additions & 8 deletions samples/client/petstore/R/docs/PetApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,28 +15,28 @@ Method | HTTP request | Description


# **AddPet**
> AddPet(pet)
> AddPet(body)

Add a new pet to the store

### Example
```R
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
api.instance <- PetApi$new()
# Configure OAuth2 access token for authorization: petstore_auth
api.instance$apiClient$accessToken <- 'TODO_YOUR_ACCESS_TOKEN';
api.instance$AddPet(var.pet)
api.instance$AddPet(var.body)
```

### Parameters

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

Expand Down Expand Up @@ -221,28 +221,28 @@ Name | Type | Description | Notes


# **UpdatePet**
> UpdatePet(pet)
> UpdatePet(body)

Update an existing pet

### Example
```R
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
api.instance <- PetApi$new()
# Configure OAuth2 access token for authorization: petstore_auth
api.instance$apiClient$accessToken <- 'TODO_YOUR_ACCESS_TOKEN';
api.instance$UpdatePet(var.pet)
api.instance$UpdatePet(var.body)
```

### Parameters

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

Expand Down
10 changes: 5 additions & 5 deletions samples/client/petstore/R/docs/StoreApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,27 +128,27 @@ No authorization required


# **PlaceOrder**
> Order PlaceOrder(order)
> Order PlaceOrder(body)

Place an order for a pet

### Example
```R
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
api.instance <- StoreApi$new()
result <- api.instance$PlaceOrder(var.order)
result <- api.instance$PlaceOrder(var.body)
dput(result)
```

### Parameters

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

Expand All @@ -160,7 +160,7 @@ No authorization required

### HTTP request headers

- **Content-Type**: application/json
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json


Expand Down
Loading