Verified Commit 971a3b56 authored by Hercules Merscher's avatar Hercules Merscher 🌴
Browse files

feat: Conditional field added to UX SLI JSON schema

parent 2c13ca1b
Loading
Loading
Loading
Loading
+31 −2
Original line number Diff line number Diff line
@@ -21,15 +21,44 @@
        "sync_fast",
        "sync_slow",
        "async_fast",
        "async_slow"
        "async_slow",
        "custom"
      ],
      "description": "Urgency level for this user experience"
    },
    "apdex_threshold_s": {
      "type": "number",
      "exclusiveMinimum": 0,
      "maximum": 600,
      "description": "Custom Apdex threshold duration in seconds. Required when urgency is custom."
    }
  },
  "required": [
    "description",
    "feature_category",
    "urgency"
  ],
  "allOf": [
    {
      "if": {
        "properties": {
          "urgency": {
            "const": "custom"
          }
        }
      },
      "then": {
        "required": [
          "apdex_threshold_s"
        ]
      },
      "else": {
        "not": {
          "required": [
            "apdex_threshold_s"
          ]
        }
      }
    }
  ]
}