* @brief Returns the schema { type:object, properties:{ :propSchema}, required:[ ] }. */
| 2034 | * @brief Returns the schema { type:object, properties:{<key>:propSchema}, required:[<key>] }. |
| 2035 | */ |
| 2036 | static QJsonObject objectSchemaWithProperty(const QString& key, |
| 2037 | const QJsonObject& propSchema, |
| 2038 | bool required) |
| 2039 | { |
| 2040 | QJsonObject schema; |
| 2041 | schema[QStringLiteral("type")] = QStringLiteral("object"); |
| 2042 | QJsonObject props; |
| 2043 | props[key] = propSchema; |
| 2044 | schema[QStringLiteral("properties")] = props; |
| 2045 | if (required) |
| 2046 | schema[QStringLiteral("required")] = QJsonArray{key}; |
| 2047 | |
| 2048 | return schema; |
| 2049 | } |
| 2050 | |
| 2051 | /** |
| 2052 | * @brief Returns a string-typed property schema with description (and optional enum). |
no outgoing calls
no test coverage detected