Description
When an OpenAPI schema has a title containing commas (or other special characters), AutoSDK uses the title to derive a C# type name and generates an invalid identifier.
Example OpenAPI Schema
EvalItemContentArray:
title: "Eval item, content, array"
type: array
items:
oneOf:
- $ref: '#/components/schemas/InputTextContent'
- $ref: '#/components/schemas/OutputTextContent'
The title "Eval item, content, array" (with commas) gets converted into an invalid C# identifier.
Current Workaround
In FixOpenApiSpec, the title is manually sanitized:
if (openApiDocument.Components.Schemas.TryGetValue("EvalItemContentArray", out var evalItemContentArray)
&& evalItemContentArray is OpenApiSchema evalSchema)
{
evalSchema.Title = "Eval item content array";
}
Expected Behavior
AutoSDK should sanitize title values when using them to derive C# type/class names. Characters that are invalid in C# identifiers (commas, periods, special chars, etc.) should be stripped or replaced with spaces/underscores before generating the identifier.
Affected SDKs
- tryAGI/OpenAI (EvalItemContentArray schema has commas in title)
Description
When an OpenAPI schema has a
titlecontaining commas (or other special characters), AutoSDK uses the title to derive a C# type name and generates an invalid identifier.Example OpenAPI Schema
The title
"Eval item, content, array"(with commas) gets converted into an invalid C# identifier.Current Workaround
In
FixOpenApiSpec, the title is manually sanitized:Expected Behavior
AutoSDK should sanitize
titlevalues when using them to derive C# type/class names. Characters that are invalid in C# identifiers (commas, periods, special chars, etc.) should be stripped or replaced with spaces/underscores before generating the identifier.Affected SDKs