{"record":{"id":"541bd84d9e558dfb","repo":"microsoft/semantic-kernel","slug":"the-query-string-parameter-parameterstyle-seri","errorCode":null,"errorMessage":"The query string parameter '{parameterStyle}' serialization style is not supported.","messagePattern":"The query string parameter '(.+?)' serialization style is not supported\\.","errorType":"exception","errorClass":"KernelException","httpStatus":null,"severity":"error","filePath":"dotnet/src/Functions/Functions.OpenApi/Model/RestApiOperation.cs","lineNumber":269,"sourceCode":"    {\n        var segments = new List<string>();\n\n        var parameters = this.Parameters.Where(p => p.Location == RestApiParameterLocation.Query);\n\n        foreach (var parameter in parameters)\n        {\n            var argument = this.GetArgumentForParameter(arguments, parameter);\n            if (argument == null)\n            {\n                // Skipping not required parameter if no argument provided for it.    \n                continue;\n            }\n\n            var parameterStyle = parameter.Style ?? RestApiParameterStyle.Form;\n\n            if (!s_parameterSerializers.TryGetValue(parameterStyle, out var serializer))\n            {\n                throw new KernelException($\"The query string parameter '{parameterStyle}' serialization style is not supported.\");\n            }\n\n            var node = OpenApiTypeConverter.Convert(parameter.Name, parameter.Type, argument, parameter.Schema);\n\n            // Serializing the parameter and adding it to the query string if there's an argument for it.\n            segments.Add(serializer.Invoke(parameter, node));\n        }\n\n        return string.Join(\"&\", segments);\n    }\n\n    /// <summary>\n    /// Makes the current instance unmodifiable.\n    /// </summary>\n    internal void Freeze()\n    {\n        this._freezable.Freeze();\n        this.Payload?.Freeze();","sourceCodeStart":251,"sourceCodeEnd":287,"githubUrl":"https://github.com/microsoft/semantic-kernel/blob/c028a0c7dc4f0814cdcbaba9d998f187a41197bf/dotnet/src/Functions/Functions.OpenApi/Model/RestApiOperation.cs#L251-L287","documentation":"Thrown by RestApiOperation.BuildQueryString when a query parameter's effective style (parameter.Style ?? Form) is not in s_parameterSerializers. Supported styles are Simple, Form, SpaceDelimited, and PipeDelimited. Unsupported styles for query (Label, Matrix, DeepObject) are rejected when the request query string is built.","triggerScenarios":"An OpenAPI query parameter declared with style label, style matrix, or style deepObject. The default for query is Form, so an absent style is safe; only an explicit unsupported style triggers this.","commonSituations":"A spec using deepObject for nested query serialization (common in some API styles) which SK does not implement; matrix or label styles copied from another toolchain.","solutions":["Change the query parameter style to 'form' (default) or 'spaceDelimited'/'pipeDelimited' if the array shape fits.","For deepObject needs, flatten the nested fields into separate simple query parameters in the spec.","If unsupported at the spec level, preprocess the document or use a ParameterFilter to drop/replace the parameter."],"exampleFix":"// before - deepObject style is not serialized\n{ \"name\": \"filter\", \"in\": \"query\", \"style\": \"deepObject\", \"schema\": { } }\n\n// after - flatten to form-style parameters\n{ \"name\": \"filter[name]\", \"in\": \"query\", \"style\": \"form\", \"schema\": { } }","handlingStrategy":"validation","validationCode":"var supported = new[] { \"form\", \"spaceDelimited\", \"pipeDelimited\", \"simple\" };\n// iterate query params and flag deepObject/label/matrix before importing","typeGuard":"static readonly HashSet<string> SupportedQueryStyles = new() { \"form\", \"spaceDelimited\", \"pipeDelimited\", \"simple\" };\nstatic bool IsSupportedQueryStyle(string? style) => style is null || SupportedQueryStyles.Contains(style.ToLowerInvariant());","tryCatchPattern":"try { operation.BuildQueryString(arguments); }\ncatch (KernelException ex) when (ex.Message.Contains(\"query string parameter\") && ex.Message.Contains(\"serialization style is not supported\"))\n{ logger.LogError(ex, \"Unsupported query serialization style in spec.\"); throw; }","preventionTips":["Use form (or omit style) for query parameters.","Flatten deepObject-style nested query params into simple form params.","Pre-scan the spec for unsupported query styles."],"tags":["openapi","rest-operation","query-string","serialization","parameter"],"backgroundTag":null,"analyzedSha":"c028a0c7dc4f0814cdcbaba9d998f187a41197bf","analyzedAt":"2026-08-13T13:48:05.040Z","schemaVersion":2},"datasetVersion":"2026-08-13T14:17:21.547Z"}