Skip to content

Commit

Permalink
remove trailing spaces in r templates (swagger-api#7526)
Browse files Browse the repository at this point in the history
  • Loading branch information
wing328 authored Jan 30, 2018
1 parent 5d92717 commit eb35870
Show file tree
Hide file tree
Showing 14 changed files with 75 additions and 75 deletions.
10 changes: 5 additions & 5 deletions modules/swagger-codegen/src/main/resources/r/api.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
#' \describe{
{{#operation}}
#'
#' {{operationId}} {{summary}}
#' {{operationId}} {{summary}}
#'
{{/operation}}
#' }
#'
#'
#' @export
{{classname}} <- R6::R6Class(
'{{classname}}',
Expand Down Expand Up @@ -90,11 +90,11 @@
method = "{{httpMethod}}",
queryParams = queryParams,
headerParams = headerParams,
body = body,
body = body,
...)

if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
{{#returnType}}
{{#returnType}}
returnObject <- {{returnType}}$new()
result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
Response$new(returnObject, resp)
Expand All @@ -111,5 +111,5 @@
}{{#hasMore}},{{/hasMore}}
{{/operation}}
)
)
)
{{/operations}}
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ git init
# Adds the files in the local repository and stages them for commit.
git add .

# Commits the tracked changes and prepares them to be pushed to a remote repository.
# Commits the tracked changes and prepares them to be pushed to a remote repository.
git commit -m "$release_note"

# Sets the new remote
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{{#appName}}
# {{{appName}}}
#
#
{{/appName}}
{{#appDescription}}
# {{{appDescription}}}
#
#
{{/appDescription}}
# {{#version}}OpenAPI spec version: {{{version}}}{{/version}}
# {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}}
Expand Down
4 changes: 2 additions & 2 deletions samples/client/petstore/r_test/R/ApiClient.r
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Swagger Petstore
#
#
# This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
#
#
# OpenAPI spec version: 1.0.0
# Contact: [email protected]
# Generated by: https://github.com/swagger-api/swagger-codegen.git
Expand Down
4 changes: 2 additions & 2 deletions samples/client/petstore/r_test/R/ApiResponse.r
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Swagger Petstore
#
#
# This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
#
#
# OpenAPI spec version: 1.0.0
# Contact: [email protected]
# Generated by: https://github.com/swagger-api/swagger-codegen.git
Expand Down
4 changes: 2 additions & 2 deletions samples/client/petstore/r_test/R/Category.r
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Swagger Petstore
#
#
# This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
#
#
# OpenAPI spec version: 1.0.0
# Contact: [email protected]
# Generated by: https://github.com/swagger-api/swagger-codegen.git
Expand Down
4 changes: 2 additions & 2 deletions samples/client/petstore/r_test/R/Order.r
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Swagger Petstore
#
#
# This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
#
#
# OpenAPI spec version: 1.0.0
# Contact: [email protected]
# Generated by: https://github.com/swagger-api/swagger-codegen.git
Expand Down
4 changes: 2 additions & 2 deletions samples/client/petstore/r_test/R/Pet.r
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Swagger Petstore
#
#
# This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
#
#
# OpenAPI spec version: 1.0.0
# Contact: [email protected]
# Generated by: https://github.com/swagger-api/swagger-codegen.git
Expand Down
40 changes: 20 additions & 20 deletions samples/client/petstore/r_test/R/PetApi.r
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Swagger Petstore
#
#
# This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
#
#
# OpenAPI spec version: 1.0.0
# Contact: [email protected]
# Generated by: https://github.com/swagger-api/swagger-codegen.git
Expand All @@ -18,31 +18,31 @@
#' @section Methods:
#' \describe{
#'
#' add_pet Add a new pet to the store
#' add_pet Add a new pet to the store
#'
#'
#' delete_pet Deletes a pet
#' delete_pet Deletes a pet
#'
#'
#' find_pets_by_status Finds Pets by status
#' find_pets_by_status Finds Pets by status
#'
#'
#' find_pets_by_tags Finds Pets by tags
#' find_pets_by_tags Finds Pets by tags
#'
#'
#' get_pet_by_id Find pet by ID
#' get_pet_by_id Find pet by ID
#'
#'
#' update_pet Update an existing pet
#' update_pet Update an existing pet
#'
#'
#' update_pet_with_form Updates a pet in the store with form data
#' update_pet_with_form Updates a pet in the store with form data
#'
#'
#' upload_file uploads an image
#' upload_file uploads an image
#'
#' }
#'
#'
#' @export
PetApi <- R6::R6Class(
'PetApi',
Expand Down Expand Up @@ -73,7 +73,7 @@ PetApi <- R6::R6Class(
method = "POST",
queryParams = queryParams,
headerParams = headerParams,
body = body,
body = body,
...)

if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
Expand Down Expand Up @@ -103,7 +103,7 @@ PetApi <- R6::R6Class(
method = "DELETE",
queryParams = queryParams,
headerParams = headerParams,
body = body,
body = body,
...)

if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
Expand All @@ -129,7 +129,7 @@ PetApi <- R6::R6Class(
method = "GET",
queryParams = queryParams,
headerParams = headerParams,
body = body,
body = body,
...)

if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
Expand Down Expand Up @@ -157,7 +157,7 @@ PetApi <- R6::R6Class(
method = "GET",
queryParams = queryParams,
headerParams = headerParams,
body = body,
body = body,
...)

if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
Expand Down Expand Up @@ -185,7 +185,7 @@ PetApi <- R6::R6Class(
method = "GET",
queryParams = queryParams,
headerParams = headerParams,
body = body,
body = body,
...)

if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
Expand Down Expand Up @@ -215,7 +215,7 @@ PetApi <- R6::R6Class(
method = "PUT",
queryParams = queryParams,
headerParams = headerParams,
body = body,
body = body,
...)

if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
Expand Down Expand Up @@ -246,7 +246,7 @@ PetApi <- R6::R6Class(
method = "POST",
queryParams = queryParams,
headerParams = headerParams,
body = body,
body = body,
...)

if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
Expand Down Expand Up @@ -277,7 +277,7 @@ PetApi <- R6::R6Class(
method = "POST",
queryParams = queryParams,
headerParams = headerParams,
body = body,
body = body,
...)

if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
Expand All @@ -292,4 +292,4 @@ PetApi <- R6::R6Class(

}
)
)
)
24 changes: 12 additions & 12 deletions samples/client/petstore/r_test/R/StoreApi.r
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Swagger Petstore
#
#
# This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
#
#
# OpenAPI spec version: 1.0.0
# Contact: [email protected]
# Generated by: https://github.com/swagger-api/swagger-codegen.git
Expand All @@ -18,19 +18,19 @@
#' @section Methods:
#' \describe{
#'
#' delete_order Delete purchase order by ID
#' delete_order Delete purchase order by ID
#'
#'
#' get_inventory Returns pet inventories by status
#' get_inventory Returns pet inventories by status
#'
#'
#' get_order_by_id Find purchase order by ID
#' get_order_by_id Find purchase order by ID
#'
#'
#' place_order Place an order for a pet
#' place_order Place an order for a pet
#'
#' }
#'
#'
#' @export
StoreApi <- R6::R6Class(
'StoreApi',
Expand Down Expand Up @@ -59,7 +59,7 @@ StoreApi <- R6::R6Class(
method = "DELETE",
queryParams = queryParams,
headerParams = headerParams,
body = body,
body = body,
...)

if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
Expand All @@ -81,7 +81,7 @@ StoreApi <- R6::R6Class(
method = "GET",
queryParams = queryParams,
headerParams = headerParams,
body = body,
body = body,
...)

if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
Expand Down Expand Up @@ -109,7 +109,7 @@ StoreApi <- R6::R6Class(
method = "GET",
queryParams = queryParams,
headerParams = headerParams,
body = body,
body = body,
...)

if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
Expand Down Expand Up @@ -139,7 +139,7 @@ StoreApi <- R6::R6Class(
method = "POST",
queryParams = queryParams,
headerParams = headerParams,
body = body,
body = body,
...)

if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
Expand All @@ -154,4 +154,4 @@ StoreApi <- R6::R6Class(

}
)
)
)
4 changes: 2 additions & 2 deletions samples/client/petstore/r_test/R/Tag.r
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Swagger Petstore
#
#
# This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
#
#
# OpenAPI spec version: 1.0.0
# Contact: [email protected]
# Generated by: https://github.com/swagger-api/swagger-codegen.git
Expand Down
4 changes: 2 additions & 2 deletions samples/client/petstore/r_test/R/User.r
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Swagger Petstore
#
#
# This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
#
#
# OpenAPI spec version: 1.0.0
# Contact: [email protected]
# Generated by: https://github.com/swagger-api/swagger-codegen.git
Expand Down
Loading

0 comments on commit eb35870

Please sign in to comment.