* @brief Builds a schema object from a properties map and required-keys list. */
| 40 | * @brief Builds a schema object from a properties map and required-keys list. |
| 41 | */ |
| 42 | [[nodiscard]] static QJsonObject makeSchema(const QJsonObject& properties, |
| 43 | const QJsonArray& required) |
| 44 | { |
| 45 | QJsonObject schema; |
| 46 | schema[QStringLiteral("type")] = QStringLiteral("object"); |
| 47 | schema[QStringLiteral("properties")] = properties; |
| 48 | if (!required.isEmpty()) |
| 49 | schema[QStringLiteral("required")] = required; |
| 50 | |
| 51 | return schema; |
| 52 | } |
| 53 | |
| 54 | /** |
| 55 | * @brief Reads channel, title, subtitle from params (all optional, default empty). |
no test coverage detected