OpenAPITools/openapi-generator · error · UnsupportedOperationException
{collectionFormat} (collection format) not supported
Error message
{collectionFormat} (collection format) not supported What it means
Error "{collectionFormat} (collection format) not supported" thrown in OpenAPITools/openapi-generator.
Source
Thrown at modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/HaskellServantCodegen.java:648
return op;
}
private String makeQueryListType(String type, String collectionFormat) {
type = type.substring(1, type.length() - 1);
switch (collectionFormat) {
case "csv":
return "(QueryList 'CommaSeparated (" + type + "))";
case "tsv":
return "(QueryList 'TabSeparated (" + type + "))";
case "space":
case "ssv":
return "(QueryList 'SpaceSeparated (" + type + "))";
case "pipes":
return "(QueryList 'PipeSeparated (" + type + "))";
case "multi":
return "(QueryList 'MultiParamArray (" + type + "))";
default:
throw new UnsupportedOperationException(collectionFormat + " (collection format) not supported");
}
}
// Remove characters from a string that do not belong in a model classname
private String fixModelChars(String string) {
return string.replace(".", "").replace("-", "");
}
// Override fromModel to create the appropriate model namings
@Override
public CodegenModel fromModel(String name, Schema mod) {
CodegenModel model = super.fromModel(name, mod);
setGenerateToSchema(model);
// Clean up the class name to remove invalid characters
model.classname = fixModelChars(model.classname);
if (typeMapping.containsValue(model.classname)) {View on GitHub (pinned to fcec517be3)
Solutions
- Use a supported collection format for array query parameters (e.g. csv) in the spec.
When it happens
Trigger: Thrown when a parameter in the spec uses a collectionFormat that the Haskell Servant generator does not support. Change the parameter's collectionFormat to a supported one.
Common situations: See trigger scenarios.
AI-assisted analysis of OpenAPITools/openapi-generator@fcec517be3 (2026-08-22).
Data as JSON: /api/errors/52ca6d4537afb558.
Report an issue: GitHub.