diff --git a/openapi-plugin/src/main/java/io/micronaut/gradle/openapi/tasks/AbstractOpenApiWorkAction.java b/openapi-plugin/src/main/java/io/micronaut/gradle/openapi/tasks/AbstractOpenApiWorkAction.java index 8511ff1f..72c1f44d 100644 --- a/openapi-plugin/src/main/java/io/micronaut/gradle/openapi/tasks/AbstractOpenApiWorkAction.java +++ b/openapi-plugin/src/main/java/io/micronaut/gradle/openapi/tasks/AbstractOpenApiWorkAction.java @@ -122,10 +122,11 @@ public void execute() { .map(MicronautCodeGeneratorEntryPoint.OutputKind::of) .toArray(MicronautCodeGeneratorEntryPoint.OutputKind[]::new) ) - .withOptions(options -> options.withInvokerPackage(parameters.getInvokerPackageName().get()) + .withOptions(options -> options .withLang("kotlin".equalsIgnoreCase(lang) ? GeneratorLanguage.KOTLIN : GeneratorLanguage.JAVA) .withApiPackage(parameters.getApiPackageName().get()) .withModelPackage(parameters.getModelPackageName().get()) + .withInvokerPackage(parameters.getInvokerPackageName().get()) .withBeanValidation(parameters.getUseBeanValidation().get()) .withUseOneOfInterfaces(parameters.getUseOneOfInterfaces().get()) .withOptional(parameters.getUseOptional().get()) diff --git a/openapi-plugin/src/main/java/io/micronaut/gradle/openapi/tasks/OpenApiClientWorkAction.java b/openapi-plugin/src/main/java/io/micronaut/gradle/openapi/tasks/OpenApiClientWorkAction.java index 52001dff..cdf2e457 100644 --- a/openapi-plugin/src/main/java/io/micronaut/gradle/openapi/tasks/OpenApiClientWorkAction.java +++ b/openapi-plugin/src/main/java/io/micronaut/gradle/openapi/tasks/OpenApiClientWorkAction.java @@ -46,6 +46,7 @@ protected void configureBuilder(MicronautCodeGeneratorBuilder builder) { spec.withAuthorization(parameters.getUseAuth().get()) .withAdditionalClientTypeAnnotations(parameters.getAdditionalClientTypeAnnotations().getOrElse(List.of())) .withGeneratedAnnotation(parameters.getGeneratedAnnotation().get()) + .withFluxForArrays(parameters.getFluxForArrays().get()) .withKsp(parameters.getKsp().get()); if (parameters.getClientId().isPresent()) { diff --git a/openapi-plugin/src/main/java/io/micronaut/gradle/openapi/tasks/OpenApiServerWorkAction.java b/openapi-plugin/src/main/java/io/micronaut/gradle/openapi/tasks/OpenApiServerWorkAction.java index fcdbf502..c35b8475 100644 --- a/openapi-plugin/src/main/java/io/micronaut/gradle/openapi/tasks/OpenApiServerWorkAction.java +++ b/openapi-plugin/src/main/java/io/micronaut/gradle/openapi/tasks/OpenApiServerWorkAction.java @@ -34,17 +34,20 @@ protected void configureBuilder(MicronautCodeGeneratorBuilder builder) { var parameters = getParameters(); if ("kotlin".equalsIgnoreCase(parameters.getLang().get())) { - builder.forKotlinServer(spec -> spec.withControllerPackage(parameters.getControllerPackage().get()) + builder.forKotlinServer(spec -> spec + .withControllerPackage(parameters.getControllerPackage().get()) .withAuthentication(parameters.getUseAuth().get()) .withAot(parameters.getAot().get()) .withGenerateImplementationFiles(false) .withGenerateControllerFromExamples(false) .withGenerateOperationsToReturnNotImplemented(false) .withGeneratedAnnotation(parameters.getGeneratedAnnotation().get()) + .withFluxForArrays(parameters.getFluxForArrays().get()) .withKsp(parameters.getKsp().get()) ); } else { - builder.forJavaServer(spec -> spec.withControllerPackage(parameters.getControllerPackage().get()) + builder.forJavaServer(spec -> spec + .withControllerPackage(parameters.getControllerPackage().get()) .withAuthentication(parameters.getUseAuth().get()) .withAot(parameters.getAot().get()) .withGenerateImplementationFiles(false)