OpenAPITools/openapi-generator · error · RuntimeException
Empty method/operation name (operationId) not allowed
Error message
Empty method/operation name (operationId) not allowed
What it means
Error "Empty method/operation name (operationId) not allowed" thrown in OpenAPITools/openapi-generator.
Source
Thrown at modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ElmClientCodegen.java:189
return super.addMustacheLambdas()
.put("removeWhitespace", new RemoveWhitespaceLambda());
}
@Override
public String escapeUnsafeCharacters(String input) {
return input.replace("*/", "*_/").replace("/*", "/_*");
}
@Override
public String escapeQuotationMark(String input) {
return input.replace("\"", "");
}
@Override
public String toOperationId(String operationId) {
// throw exception if method name is empty
if (StringUtils.isEmpty(operationId)) {
throw new RuntimeException("Empty method/operation name (operationId) not allowed");
}
operationId = camelize(sanitizeName(operationId), LOWERCASE_FIRST_LETTER);
// method name cannot use reserved keyword, e.g. return
if (isReservedWord(operationId)) {
String newOperationId = camelize("call_" + operationId, LOWERCASE_FIRST_LETTER);
LOGGER.warn("{} (reserved word) cannot be used as method name. Renamed to {}", operationId, newOperationId);
return newOperationId;
}
// operationId starts with a number
if (operationId.matches("^\\d.*")) {
LOGGER.warn(operationId + " (starting with a number) cannot be used as method sname. Renamed to " + camelize("call_" + operationId), true);
operationId = camelize("call_" + operationId, LOWERCASE_FIRST_LETTER);
}
return operationId;View on GitHub (pinned to fcec517be3)
Solutions
- Provide a non-empty operationId for every operation in the OpenAPI spec.
When it happens
Trigger: Thrown when an operation in the OpenAPI spec has an empty or missing operationId while generating an Elm client. Provide a non-empty operationId for every operation.
Common situations: See trigger scenarios.
AI-assisted analysis of OpenAPITools/openapi-generator@fcec517be3 (2026-08-22).
Data as JSON: /api/errors/47b92d30a77d82fd.
Report an issue: GitHub.