MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / makeObjectSchema

Function makeObjectSchema

app/src/AI/ToolDispatcher.cpp:80–89  ·  view source on GitHub ↗

* @brief Wraps a property map in a JSON Schema `object` envelope with optional required keys. */

Source from the content-addressed store, hash-verified

78 * @brief Wraps a property map in a JSON Schema `object` envelope with optional required keys.
79 */
80static QJsonObject makeObjectSchema(const QJsonObject& properties, const QJsonArray& required = {})
81{
82 QJsonObject schema;
83 schema[QStringLiteral("type")] = QStringLiteral("object");
84 schema[QStringLiteral("properties")] = properties;
85 if (!required.isEmpty())
86 schema[QStringLiteral("required")] = required;
87
88 return schema;
89}
90
91/**
92 * @brief Converts a string list into a JSON array for use as a schema `enum`.

Callers 15

snapshotInputSchemaFunction · 0.85
datasetInputSchemaFunction · 0.85
workspaceInputSchemaFunction · 0.85
tileInputSchemaFunction · 0.85
planInputSchemaFunction · 0.85
bulkInputSchemaFunction · 0.85
checkpointInputSchemaFunction · 0.85
restoreInputSchemaFunction · 0.85
assistantToolDefsFunction · 0.85
fsListInputSchemaFunction · 0.85
fsReadInputSchemaFunction · 0.85

Calls 1

isEmptyMethod · 0.80

Tested by

no test coverage detected