Skip to content

Commit 38300b2

Browse files
committed
fix also api_test.mustache to enable testing
1 parent 2c1e84a commit 38300b2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

modules/openapi-generator/src/main/resources/kotlin-spring/api_test.mustache

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ class {{classname}}Test {
2929
{{#allParams}}
3030
val {{{paramName}}}: {{>optionalDataType}} = TODO()
3131
{{/allParams}}
32-
val response: ResponseEntity<{{>returnTypes}}> = api.{{operationId}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}})
32+
{{#includeHttpRequestContext}}val {{#reactive}}exchange: org.springframework.web.server.ServerWebExchange{{/reactive}}{{^reactive}}request: {{javaxPackage}}.servlet.http.HttpServletRequest{{/reactive}} = TODO(){{/includeHttpRequestContext}}
33+
val response: ResponseEntity<{{>returnTypes}}> = api.{{operationId}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}}{{#includeHttpRequestContext}}{{#hasParams}}, {{/hasParams}}{{#reactive}}exchange{{/reactive}}{{^reactive}}request{{/reactive}}{{/includeHttpRequestContext}})
3334

3435
// TODO: test validations
3536
}

0 commit comments

Comments
 (0)