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
Hi Team,
Currently the JsonSchemaGenerator in the spring-ai, generates the allowed values for an enum field directly from the enum values.
Is there a way to get it generate the String values?
This is for the JSON schema that MCP server returns for every tool.
{
"$schema" : "https://json-schema.org/draft/2020-12/schema",
"type" : "object",
"properties" : {
"values" : {
"type" : "string",
"enum" : [ "A", "B" ] // this should be a and b
}
},
"additionalProperties" : false
}
publicenumCsp {
A("a"),
B("b");
}
@ThomasVitale Just tagging you in case you have few minutes to look into this. Thank you in advance.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi Team,
Currently the JsonSchemaGenerator in the spring-ai, generates the allowed values for an enum field directly from the enum values.
Is there a way to get it generate the String values?
This is for the JSON schema that MCP server returns for every tool.
@ThomasVitale Just tagging you in case you have few minutes to look into this. Thank you in advance.
Beta Was this translation helpful? Give feedback.
All reactions