Repository: microsoft/semantic-kernel
File: dotnet/src/Functions/Functions.Prompty/KernelFunctionPrompty.cs (C#)

Code before:
        }

        // Add input and output variables.
        if (prompty.Inputs is not null)
        {
            foreach (var input in prompty.Inputs)
            {
                if (input.Items.TryGetValue("name", out var value) && value is string name)
                {
                    string description = input.Items.TryGetValue("description", out var desc) && desc is string descStr ? descStr : string.Empty;
                    promptTemplateConfig.InputVariables.Add(new()
                    {
                        Name = name,
                        Description = description,
                    });
                }
            }
        }
        if (prompty.Outputs is not null)
        {
            // PromptTemplateConfig supports only a single output variable. If the prompty template
            // contains one and only one, use it. Otherwise, ignore any outputs.
            if (prompty.Outputs.Length == 1 &&
                prompty.Outputs[0].Items.TryGetValue("description", out var value) && value is string description)
            {
                promptTemplateConfig.OutputVariable = new() { Description = description };
            }
        }

        // Update template format. If not provided, use Liquid as default.
        promptTemplateConfig.TemplateFormat = prompty.Template?.Type ?? LiquidPromptTemplateFactory.LiquidTemplateFormat;

        return promptTemplateConfig;
    }
}


Review comment (suggestion):
nit: if you are addressing other PR review comments, consider combining this 'if' statement with the one above - `if (prompty.Outputs is { Count: 1 } output)`. Otherwise, disregard.

Code after:
            };
            promptTemplateConfig.AddExecutionSettings(defaultExecutionSetting);
        }

        // Add input and output variables.
        if (prompty.Inputs is not null)
        {
            foreach (var kvp in prompty.Inputs)
            {
                var input = kvp.Value;
                promptTemplateConfig.InputVariables.Add(new()
                {
                    Name = kvp.Key,
                    Default = input.Default,
                    IsRequired = input.Required,
                    Description = input.Description,
                    AllowDangerouslySetContent = !input.Strict,
                    JsonSchema = ToJsonSchema(input.JsonSchema),
                });
            }
        }
        if (prompty.Outputs is not null)
        {
            // PromptTemplateConfig supports only a single output variable. If the prompty template
            // contains one and only one, use it. Otherwise, ignore any outputs.
            if (prompty.Outputs.Count == 1)
            {
                var output = prompty.Outputs.Values.First();
                promptTemplateConfig.OutputVariable = new()
                {
                    Description = output.Description,
                    JsonSchema = ToJsonSchema(output.JsonSchema),
                };
            }
        }

        // Update template format. If not provided, use Liquid as default.
        promptTemplateConfig.TemplateFormat = prompty.Template?.Format ?? LiquidPromptTemplateFactory.LiquidTemplateFormat;

        return promptTemplateConfig;
    }

    #region private
    private static string? ToJsonSchema(object? input)
    {
        if (input is null)
        {
            return null;
        }

        if (input is string str)