Skip to content

Commit

Permalink
add tests to set httpUserAgent in r client (#12321)
Browse files Browse the repository at this point in the history
  • Loading branch information
wing328 committed May 10, 2022
1 parent 68360ca commit 884a745
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions bin/configs/r-client.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@ generatorName: r
outputDir: samples/client/petstore/R
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml
templateDir: modules/openapi-generator/src/main/resources/r
httpUserAgent: PetstoreAgent
additionalProperties:
packageName: petstore
2 changes: 1 addition & 1 deletion samples/client/petstore/R/R/api_client.R
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ ApiClient <- R6::R6Class(
# base path of all requests
basePath = "http://petstore.swagger.io/v2",
# user agent in the HTTP request
userAgent = "OpenAPI-Generator/1.0.0/r",
userAgent = "PetstoreAgent",
# default headers in the HTTP request
defaultHeaders = NULL,
# username (HTTP basic authentication)
Expand Down

0 comments on commit 884a745

Please sign in to comment.