* @brief Build a SchemaProp constrained to a numeric range. */
| 121 | * @brief Build a SchemaProp constrained to a numeric range. |
| 122 | */ |
| 123 | [[nodiscard]] inline SchemaProp rangeProp(QString name, |
| 124 | QString description, |
| 125 | QJsonValue min, |
| 126 | QJsonValue max) |
| 127 | { |
| 128 | SchemaProp p; |
| 129 | p.name = std::move(name); |
| 130 | p.type = QStringLiteral("integer"); |
| 131 | p.description = std::move(description); |
| 132 | p.minimum = std::move(min); |
| 133 | p.maximum = std::move(max); |
| 134 | return p; |
| 135 | } |
| 136 | |
| 137 | /** |
| 138 | * @brief Lower SchemaProp into the JSON object emitted under "properties". |
no outgoing calls
no test coverage detected