Use const instead of enum for choices in generated schema (#20084)
Thank you!
This commit is contained in:
1 parent
fe7fadc35e
commit
753f783086
2 files changed
+50
-148
No files matched your search
@@ -115,7 +115,7 @@ function optionTypeToSchemaType(optionType) {
|
||||
}
|
||||
|
||||
function choiceToSchema(choice) {
|
||||
return { enum: [choice.value], description: choice.description };
|
||||
return { const: choice.value, description: choice.description };
|
||||
}
|
||||
|
||||
async function generateSchema() {
|
||||
|
||||
Reference in new issue
Block a user