Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG][R] Fix documentation in R package #4580

Merged
merged 9 commits into from
Nov 26, 2019
8 changes: 4 additions & 4 deletions modules/openapi-generator/src/main/resources/r/api.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#' \item \emph{ @param } {{paramName}} list( {{dataType}} )
{{/isPrimitiveType}}
{{^isPrimitiveType}}
#' \item \emph{ @param } {{paramName}} list( \link[{{packageName}}:{{baseType}}]{ {{dataType}} } )
#' \item \emph{ @param } {{paramName}} list( \link{{=<% %>=}}{<%dataType%>}<%={{ }}=%> )
{{/isPrimitiveType}}
{{/items}}
{{/isListContainer}}
Expand All @@ -35,7 +35,7 @@
#' \item \emph{ @param } {{paramName}} named list( {{dataType}} )
{{/isPrimitiveType}}
{{^isPrimitiveType}}
#' \item \emph{ @param } {{paramName}} named list( \link[{{packageName}}:{{baseType}}]{ {{dataType}} } )
#' \item \emph{ @param } {{paramName}} named list( \link{{=<% %>=}}{<%dataType%>}<%={{ }}=%> )
{{/isPrimitiveType}}
{{/isMapContainer}}
{{/isContainer}}
Expand All @@ -44,14 +44,14 @@
#' \item \emph{ @param } {{paramName}} {{dataType}}
{{/isPrimitiveType}}
{{^isPrimitiveType}}
#' \item \emph{ @param } {{paramName}} \link[{{packageName}}:{{baseType}}]{ {{dataType}} }
#' \item \emph{ @param } {{paramName}} \link{{=<% %>=}}{<%dataType%>}<%={{ }}=%>
{{/isPrimitiveType}}
{{/isContainer}}
{{/isEnum}}
{{/allParams}}
{{#returnType}}
{{^returnTypeIsPrimitive}}
#' \item \emph{ @returnType } \link[{{packageName}}:{{returnBaseType}}]{ {{#returnContainer}}{{#isListContainer}}list({{returnBaseType}}){{/isListContainer}}{{#isMapContainer}}named list({{returnBaseType}}){{/isMapContainer}}{{/returnContainer}}{{^returnContainer}}{{returnType}}{{/returnContainer}} } \cr
#' \item \emph{ @returnType } {{#returnContainer}}{{#isListContainer}}list( {{/isListContainer}}{{#isMapContainer}}named list( {{/isMapContainer}}{{/returnContainer}}\link{{=<% %>=}}{<%#returnContainer%><%={{ }}=%>{{returnBaseType}}{{/returnContainer}}{{^returnContainer}}{{returnType}}{{=<% %>=}}<%/returnContainer%>}<%={{ }}=%>{{#returnContainer}}{{#isListContainer}} ){{/isListContainer}}{{#isMapContainer}} ){{/isMapContainer}}{{/returnContainer}} \cr
{{/returnTypeIsPrimitive}}
{{/returnType}}
#'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#' @description {{classname}} Class
#' @format An \code{R6Class} generator object
{{#vars}}
#' @field {{baseName}} {{title}} {{^isPrimitiveType}} \link[{{packageName}}:{{complexType}}]{ {{/isPrimitiveType}} {{#isContainer}} {{#isListContainer}}list({{#items}}{{dataType}}{{/items}}){{/isListContainer}}{{#isMapContainer}}named list({{#items}}{{dataType}}{{/items}}){{/isMapContainer}} {{/isContainer}}{{^isContainer}}{{dataType}}{{/isContainer}} {{^isPrimitiveType}} } {{/isPrimitiveType}} {{^required}}[optional]{{/required}}
#' @field {{baseName}} {{title}} {{#isContainer}}{{#isListContainer}}list( {{/isListContainer}}{{#isMapContainer}}named list( {{/isMapContainer}}{{/isContainer}}{{^isPrimitiveType}}\link{{=<% %>=}}{<%/isPrimitiveType%><%={{ }}=%>{{#isContainer}}{{#items}}{{dataType}}{{/items}}{{/isContainer}}{{^isContainer}}{{dataType}}{{/isContainer}}{{=<% %>=}}<%^isPrimitiveType%>}<%={{ }}=%>{{/isPrimitiveType}}{{#isContainer}}{{#isListContainer}} ){{/isListContainer}}{{#isMapContainer}} ){{/isMapContainer}}{{/isContainer}} {{^required}}[optional]{{/required}}
#'
{{/vars}}
#'
Expand Down
4 changes: 2 additions & 2 deletions samples/client/petstore/R/R/category.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
#' @title Category
#' @description Category Class
#' @format An \code{R6Class} generator object
#' @field id integer [optional]
#' @field id integer [optional]
#'
#' @field name character [optional]
#' @field name character [optional]
#'
#'
#' @importFrom R6 R6Class
Expand Down
6 changes: 3 additions & 3 deletions samples/client/petstore/R/R/model_api_response.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
#' @title ModelApiResponse
#' @description ModelApiResponse Class
#' @format An \code{R6Class} generator object
#' @field code integer [optional]
#' @field code integer [optional]
#'
#' @field type character [optional]
#' @field type character [optional]
#'
#' @field message character [optional]
#' @field message character [optional]
#'
#'
#' @importFrom R6 R6Class
Expand Down
12 changes: 6 additions & 6 deletions samples/client/petstore/R/R/order.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@
#' @title Order
#' @description Order Class
#' @format An \code{R6Class} generator object
#' @field id integer [optional]
#' @field id integer [optional]
#'
#' @field petId integer [optional]
#' @field petId integer [optional]
#'
#' @field quantity integer [optional]
#' @field quantity integer [optional]
#'
#' @field shipDate character [optional]
#' @field shipDate character [optional]
#'
#' @field status character [optional]
#' @field status character [optional]
#'
#' @field complete character [optional]
#' @field complete character [optional]
#'
#'
#' @importFrom R6 R6Class
Expand Down
12 changes: 6 additions & 6 deletions samples/client/petstore/R/R/pet.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@
#' @title Pet
#' @description Pet Class
#' @format An \code{R6Class} generator object
#' @field id integer [optional]
#' @field id integer [optional]
#'
#' @field category \link[petstore:Category]{ Category } [optional]
#' @field category \link{Category} [optional]
#'
#' @field name character
#' @field name character
#'
#' @field photoUrls list(character)
#' @field photoUrls list( character )
#'
#' @field tags \link[petstore:Tag]{ list(Tag) } [optional]
#' @field tags list( \link{Tag} ) [optional]
#'
#' @field status character [optional]
#' @field status character [optional]
#'
#'
#' @importFrom R6 R6Class
Expand Down
12 changes: 6 additions & 6 deletions samples/client/petstore/R/R/pet_api.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#'
#'
#' \itemize{
#' \item \emph{ @param } body \link[petstore:Pet]{ Pet }
#' \item \emph{ @param } body \link{Pet}
#'
#'
#' \item status code : 405 | Invalid input
Expand Down Expand Up @@ -52,7 +52,7 @@
#'
#' \itemize{
#' \item \emph{ @param } status Enum < [available, pending, sold] >
#' \item \emph{ @returnType } \link[petstore:Pet]{ list(Pet) } \cr
#' \item \emph{ @returnType } list( \link{Pet} ) \cr
#'
#'
#' \item status code : 200 | successful operation
Expand All @@ -76,7 +76,7 @@
#'
#' \itemize{
#' \item \emph{ @param } tags list( character )
#' \item \emph{ @returnType } \link[petstore:Pet]{ list(Pet) } \cr
#' \item \emph{ @returnType } list( \link{Pet} ) \cr
#'
#'
#' \item status code : 200 | successful operation
Expand All @@ -100,7 +100,7 @@
#'
#' \itemize{
#' \item \emph{ @param } pet.id integer
#' \item \emph{ @returnType } \link[petstore:Pet]{ Pet } \cr
#' \item \emph{ @returnType } \link{Pet} \cr
#'
#'
#' \item status code : 200 | successful operation
Expand Down Expand Up @@ -130,7 +130,7 @@
#'
#'
#' \itemize{
#' \item \emph{ @param } body \link[petstore:Pet]{ Pet }
#' \item \emph{ @param } body \link{Pet}
#'
#'
#' \item status code : 400 | Invalid ID supplied
Expand Down Expand Up @@ -181,7 +181,7 @@
#' \item \emph{ @param } pet.id integer
#' \item \emph{ @param } additional.metadata character
#' \item \emph{ @param } file data.frame
#' \item \emph{ @returnType } \link[petstore:ApiResponse]{ ModelApiResponse } \cr
#' \item \emph{ @returnType } \link{ModelApiResponse} \cr
#'
#'
#' \item status code : 200 | successful operation
Expand Down
6 changes: 3 additions & 3 deletions samples/client/petstore/R/R/store_api.R
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
#'
#' \itemize{
#' \item \emph{ @param } order.id integer
#' \item \emph{ @returnType } \link[petstore:Order]{ Order } \cr
#' \item \emph{ @returnType } \link{Order} \cr
#'
#'
#' \item status code : 200 | successful operation
Expand Down Expand Up @@ -87,8 +87,8 @@
#'
#'
#' \itemize{
#' \item \emph{ @param } body \link[petstore:Order]{ Order }
#' \item \emph{ @returnType } \link[petstore:Order]{ Order } \cr
#' \item \emph{ @param } body \link{Order}
#' \item \emph{ @returnType } \link{Order} \cr
#'
#'
#' \item status code : 200 | successful operation
Expand Down
4 changes: 2 additions & 2 deletions samples/client/petstore/R/R/tag.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
#' @title Tag
#' @description Tag Class
#' @format An \code{R6Class} generator object
#' @field id integer [optional]
#' @field id integer [optional]
#'
#' @field name character [optional]
#' @field name character [optional]
#'
#'
#' @importFrom R6 R6Class
Expand Down
16 changes: 8 additions & 8 deletions samples/client/petstore/R/R/user.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,21 @@
#' @title User
#' @description User Class
#' @format An \code{R6Class} generator object
#' @field id integer [optional]
#' @field id integer [optional]
#'
#' @field username character [optional]
#' @field username character [optional]
#'
#' @field firstName character [optional]
#' @field firstName character [optional]
#'
#' @field lastName character [optional]
#' @field lastName character [optional]
#'
#' @field email character [optional]
#' @field email character [optional]
#'
#' @field password character [optional]
#' @field password character [optional]
#'
#' @field phone character [optional]
#' @field phone character [optional]
#'
#' @field userStatus integer [optional]
#' @field userStatus integer [optional]
#'
#'
#' @importFrom R6 R6Class
Expand Down
10 changes: 5 additions & 5 deletions samples/client/petstore/R/R/user_api.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#' This can only be done by the logged in user.
#'
#' \itemize{
#' \item \emph{ @param } body \link[petstore:User]{ User }
#' \item \emph{ @param } body \link{User}
#'
#'
#' \item status code : 0 | successful operation
Expand All @@ -34,7 +34,7 @@
#'
#'
#' \itemize{
#' \item \emph{ @param } body list( \link[petstore:User]{ User } )
#' \item \emph{ @param } body list( \link{User} )
#'
#'
#' \item status code : 0 | successful operation
Expand All @@ -50,7 +50,7 @@
#'
#'
#' \itemize{
#' \item \emph{ @param } body list( \link[petstore:User]{ User } )
#' \item \emph{ @param } body list( \link{User} )
#'
#'
#' \item status code : 0 | successful operation
Expand Down Expand Up @@ -90,7 +90,7 @@
#'
#' \itemize{
#' \item \emph{ @param } username character
#' \item \emph{ @returnType } \link[petstore:User]{ User } \cr
#' \item \emph{ @returnType } \link{User} \cr
#'
#'
#' \item status code : 200 | successful operation
Expand Down Expand Up @@ -162,7 +162,7 @@
#'
#' \itemize{
#' \item \emph{ @param } username character
#' \item \emph{ @param } body \link[petstore:User]{ User }
#' \item \emph{ @param } body \link{User}
#'
#'
#' \item status code : 400 | Invalid user supplied
Expand Down