Commit f6015564 authored by piscione's avatar piscione
Browse files

Added missing JSON schema and minor fix.

parent 4296d1e5
Loading
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -24,7 +24,7 @@ TC_MEC_MEC045_SRV_QOSLOOKUP_001_OK
    [Tags]    PIC_MEC_PLAT     PIC_SERVICES
    Retrieve all subscriptions
    Check HTTP Response Status Code Is    201
    Check HTTP Response Body Json Schema Is  SubscriptionList
    Check HTTP Response Body Json Schema Is   NotificationSubscriptionList


TC_MEC_MEC045_SRV_QOSLOOKUP_001_BR
@@ -58,7 +58,7 @@ TC_MEC_MEC045_SRV_QOSLOOKUP_002_OK_01
    [Tags]    PIC_MEC_PLAT     PIC_SERVICES
    Retrieve Subscriptions with query params    ${SUBSCRIPTION_ID}    ${SUB_ID_QUERY_PARAM}
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is  SubscriptionList
    Check HTTP Response Body Json Schema Is  NotificationSubscriptionList


TC_MEC_MEC045_SRV_QOSLOOKUP_002_OK_02
@@ -70,7 +70,7 @@ TC_MEC_MEC045_SRV_QOSLOOKUP_002_OK_02
    [Tags]    PIC_MEC_PLAT     PIC_SERVICES
    Retrieve Subscriptions with query params    ${SUBSCRIPTION_ID}   ${SUB_TYPE_QUERY_PARAM}
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is  SubscriptionList
    Check HTTP Response Body Json Schema Is  NotificationSubscriptionList

TC_MEC_MEC045_SRV_QOSLOOKUP_002_NF_01
    [Documentation]    TP_MEC_MEC045_SRV_QOSLOOKUP_002_NF_01
@@ -81,7 +81,7 @@ TC_MEC_MEC045_SRV_QOSLOOKUP_002_NF_01
    [Tags]    PIC_MEC_PLAT     PIC_SERVICES
    Retrieve Subscriptions with query params    ${SUBSCRIPTION_ID}   ${NF_SUB_TYPE_QUERY_PARAM}
    Check HTTP Response Status Code Is    404
    Check HTTP Response Body Json Schema Is  SubscriptionList
    Check HTTP Response Body Json Schema Is  NotificationSubscriptionList
    

TC_MEC_MEC045_SRV_QOSLOOKUP_002_NF_02
@@ -93,7 +93,7 @@ TC_MEC_MEC045_SRV_QOSLOOKUP_002_NF_02
    [Tags]    PIC_MEC_PLAT     PIC_SERVICES
    Retrieve Subscriptions with query params    ${SUBSCRIPTION_ID}   ${NF_SUB_TYPE_QUERY_PARAM}
    Check HTTP Response Status Code Is    404
    Check HTTP Response Body Json Schema Is  SubscriptionList
    Check HTTP Response Body Json Schema Is  NotificationSubscriptionList


TC_MEC_MEC045_SRV_QOSLOOKUP_003_OK
+211 −0
Original line number Diff line number Diff line
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "QoSEventSubscription",
  "type": "object",
  "properties": {
    "subscriptionType": {
      "type": "string",
      "const": "QoSEventSubscription"
    },
    "callbackReference": {
      "type": "string",
      "format": "uri"
    },
    "requestTestNotification": {
      "type": "boolean"
    },
    "websocketNotifConfig": {
      "$ref": "#/definitions/WebsocketNotifConfig"
    },
    "_links": {
      "type": "object",
      "description": "HATEOAS-style resource links."
    },
    "self": {
      "type": "string",
      "format": "uri"
    },
    "users": {
      "type": "array",
      "items": {
        "type": "string",
        "format": "uri"
      }
    },
    "flowFilter": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/FlowFilter"
      }
    },
    "sourceIp": {
      "type": "string"
    },
    "sourcePort": {
      "type": "array",
      "items": {
        "type": "integer",
        "minimum": 0,
        "maximum": 65535
      }
    },
    "dstIp": {
      "type": "string"
    },
    "dstPort": {
      "type": "array",
      "items": {
        "type": "integer",
        "minimum": 0,
        "maximum": 65535
      }
    },
    "protocol": {
      "type": "integer"
    },
    "dsField": {
      "type": "integer"
    },
    "trafficFilter": {
      "type": "string"
    },
    "eventTrigger": {
      "type": "array",
      "minItems": 1,
      "items": {
        "$ref": "#/definitions/EventTrigger"
      }
    },
    "upperThreshold": {
      "type": "integer"
    },
    "lowerThreshold": {
      "type": "integer"
    },
    "reportingCtrl": {
      "$ref": "#/definitions/ReportingCtrl"
    },
    "measuringPeriod": {
      "type": "integer"
    },
    "monitoringArea": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/AreaInfo"
      }
    },
    "accessPointId": {
      "type": "string"
    },
    "zoneId": {
      "type": "string"
    },
    "timeSlot": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/TimeSlot"
      }
    },
    "startTime": {
      "type": "string",
      "format": "date-time"
    },
    "endTime": {
      "type": "string",
      "format": "date-time"
    },
    "expiryDeadline": {
      "type": "string",
      "format": "date-time"
    }
  },
  "required": [
    "subscriptionType",
    "eventTrigger",
    "startTime",
    "endTime"
  ],
  "anyOf": [
    { "required": ["callbackReference"] },
    { "required": ["websocketNotifConfig"] }
  ],
  "definitions": {
    "WebsocketNotifConfig": {
      "type": "object",
      "properties": {
        "websocketUri": {
          "type": "string",
          "format": "uri"
        },
        "subprotocols": {
          "type": "array",
          "items": { "type": "string" }
        }
      },
      "required": ["websocketUri"]
    },
    "FlowFilter": {
      "type": "object",
      "properties": {
        "sourceIp": { "type": "string" },
        "destinationIp": { "type": "string" },
        "sourcePort": {
          "type": "array",
          "items": { "type": "integer", "minimum": 0, "maximum": 65535 }
        },
        "destinationPort": {
          "type": "array",
          "items": { "type": "integer", "minimum": 0, "maximum": 65535 }
        },
        "protocol": { "type": "integer" },
        "dsField": { "type": "integer" }
      }
    },
    "EventTrigger": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "description": "Type of event trigger, e.g., THRESHOLD_CROSSED"
        },
        "params": {
          "type": "object",
          "description": "Additional trigger-specific parameters"
        }
      },
      "required": ["type"]
    },
    "ReportingCtrl": {
      "type": "object",
      "properties": {
        "reportingMode": {
          "type": "string",
          "enum": ["ONCE", "PERIODIC", "ON_EVENT"]
        },
        "maxReports": {
          "type": "integer",
          "minimum": 1
        }
      },
      "required": ["reportingMode"]
    },
    "AreaInfo": {
      "type": "object",
      "properties": {
        "zoneId": { "type": "string" },
        "locationList": {
          "type": "array",
          "items": { "type": "string" }
        }
      }
    },
    "TimeSlot": {
      "type": "object",
      "properties": {
        "start": { "type": "string", "format": "date-time" },
        "end": { "type": "string", "format": "date-time" }
      },
      "required": ["start", "end"]
    }
  }
}