responseSchema typing requires Enums, prefer string literals.
Description of the feature request:
This is an invalid type because you define responseSchema using enums.
responseSchema: {
"type": "object",
"properties": {
"test": {
"type": "string"
}
}
}
We must do this to avoid type errors.
responseSchema: {
"type": SchemaType.OBJECT,
"properties": {
"test": {
"type": SchemaType.STRING
}
}
}
What problem are you trying to solve with this feature?
No response
Any other information you'd like to share?
No response
Hi @mfrancis107 ,
Thanks for highlighting this. I can see, we're largely consistent in using SchemaType for responseSchema definitions. Could you please pointout the specific instances where hardcoded type values are being used in the code?
@shmishra99 I think the user's complaint is not about inside our codebase, but in their code, they have to lookup the enum object instead of just writing the string. ANd maybe that would be fine if we were on an island, but it makes it harder to use this with external tools that generate the Schemas (zod?), since they return strings.
@MarkDaoust Is exactly right in explaining the reasoning for the request.