You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
.Net: Bug: .NET - Structured Output ResponseFormat schema incorrect for arrays of repeated types --- Invalid schema for response_format - reference can only point to definitions defined at the top level of the schema.
#10142
Open
AaronMacF opened this issue
Jan 9, 2025
· 0 comments
Describe the bug
When using ResponseFormat = typeof(MyClass), the schema is incorrectly generated when two array properties use the same object type, leading to the following error:
{
"error": {
"message": "Invalid schema for response_format 'MyClass': In context=('properties', 'PropertyB', 'items'), reference can only point to definitions defined at the top level of the schema.",
"type": "invalid_request_error",
"param": "response_format",
"code": null
}
}
github-actionsbot
changed the title
Bug: .NET - Structured Output ResponseFormat schema incorrect for arrays of repeated types --- Invalid schema for response_format - reference can only point to definitions defined at the top level of the schema.
.Net: Bug: .NET - Structured Output ResponseFormat schema incorrect for arrays of repeated types --- Invalid schema for response_format - reference can only point to definitions defined at the top level of the schema.
Jan 9, 2025
Describe the bug
When using ResponseFormat = typeof(MyClass), the schema is incorrectly generated when two array properties use the same object type, leading to the following error:
To Reproduce
Steps to reproduce the behavior:
See this MRE:
Program.cs
MyClass.cs
SubClass.cs
Invalid generated schema:
Expected valid schema
Expected behavior
The generated schema is valid, and PropertyB doesn't use a reference to PropertyA
Platform
The text was updated successfully, but these errors were encountered: