Skip to content

Commit 27c6df8

Browse files
committed
fix core api usage
1 parent f35fdc3 commit 27c6df8

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/test/groovy/io/openapiprocessor/micronaut/writer/java/MappingAnnotationWriterSpec.groovy

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -183,17 +183,15 @@ class MappingAnnotationWriterSpec extends Specification {
183183

184184
@Deprecated
185185
private Endpoint createEndpoint (Map properties) {
186-
def ep = new Endpoint(
186+
return new Endpoint(
187187
properties.path as String ?: '',
188188
properties.method as HttpMethod ?: HttpMethod.GET,
189+
properties.parameters ?: [],
190+
properties.requestBodies ?: [],
191+
properties.responses ?: [:],
189192
properties.operationId as String ?: null,
190193
properties.deprecated as boolean ?: false,
191194
new Documentation(null, properties.description as String),
192195
)
193-
ep.parameters = properties.parameters ?: []
194-
ep.responses = properties.responses ?: [:]
195-
ep.requestBodies = properties.requestBodies ?: []
196-
ep.initEndpointResponses ()
197196
}
198-
199197
}

0 commit comments

Comments
 (0)