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

Function stringEnum

app/src/AI/ToolDispatcher.cpp:94–101  ·  view source on GitHub ↗

* @brief Converts a string list into a JSON array for use as a schema `enum`. */

Source from the content-addressed store, hash-verified

92 * @brief Converts a string list into a JSON array for use as a schema `enum`.
93 */
94static QJsonArray stringEnum(const QStringList& values)
95{
96 QJsonArray arr;
97 for (const auto& value : values)
98 arr.append(value);
99
100 return arr;
101}
102
103/**
104 * @brief Builds a JSON Schema string property restricted to the given enum values.

Callers 1

stringEnumPropertyFunction · 0.85

Calls 1

appendMethod · 0.45

Tested by

no test coverage detected