* @brief Build a SchemaProp constrained to a fixed enum, with optional default. */
| 60 | * @brief Build a SchemaProp constrained to a fixed enum, with optional default. |
| 61 | */ |
| 62 | [[nodiscard]] inline SchemaProp enumProp(QString name, |
| 63 | QString description, |
| 64 | QJsonArray values, |
| 65 | QJsonValue default_value = {}) |
| 66 | { |
| 67 | SchemaProp p; |
| 68 | p.name = std::move(name); |
| 69 | p.type = QStringLiteral("integer"); |
| 70 | p.description = std::move(description); |
| 71 | p.enumValues = std::move(values); |
| 72 | p.defaultValue = std::move(default_value); |
| 73 | return p; |
| 74 | } |
| 75 | |
| 76 | /** |
| 77 | * @brief Build a SchemaProp for an array with a full items sub-schema. |
no outgoing calls
no test coverage detected