From a264a383de5e57c25b4d3b9250f260f3ed64fc2d Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Mon, 8 Jul 2024 22:25:18 +0200 Subject: [PATCH] fix: persist enums change for string type --- frontend/src/lib/inferArgSig.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/frontend/src/lib/inferArgSig.ts b/frontend/src/lib/inferArgSig.ts index c54cce752a..ec4fcdd819 100644 --- a/frontend/src/lib/inferArgSig.ts +++ b/frontend/src/lib/inferArgSig.ts @@ -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