alibaba/spring-ai-alibaba · error · RuntimeException
Param Not Support Object
Error message
Param Not Support Object
What it means
OpenApiUtils.paramToYamlParam() converts OpenAPI parameter schemas into tool form parameters; nested object-typed parameters are not representable in the flat YAML parameter model, so it throws RuntimeException("Param Not Support Object").
Source
Thrown at spring-ai-alibaba-admin/spring-ai-alibaba-admin-server-core/src/main/java/com/alibaba/cloud/ai/studio/core/utils/api/OpenApiUtils.java:120
* Converts OpenAPI parameters to YAML parameters
* @param parameters List of OpenAPI parameters
* @param inputYamlParamList List to store converted parameters
*/
private static void paramToYamlParam(List<Parameter> parameters, List<ApiParameter> inputYamlParamList) {
if (parameters == null) {
return;
}
parameters.forEach(item -> {
ApiParameter paramInfo = new ApiParameter();
paramInfo.setKey(item.getName());
paramInfo.setRequired(item.getRequired() != null && item.getRequired());
paramInfo.setDescription(item.getDescription());
Schema schema = item.getSchema();
String type = schema.getType();
if ("object".equals(type)) {
throw new RuntimeException("Param Not Support Object");
}
if ("array".equals(type)) {
Schema schemaItem = schema.getItems();
String itemType = schemaItem.getType();
if ("object".equals(itemType)) {
throw new RuntimeException("Param Not Support Array<Object>");
}
paramInfo.setType("Array<" + firstLetterToUpperCase(type) + ">");
}
else {
paramInfo.setType(firstLetterToUpperCase(type));
}
paramInfo.setLocation(firstLetterToUpperCase(item.getIn()));
if (schema.getDefault() != null) {
paramInfo.setDefaultValue(schema.getDefault().toString());
}View on GitHub (pinned to f82da0b50f)
Solutions
- Refactor the API spec so the parameter is a primitive (string/integer) or move the object into the request body (body objects are supported)
- Pre-process the OpenAPI document to flatten or serialize object params to a string type before import
- Serialize the object param manually, e.g. type: string with a JSON-encoded example, in the spec
Example fix
// before (OpenAPI)
parameters:
- name: filter
in: query
schema: {type: object}
// after
parameters:
- name: filter
in: query
schema: {type: string}
description: JSON-encoded filter object Defensive patterns
Strategy: validation
Validate before calling
for (Parameter p : operation.getParameters()) {
if (p.getSchema() != null && "object".equals(p.getSchema().getType())) {
throw new IllegalArgumentException("Param '" + p.getName() + "' must not be object type");
}
} Type guard
static boolean isObjectParam(Schema<?> s) { return s != null && "object".equals(s.getType()); } Try / catch
try {
OpenApiUtils.parseSchemaToForm(openApiDoc);
} catch (RuntimeException e) {
if (e.getMessage().startsWith("Param Not Support")) {
// reject/flatten spec before import
}
} Prevention
- Lint specs for object-typed parameters before import
- Encode JSON params as strings with documentation
- Prefer request bodies for structured data
When it happens
Trigger: Importing an OpenAPI spec whose operation has a query/header/path parameter whose schema type is 'object' (e.g. a free-form object parameter or JSON-valued parameter).
Common situations: Importing third-party APIs that use object-typed query params (common with JSON-in-query style APIs like some Google/Elasticsearch APIs); hand-written specs with nested parameter schemas.
Understand the failure class
Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.
Related errors
- Param Not Support Array<Object>
- RequestBody Only Support object Type
- ResponseBody Only Support object or array Type
- NotSupportOperation Only Support post/get
- Schema extensions recursion depth limit(%d) reached.
AI-assisted analysis of alibaba/spring-ai-alibaba@f82da0b50f (2026-09-09).
Data as JSON: /api/errors/3aeb275e3e8239ee.
Report an issue: GitHub.