Skip to content

Commit 151cef9

Browse files
committed
extend test to include default value
1 parent 55b87ec commit 151cef9

3 files changed

Lines changed: 3 additions & 2 deletions

File tree

src/testInt/groovy/com/github/hauner/openapi/generatr/GeneratrPendingTest.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class GeneratrPendingTest extends GeneratrTestBase {
2727
@Parameterized.Parameters(name = "{0}")
2828
static Collection<TestSet> sources () {
2929
return [
30-
new TestSet(name: 'params-enum')
30+
new TestSet(name: 'params-simple-data-types')
3131
]
3232
}
3333

src/testInt/resources/params-simple-data-types/generated/api/EndpointApi.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ public interface EndpointApi {
1515
ResponseEntity<void> getEndpoint(@RequestParam(name = "foo") String foo);
1616

1717
@GetMapping(path = "/endpoint-optional")
18-
ResponseEntity<void> getEndpointOptional(@RequestParam(name = "foo", required = false) String foo);
18+
ResponseEntity<void> getEndpointOptional(@RequestParam(name = "foo", required = false, defaultValue="bar") String foo);
1919

2020
}

src/testInt/resources/params-simple-data-types/openapi.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ paths:
3030
required: false
3131
schema:
3232
type: string
33+
default: bar
3334
responses:
3435
'204':
3536
description: empty

0 commit comments

Comments
 (0)