Skip to content

Commit 881dded

Browse files
committed
[BUG] [Groovy] Fix client to work with services that support other formats in addition to JSON
1 parent 38f0796 commit 881dded

10 files changed

Lines changed: 757 additions & 13 deletions

File tree

bin/configs/groovy.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
generatorName: groovy
22
outputDir: samples/client/petstore/groovy
3-
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
3+
inputSpec: modules/openapi-generator/src/test/resources/3_0/groovy/petstore.yaml
44
templateDir: modules/openapi-generator/src/main/resources/Groovy
55
additionalProperties:
6+
enumPropertyNaming: "original"
67
hideGenerationTimestamp: "true"

modules/openapi-generator/src/main/resources/Groovy/ApiUtils.mustache

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ class ApiUtils {
4343
if (bodyParams != null) {
4444
request.body = bodyParams
4545
}
46+
request.accept = ['application/json']
4647
request.contentType = contentType
4748

4849
response.success { resp, json ->

0 commit comments

Comments
 (0)