Package ai.mindconnect.adminui.service
Class JsonSchemaSample
java.lang.Object
ai.mindconnect.adminui.service.JsonSchemaSample
Generates an example JSON payload from a JSON-Schema
Map (the shape
returned by Tool.parametersSchema()). Used to pre-fill the tool-test
arguments box with a skeleton the admin can edit, instead of an empty
{}.
Best-effort and intentionally simple: it walks properties,
picking a placeholder per declared type (enum → first option,
string → "", number → 0, boolean → false, array → [example], object →
nested skeleton). Unknown/Untyped fields become null.
-
Method Summary
-
Method Details
-
example
Returns a pretty-printed example JSON object forschema, or"{}\n"when the schema is null/empty or has no properties.
-