File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed
src/main/groovy/com/github/hauner/openapi/spring/writer Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -61,12 +61,12 @@ class InterfaceWriter {
6161 imports. add (ep. method. classNameWithPackage)
6262
6363 ep. parameters. each { p ->
64+ if (apiOptions. beanValidation) {
65+ imports. addAll(beanValidationWriter. collectImports (p. dataType))
66+ }
67+
6468 if (p. withAnnotation()) {
6569 imports. add (p. annotationWithPackage)
66-
67- if (apiOptions. beanValidation) {
68- imports. addAll(beanValidationWriter. collectImports (p. dataType))
69- }
7070 }
7171
7272 imports. addAll (p. dataTypeImports)
Original file line number Diff line number Diff line change @@ -107,11 +107,11 @@ class MethodWriter {
107107
108108 def methodDefinition = ' '
109109
110- if (it. withAnnotation ()) {
111- if (apiOptions. beanValidation){
112- methodDefinition + = " ${ beanValidationWriter.createAnnotations(it.dataType)} "
113- }
110+ if (apiOptions. beanValidation){
111+ methodDefinition + = " ${ beanValidationWriter.createAnnotations(it.dataType)} "
112+ }
114113
114+ if (it. withAnnotation ()) {
115115 methodDefinition + = " ${ createParameterAnnotation (it)} "
116116 }
117117
You can’t perform that action at this time.
0 commit comments