fix: persist enums change for string type

This commit is contained in:
Ruben Fiszel
2024-07-08 22:25:18 +02:00
parent 0d3574158d
commit a264a383de
+3
View File
@@ -81,6 +81,9 @@ export function argSigToJsonSchemaType(
if (t.str) {
newS.originalType = 'enum'
newS.enum = t.str
} else if (oldS.originalType == 'string' && oldS.enum) {
newS.originalType = 'string'
newS.enum = oldS.enum
} else {
newS.originalType = 'string'
newS.enum = undefined