OpenAPITools/openapi-generator · error · UnsupportedOperationException
Not implemented
Error message
Not implemented
What it means
JavaHelidonServerCodegen deliberately overrides setPerformBeanValidation to throw UnsupportedOperationException, because the Helidon server templates never implemented bean-validation generation. The override fires when performBeanValidation resolves to true via additionalProperties (convertPropertyToBooleanAndWriteBack) or when user code calls the setter — it fails regardless of the boolean's value if invoked programmatically, though config-driven generation only trips it when the property is set truthy.
Source
Thrown at modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaHelidonServerCodegen.java:474
@Override
public CodegenType getTag() {
return CodegenType.SERVER;
}
@Override
public String getName() {
return "java-helidon-server";
}
@Override
public String getHelp() {
return "Generates a Java Helidon Server application.";
}
@Override
public void setPerformBeanValidation(boolean performBeanValidation) {
throw new UnsupportedOperationException("Not implemented");
}
public void setSerializationLibrary(String serializationLibrary) {
if (SERIALIZATION_LIBRARY_JACKSON.equalsIgnoreCase(serializationLibrary)) {
this.serializationLibrary = SERIALIZATION_LIBRARY_JACKSON;
this.jackson = true;
} else if (SERIALIZATION_LIBRARY_JSONB.equalsIgnoreCase(serializationLibrary)) {
this.serializationLibrary = SERIALIZATION_LIBRARY_JSONB;
this.jackson = false;
} else {
throw new IllegalArgumentException("Unexpected serializationLibrary value: " + serializationLibrary);
}
}
/**
* Check if pom file and src directory already exist.
*
* @return outcome of testView on GitHub (pinned to fcec517be3)
Solutions
- Remove performBeanValidation from the additionalProperties/config for java-helidon-server
- If bean validation is mandatory, add @Valid/@NotNull manually to generated interfaces, or switch to a generator that supports it (spring, jaxrs-jersey)
- When embedding, never call setPerformBeanValidation on this generator — it is intentionally unimplemented
- Diff your shared config against `config-help -g java-helidon-server` output before applying it to a new generator
Example fix
# before openapi-generator-cli generate -g java-helidon-server -i api.yaml \ --additional-properties performBeanValidation=true # after openapi-generator-cli generate -g java-helidon-server -i api.yaml \ --additional-properties useBeanValidation=true # supported alternative for model validation
Defensive patterns
Strategy: validation
Validate before calling
// java-helidon-server does not implement performBeanValidation
if (Boolean.parseBoolean(String.valueOf(opts.getOrDefault("performBeanValidation", "false")))) {
throw new UnsupportedOperationException("performBeanValidation is not implemented by java-helidon-server; remove the option");
} Try / catch
try {
generator.generate();
} catch (UnsupportedOperationException e) {
// deliberate 'Not implemented' guard — strip the unsupported option and rerun, do not retry as-is
if ("Not implemented".equals(e.getMessage())) {
opts.remove("performBeanValidation");
generator.generate(); // one sanitized retry
} else throw e;
} Prevention
- Filter house-style option sets per generator instead of applying one global map everywhere
- Track unsupported features (not just supported ones) in your generator capability notes
- Prefer useBeanValidation for model-level validation on generators that support it
When it happens
Trigger: Passing --additional-properties performBeanValidation=true with -g java-helidon-server. Reusing a config file built for spring or jaxrs generators where bean validation is supported. Embedding the generator and calling new JavaHelidonServerCodegen().setPerformBeanValidation(...) directly.
Common situations: Organizations with a house-style config enabling bean validation across all Java server generators apply it to Helidon too. Developers porting from -g spring or -g jaxrs-jersey carry the option over without checking the Helidon generator's support matrix.
Related errors
- Unexpected serializationLibrary value: {serializationLibrary
- Both %s and %s properties were set with different value.
- Helidon version %s uses the %s namespace but options specifi
- Helidon version %s uses the %s prefix for EE dependencies bu
- Unknown library option %s for Helidon Server
AI-assisted analysis of OpenAPITools/openapi-generator@fcec517be3 (2026-08-22).
Data as JSON: /api/errors/be28500c317213c6.
Report an issue: GitHub.