Commit 6074064d authored by Elian Kraja's avatar Elian Kraja Committed by Michele Carignani

Updating json schemas to v.2.1.1 for MEC 013

parent 828b7b5d
...@@ -15,6 +15,7 @@ Check HTTP Response Status Code Is ...@@ -15,6 +15,7 @@ Check HTTP Response Status Code Is
Log Status code validated Log Status code validated
Check HTTP Response Body Json Schema Is Check HTTP Response Body Json Schema Is
[Tags] INCLUDE_UNDEFINED_SCHEMAS
[Arguments] ${input} [Arguments] ${input}
Should Contain ${response['headers']['Content-Type']} application/json Should Contain ${response['headers']['Content-Type']} application/json
${schema} = Catenate SEPARATOR= ${input} .schema.json ${schema} = Catenate SEPARATOR= ${input} .schema.json
......
...@@ -21,7 +21,7 @@ TC_MEC_SRV_RLOCLOOK_001_OK ...@@ -21,7 +21,7 @@ TC_MEC_SRV_RLOCLOOK_001_OK
... Reference ETSI GS MEC 013 V2.1.1, clause 7.3.7 ... Reference ETSI GS MEC 013 V2.1.1, clause 7.3.7
... OpenAPI https://forge.etsi.org/gitlab/mec/gs013-location-api/blob/master/LocationAPI.yaml#/definitions/AccessPointList ... OpenAPI https://forge.etsi.org/gitlab/mec/gs013-location-api/blob/master/LocationAPI.yaml#/definitions/AccessPointList
[Tags] PIC_MEC_PLAT PIC_SERVICES [Tags] PIC_MEC_PLAT PIC_SERVICES
Get the access points list ${ZONE_ID} Get the access points list ${ZONE_ID}
Check HTTP Response Status Code Is 200 Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is AccessPointList Check HTTP Response Body Json Schema Is AccessPointList
......
{ {
"properties": { "properties": {
"accessPointList": { "undefinedJsonSchema": {
"description": "A type containing list of access points.", "type": "string",
"type": "object", "description": "Json Schema for the given object is not yet defined"
"required": [ }
"zoneId", },
"resourceURL" "required": [
], "undefinedJsonSchema"
"properties": { ]
"zoneId": { }
"description": "Identifier of zone", \ No newline at end of file
"type": "string",
"example": "zone01"
},
"accessPoint": {
"description": "Collection of the access point information list.",
"type": "array",
"items": {
"description": "A type containing access point information.",
"type": "object",
"required": [
"accessPointId",
"connectionType",
"operationStatus",
"numberOfUsers",
"resourceURL"
],
"properties": {
"accessPointId": {
"description": "Identifier of access point, <E-CGI><Cell Portion ID> (reference ETSI TS 129 171). Where the E-CGI is made up of the PLMN and Cell Identity (28 bit string). Then the PLMN is made up of the 3 digit MCC & 2 or 3 digit MNC. The Cell Portion is an optional element",
"type": "string",
"example": "001010000000000000000000000000001"
},
"locationInfo": {
"description": "A type containing location information with latitude, longitude and altitude, in addition the accuracy of the information are provided.",
"type": "object",
"required": [
"latitude",
"longitude",
"accuracy"
],
"properties": {
"latitude": {
"type": "number",
"format": "float",
"example": "80.123"
},
"longitude": {
"type": "number",
"format": "float",
"example": "70.123"
},
"altitude": {
"type": "number",
"format": "float",
"example": "10.0"
},
"accuracy": {
"type": "integer",
"format": "int32",
"example": "10"
}
}
},
"connectionType": {
"description": "The connection type for the access point",
"type": "string",
"enum": [
"Femto",
"LTE-femto",
"Smallcell",
"LTE-smallcell",
"Wifi",
"Pico",
"Micro",
"Macro",
"Wimax",
"Unknown"
],
"example": "Macro"
},
"operationStatus": {
"description": "The operation status of the access point",
"type": "string",
"enum": [
"Serviceable",
"Unserviceable",
"Unknown"
],
"example": "Serviceable"
},
"numberOfUsers": {
"description": "The number of users currently on the access point.",
"type": "integer",
"format": "uint32",
"example": "7"
},
"timezone": {
"description": "Time zone of access point",
"type": "string",
"format": "date-time",
"example": "2017-01-01T02:51:43Z"
},
"interestRealm": {
"description": "Interest realm of access point (e.g. geographical area, a type of industry etc.).",
"type": "string",
"example": "LA"
},
"resourceURL": {
"description": "Self referring URL.",
"type": "string",
"format": "uri",
"example": "http://example.com/exampleAPI/location/v1/subscriptions/userTracking/subscription123"
}
}
}
},
"resourceURL": {
"description": "Self referring URL.",
"type": "string",
"format": "uri",
"example": "http://example.com/exampleAPI/location/v1/subscriptions/userTracking/subscription123"
}
}
}
}
}
\ No newline at end of file
{ {
"definitions": {},
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://example.com/root.json",
"type": "object",
"title": "The Root Schema",
"required": [
"address",
"callbackReference",
"checkImmediate",
"clientCorrelator",
"enteringLeavingCriteria",
"frequency",
"latitude",
"longitude",
"radius",
"trackingAccuracy"
],
"properties": { "properties": {
"address": { "undefinedJsonSchema": {
"$id": "#/properties/address",
"type": "string",
"title": "The Address Schema",
"default": "",
"examples": [
"acr:10.0.0.1"
],
"pattern": "^(.*)$"
},
"callbackReference": {
"$id": "#/properties/callbackReference",
"type": "object",
"title": "The Callbackreference Schema",
"required": [
"callbackData",
"notifyURL"
],
"properties": {
"callbackData": {
"$id": "#/properties/callbackReference/properties/callbackData",
"type": "string",
"title": "The Callbackdata Schema",
"default": "",
"examples": [
"1234"
],
"pattern": "^(.*)$"
},
"notifyURL": {
"$id": "#/properties/callbackReference/properties/notifyURL",
"type": "string",
"title": "The Notifyurl Schema",
"default": "",
"examples": [
"http://application.example.com/notifications/distance_notifications/123456"
],
"pattern": "^(.*)$"
}
}
},
"checkImmediate": {
"$id": "#/properties/checkImmediate",
"type": "string",
"title": "The Checkimmediate Schema",
"default": "",
"examples": [
"true"
],
"pattern": "^(.*)$"
},
"clientCorrelator": {
"$id": "#/properties/clientCorrelator",
"type": "string",
"title": "The Clientcorrelator Schema",
"default": "",
"examples": [
"0123"
],
"pattern": "^(.*)$"
},
"enteringLeavingCriteria": {
"$id": "#/properties/enteringLeavingCriteria",
"type": "string",
"title": "The Enteringleavingcriteria Schema",
"default": "",
"examples": [
"Entering"
],
"pattern": "^(.*)$"
},
"frequency": {
"$id": "#/properties/frequency",
"type": "string", "type": "string",
"title": "The Frequency Schema", "description": "Json Schema for the given object is not yet defined"
"default": "",
"examples": [
"10"
],
"pattern": "^(.*)$"
},
"latitude": {
"$id": "#/properties/latitude",
"type": "string",
"title": "The Latitude Schema",
"default": "",
"examples": [
"-80.86302"
],
"pattern": "^(.*)$"
},
"longitude": {
"$id": "#/properties/longitude",
"type": "string",
"title": "The Longitude Schema",
"default": "",
"examples": [
"41.277306"
],
"pattern": "^(.*)$"
},
"radius": {
"$id": "#/properties/radius",
"type": "string",
"title": "The Radius Schema",
"default": "",
"examples": [
"500"
],
"pattern": "^(.*)$"
},
"trackingAccuracy": {
"$id": "#/properties/trackingAccuracy",
"type": "string",
"title": "The Trackingaccuracy Schema",
"default": "",
"examples": [
"10"
],
"pattern": "^(.*)$"
} }
} },
"required": [
"undefinedJsonSchema"
]
} }
\ No newline at end of file
{ {
"definitions": {},
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://example.com/root.json",
"type": "object",
"title": "The Root Schema",
"required": [
" terminalDistance"
],
"properties": { "properties": {
" terminalDistance": { "undefinedJsonSchema": {
"$id": "#/properties/ terminalDistance", "type": "string",
"type": "object", "description": "Json Schema for the given object is not yet defined"
"title": "The terminaldistance Schema",
"required": [
"distance"
],
"properties": {
"distance": {
"$id": "#/properties/ terminalDistance/properties/distance",
"type": "string",
"title": "The Distance Schema",
"default": "",
"examples": [
"123"
],
"pattern": "^(.*)$"
}
}
} }
} },
} "required": [
"undefinedJsonSchema"
]
}
\ No newline at end of file
{ {
"definitions": {},
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://example.com/root.json",
"type": "object",
"title": "The Root Schema",
"required": [
"distanceNotificationSubscription"
],
"properties": { "properties": {
"distanceNotificationSubscription": { "undefinedJsonSchema": {
"$id": "#/properties/distanceNotificationSubscription", "type": "string",
"type": "object", "description": "Json Schema for the given object is not yet defined"
"title": "The Distancenotificationsubscription Schema",
"required": [
"callbackReference",
"checkImmediate",
"clientCorrelator",
"criteria",
"distance",
"frequency",
"monitoredAddress",
"referenceAddress",
"trackingAccuracy"
],
"properties": {
"callbackReference": {
"$id": "#/properties/distanceNotificationSubscription/properties/callbackReference",
"type": "object",
"title": "The Callbackreference Schema",
"required": [
"callbackData",
"notifyURL"
],
"properties": {
"callbackData": {
"$id": "#/properties/distanceNotificationSubscription/properties/callbackReference/properties/callbackData",
"type": "string",
"title": "The Callbackdata Schema",
"default": "",
"examples": [
"1234"
],
"pattern": "^(.*)$"
},
"notifyURL": {
"$id": "#/properties/distanceNotificationSubscription/properties/callbackReference/properties/notifyURL",
"type": "string",
"title": "The Notifyurl Schema",
"default": "",
"examples": [
"http://application.example.com/notifications/distance_notifications/123456"
],
"pattern": "^(.*)$"
}
}
},
"checkImmediate": {
"$id": "#/properties/distanceNotificationSubscription/properties/checkImmediate",
"type": "string",
"title": "The Checkimmediate Schema",
"default": "",
"examples": [
"true"
],
"pattern": "^(.*)$"
},
"clientCorrelator": {
"$id": "#/properties/distanceNotificationSubscription/properties/clientCorrelator",
"type": "string",
"title": "The Clientcorrelator Schema",
"default": "",
"examples": [
"0123"
],
"pattern": "^(.*)$"
},
"criteria": {
"$id": "#/properties/distanceNotificationSubscription/properties/criteria",
"type": "string",
"title": "The Criteria Schema",
"default": "",
"examples": [
"AllWithinDistance"
],
"pattern": "^(.*)$"
},
"distance": {
"$id": "#/properties/distanceNotificationSubscription/properties/distance",
"type": "string",
"title": "The Distance Schema",
"default": "",
"examples": [
"100"
],
"pattern": "^(.*)$"
},
"frequency": {
"$id": "#/properties/distanceNotificationSubscription/properties/frequency",
"type": "string",
"title": "The Frequency Schema",
"default": "",
"examples": [
"10"
],
"pattern": "^(.*)$"
},
"monitoredAddress": {
"$id": "#/properties/distanceNotificationSubscription/properties/monitoredAddress",
"type": "array",
"title": "The Monitoredaddress Schema",
"items": {
"$id": "#/properties/distanceNotificationSubscription/properties/monitoredAddress/items",
"type": "string",
"title": "The Items Schema",
"default": "",
"examples": [
"acr:10.0.0.1",
"acr:10.0.0.2"
],
"pattern": "^(.*)$"
}
},
"referenceAddress": {
"$id": "#/properties/distanceNotificationSubscription/properties/referenceAddress",
"type": "string",
"title": "The Referenceaddress Schema",
"default": "",
"examples": [
"acr:10.0.0.3"
],
"pattern": "^(.*)$"
},
"trackingAccuracy": {
"$id": "#/properties/distanceNotificationSubscription/properties/trackingAccuracy",
"type": "string",
"title": "The Trackingaccuracy Schema",
"default": "",
"examples": [
"10"
],
"pattern": "^(.*)$"
}
}
} }
} },
} "required": [
"undefinedJsonSchema"
]
}
\ No newline at end of file
{ {
"description": "A type containing list of users.", "description": "A type containing list of users.",
"type": "object", "type": "object",
"required": [ "required": [
"resourceURL" "resourceURL"
], ],
"properties": { "properties": {
"user": { "user": {
"description": "Collection of the zone information list.", "description": "Collection of the zone information list.",
"type": "array", "type": "array",
"items": { "items": {
"description": "A type containing user information.", "properties": {
"type": "object", "accessPointId": {
"required": [ "description": "The identity of the access point the user is currently on, see note 1.",
"address", "type": "string",
"accessPointId", "x-etsi-mec-cardinality": "1",
"zoneId", "x-etsi-mec-origin-type": "String"
"resourceURL" },
], "address": {
"properties": { "description": "Address of user (e.g. 'sip' URI, 'tel' URI, 'acr' URI) currently on the access point, see note 1.",
"address": { "format": "uri",
"description": "Address of user (e.g. \"sip\" URI, \"tel\" URI, \"acr\" URI).", "type": "string",
"type": "string", "x-etsi-mec-cardinality": "1",
"format": "uri", "x-etsi-mec-origin-type": "AnyURI"
"example": "acr:192.0.2.1" },
}, "ancillaryInfo": {
"accessPointId": { "description": "Reserved for future use.",
"description": "Identifier of access point, <E-CGI><Cell Portion ID> (reference ETSI TS 129 171). Where the E-CGI is made up of the PLMN and Cell Identity (28 bit string). Then the PLMN is made up of the 3 digit MCC & 2 or 3 digit MNC. The Cell Portion is an optional element", "type": "string",
"type": "string", "x-etsi-mec-cardinality": "0..1",
"example": "001010000000000000000000000000001" "x-etsi-mec-origin-type": "String"
}, },
"zoneId": { "contextLocationInfo": {
"description": "Identifier of zone", "description": "Contextual information of a user location (e.g. aisle, floor, room number, etc.).",
"type": "string", "type": "string",
"example": "zone01" "x-etsi-mec-cardinality": "0..1",
}, "x-etsi-mec-origin-type": "String"
"resourceURL": { },
"description": "Self referring URL.", "locationInfo": {
"type": "string", "properties": {
"format": "uri", "accuracy": {
"example": "http://example.com/exampleAPI/location/v1/subscriptions/userTracking/subscription123" "type": "number"
}, },
"locationInfo": { "accuracyAltitude": {
"description": "A type containing location information with latitude, longitude and altitude, in addition the accuracy of the information are provided.", "type": "number"
"type": "object", },
"required": [ "accuracySemiMinor": {
"latitude", "type": "number"
"longitude", },
"accuracy" "altitude": {
], "description": "Location altitude relative to the WGS84 ellipsoid surface.",
"properties": { "type": "number",
"latitude": { "x-etsi-mec-cardinality": "0..1",
"type": "number", "x-etsi-mec-origin-type": "Float"
"format": "float", },
"example": "80.123" "confidence": {
}, "type": "number"
"longitude": { },
"type": "number", "includedAngle": {
"format": "float", "type": "number"
"example": "70.123" },
}, "innerRadius": {
"altitude": { "type": "number"
"type": "number", },
"format": "float", "latitude": {
"example": "10.0" "description": "Location latitude, expressed in the range -90 to +90. Cardinality greater than one only if \"shape\" equals 7.",
}, "items": {
"accuracy": { "type": "number"
"type": "integer", },
"format": "int32", "type": "array",
"example": "10" "x-etsi-mec-cardinality": "1..N",
} "x-etsi-mec-origin-type": "Float"
} },
}, "longitude": {
"contextLocationInfo": { "description": "Location longitude, expressed in the range -180 to +180. Cardinality greater than one only if \"shape\" equals 7.",
"description": "Contextual information of a user location (e.g., aisle, floor, room number, etc.)", "items": {
"type": "string", "type": "number"
"example": "GroundFloor" },
}, "type": "array",
"ancillaryInfo": { "x-etsi-mec-cardinality": "1..N",
"description": "Reserved for future use.", "x-etsi-mec-origin-type": "Float"
"type": "string" },
} "offsetAngle": {
} "type": "number"
} },
}, "orientationMajorAxis": {
"resourceURL": { "type": "number"
"description": "Self referring URL.", },
"type": "string", "shape": {
"format": "uri", "description": "Shape information, as detailed in [14], associated with the reported location coordinate:\n1 = Ellipsoid_Arc\n2 = ellipsoid_Point\n3 = ellipsoid_Point_Altitude\n4 = ellipsoid_Point_Altitude_Uncert_Ellipsoid\n5 = ellipsoid_Point_Uncert_Circle\n6 = ellipsoid_Point_Uncert_Ellipse\n7 = polygon",
"example": "http://example.com/exampleAPI/location/v1/subscriptions/userTracking/subscription123" "enum": [
} "ELLIPSOID_ARC",
} "ELLIPSOID_POINT",
} "ELLIPSOID_POINT_ALTITUDE",
\ No newline at end of file "ELLIPSOID_POINT_ALTITUDE_UNCERT_ELLIPSOID",
"ELLIPSOID_POINT_UNCERT_CIRCLE",
"ELLIPSOID_POINT_UNCERT_ELLIPSE",
"POLYGON"
],
"type": "string",
"x-etsi-mec-cardinality": "1",
"x-etsi-mec-origin-type": "Enum (inlined)"
},
"uncertaintyRadius": {
"type": "number"
},
"velocity": {
"description": "Structure with attributes relating to the target entitys velocity, as defined in [14].",
"type": "object",