{"record":{"id":"e609cfdac9702dda","repo":"OpenAPITools/openapi-generator","slug":"currently-reactive-option-doesn-t-supported-by-sp","errorCode":null,"errorMessage":"Currently, reactive option doesn't supported by Spring Cloud","messagePattern":"Currently, reactive option doesn't supported by Spring Cloud","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinSpringServerCodegen.java","lineNumber":710,"sourceCode":"\n        if (additionalProperties.containsKey(SERVICE_IMPLEMENTATION)) {\n            this.setServiceImplementation(Boolean.parseBoolean(additionalProperties.get(SERVICE_IMPLEMENTATION).toString()));\n        }\n        writePropertyBack(SERVICE_IMPLEMENTATION, serviceImplementation);\n\n        if (additionalProperties.containsKey(USE_BEANVALIDATION)) {\n            this.setUseBeanValidation(convertPropertyToBoolean(USE_BEANVALIDATION));\n        }\n        writePropertyBack(USE_BEANVALIDATION, useBeanValidation);\n\n        if (additionalProperties.containsKey(SKIP_DEFAULT_INTERFACE)) {\n            this.setSkipDefaultInterface(convertPropertyToBoolean(SKIP_DEFAULT_INTERFACE));\n        }\n        writePropertyBack(SKIP_DEFAULT_INTERFACE, skipDefaultInterface);\n\n        if (additionalProperties.containsKey(REACTIVE)) {\n            if (SPRING_CLOUD_LIBRARY.equals(library)) {\n                throw new IllegalArgumentException(\"Currently, reactive option doesn't supported by Spring Cloud\");\n            }\n            if (library.equals(SPRING_BOOT)) {\n                this.setReactive(convertPropertyToBoolean(REACTIVE));\n                // spring webflux doesn't support @ControllerAdvice\n                this.setExceptionHandler(false);\n\n                if (additionalProperties.containsKey(USE_FLOW_FOR_ARRAY_RETURN_TYPE)) {\n                    this.setUseFlowForArrayReturnType(convertPropertyToBoolean(USE_FLOW_FOR_ARRAY_RETURN_TYPE));\n                }\n            }\n            if (library.equals(SPRING_DECLARATIVE_HTTP_INTERFACE_LIBRARY)) {\n                this.setReactive(convertPropertyToBoolean(REACTIVE));\n                if (additionalProperties.containsKey(USE_FLOW_FOR_ARRAY_RETURN_TYPE)) {\n                    this.setUseFlowForArrayReturnType(convertPropertyToBoolean(USE_FLOW_FOR_ARRAY_RETURN_TYPE));\n                }\n                if (this.isUseFlowForArrayReturnType()) {\n                    {\n                        throw new IllegalArgumentException(\"Additional property '\" + USE_FLOW_FOR_ARRAY_RETURN_TYPE + \"' must be set to 'false' as it is not supported by Spring declarative HTTP interface\");","sourceCodeStart":692,"sourceCodeEnd":728,"githubUrl":"https://github.com/OpenAPITools/openapi-generator/blob/fcec517be3cf5b7964296bcba25fbc97541484e7/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinSpringServerCodegen.java#L692-L728","documentation":"The kotlin-spring generator's 'spring-cloud' library target generates OpenFeign-style clients for Spring Cloud, which have no reactive (WebFlux) variant in this generator. When the `reactive` additional property is present and library=spring-cloud, processOpts() throws an IllegalArgumentException immediately (KotlinSpringServerCodegen.java:710) — before reactive is even parsed as a boolean.","triggerScenarios":"Running `-g kotlin-spring` with `--additional-properties library=spring-cloud,reactive=true` (the check fires on any presence of the `reactive` key, even `reactive=false`). Typical context: also passing useFlowForArrayReturnType or coroutine options intended for the spring-boot library.","commonSituations":"Porting a working reactive spring-boot server config to a spring-cloud setup; enabling reactive globally in a shared options map/Gradle convention plugin that is reused across modules with different `library` values; upgrading configs where reactive was added by a template.","solutions":["Remove the `reactive` additional property entirely from commands/option maps targeting library=spring-cloud (note: `reactive=false` also triggers the throw).","If reactive (WebFlux) server generation is required, switch to `library=spring-boot` which fully supports reactive=true.","Parameterize your build so shared option sets are filtered per-library instead of applied verbatim."],"exampleFix":"# before\nopenapi-generator-cli generate -g kotlin-spring -i api.yaml \\\n  --additional-properties library=spring-cloud,reactive=true\n# after (option 1: drop reactive)\nopenapi-generator-cli generate -g kotlin-spring -i api.yaml \\\n  --additional-properties library=spring-cloud\n# after (option 2: reactive server)\nopenapi-generator-cli generate -g kotlin-spring -i api.yaml \\\n  --additional-properties library=spring-boot,reactive=true","handlingStrategy":"validation","validationCode":"// reject reactive for spring-cloud before invoking the generator\nif (\"spring-cloud\".equals(opts.get(\"library\")) && opts.containsKey(\"reactive\")) {\n    throw new IllegalArgumentException(\n        \"reactive (any value, even false) is not accepted with library=spring-cloud\");\n}","typeGuard":null,"tryCatchPattern":"try {\n    new DefaultGenerator().opts(clientOptInput).generate();\n} catch (IllegalArgumentException e) {\n    throw new BuildException(\"Invalid kotlin-spring options: \" + e.getMessage(), e);\n}","preventionTips":["Scope shared option maps per library value instead of applying one global set.","Remember the check triggers on key presence — reactive=false is equally invalid for spring-cloud.","When adopting reactive stacks, generate against library=spring-boot."],"tags":["kotlin","spring","spring-cloud","reactive","webflux","option-combination","openapi-generator","config-validation"],"backgroundTag":"incompatible-option-combination","analyzedSha":"fcec517be3cf5b7964296bcba25fbc97541484e7","analyzedAt":"2026-08-22T11:13:11.613Z","schemaVersion":2},"datasetVersion":"2026-08-22T14:17:55.899Z"}