From a067871b06c2f1058af069844c574a581bc823a4 Mon Sep 17 00:00:00 2001 From: kreber Date: Fri, 1 Mar 2024 16:14:47 +0100 Subject: [PATCH 1/4] shared schemas: bcom version --- API/common/commonopenapi.yaml | 312 ++++++++++ API/worldanalysis/worldanalysisopenapi.yaml | 321 ++--------- API/worldstorage/worldstorageopenapi.yaml | 599 +++++++------------- 3 files changed, 593 insertions(+), 639 deletions(-) create mode 100644 API/common/commonopenapi.yaml diff --git a/API/common/commonopenapi.yaml b/API/common/commonopenapi.yaml new file mode 100644 index 0000000..496fb00 --- /dev/null +++ b/API/common/commonopenapi.yaml @@ -0,0 +1,312 @@ + + + + + + + +# COMPONENTS ############################################### + components: + + #------------------------------- + # Reusable schemas (data models) + #------------------------------- + schemas: + + Mode: + description: Mode representing the context of the relocalization information (AR device to WorldAnchor/Trackable or WorldAnchor/Trackable to AR device) + type: string + enum: [TRACKABLES_TO_REQUEST, REQUEST_TO_TRACKABLES] + example: TRACKABLES_TO_REQUEST + + EncodingInformationStructure: + description: An object holding the info of a Trackable`'`s encoding information `:` the data format and the version. + required: + - dataFormat + - version + properties: + dataFormat: + description: Identifier of the target framework. + type: string + enum: [HOLOLENS, ARKIT, ARCORE, VUFORIA, ARUCO, OTHER] + example : "HOLOLENS" + version: + description: The version of the format + type: string + example : "1.01" + + Transform3D: + description: Coordinate reference system of the world anchor, a 4*4 matrix (rowmajor) represented by a float vector. + type: array + minItems: 16 + maxItems: 16 + items: + type: number + format: float + example: [ 1, 0, 0, 3, + 0, 1, 0, 3, + 0, 0, 1, 3, + 0, 0, 0, 1] + + UnitSystem: + description: Unit of length. + type: string + enum: [MM, CM, DM, M, DAM, HM, KM, INCH, FOOT, YARD, MILE] + example: M + + Size: + description: Size object in format {width, length, depth}. + type: array + items: + type: number + format: double + minItems: 3 + maxItems: 3 + example: [1.0,1.0,1.5] + + Token: + type: string + example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwczovL2V4YW1wbGUuYXV0aDAuY29tLyIsImF1ZCI6Imh0dHBzOi8vYXBpLmV4YW1wbGUuY29tL2NhbGFuZGFyL3YxLyIsInN1YiI6InVzcl8xMjMiLCJpYXQiOjE0NTg3ODU3OTYsImV4cCI6MTQ1ODg3MjE5Nn0.CA7eaHjIHz5NxeIJoFK9krqaeZrPLwmMmgI_XiQiIkQ + description: A string representing the token of the User. + + Error: + required: + - code + - message + properties: + code: + type: integer + format: int32 + example: 406 + message: + type: string + example: "Error 406" + + SessionID: + type: string + example: 4JA1xVJSYKE47UM7RKDrfUcTXlJ0wxSQ + description: A string representing the session ID associated with the AR session. + + Pose: + description: An element representing the result of the pose estimation of an AR device, a Trackable or a WorldAnchor by the World Analysis + type: object + properties: + uuid: + description: UUID of the associated Anchor or Trackable + type: string + format: uuid + example: "fa8bbe40-8052-11ec-a8a3-0242ac120002" + estimationState: + description: Extensible List of possible states of the pose estimation + type: string + enum: [OK, FAILURE] + example: OK + instructionInfo: + description: A message detailing the context of the pose estimation + type: string + example: Lighting is toom dim + timestamp: + description: Capture time of the pose as number of milliseconds since unix epoch + type: integer + example : 1704812114841 + confidence: + description: A score representing the confidence concerning the accuracy of the pose estimated + type: number + example : 50.00 + mode: + description: Mode representing the context of the Relocalization information (AR device to WorldAnchor/Trackable or WorldAnchor/Trackable to AR device) + $ref: '#/components/schemas/Mode' + value: + description: The pose value + oneOf: + - $ref: '#/components/schemas/MatrixPoseValue' + - $ref: '#/components/schemas/VectorQuaternionPoseValue' + - $ref: '#/components/schemas/GeodeticPoseValue' + example: + type: "MATRIX" + transform: [ 1, 0, 0, 3, + 0, 1, 0, 3, + 0, 0, 1, 3, + 0, 0, 0, 1 ] + subscriptionUrl: + description: The URL to use for subscription (if available), see [/pose/subscriptions] + type: string + example: "http://mywordanalysisserver.com/pose/subscriptions?target=fa8bbe40-8052-11ec-a8a3-0242ac120002" + + PoseValue: + description: Base type to define the pose value + type: object + properties: + type: + description: Encoding type of the Pose + type: string + enum: [MATRIX, VECTOR_QUATERNION, GEODETIC] + + MatrixPoseValue: + description: A pose value that is described with a 4*4 matrix + allOf: #inheritance + - $ref: '#/components/schemas/PoseValue' + properties: + transform: + description : Pose data + $ref: '#/components/schemas/Transform3D' + unit: + description: Unit system of the pose + $ref: '#/components/schemas/UnitSystem' + + VectorQuaternionPoseValue: + description: A pose value that is described with a position and a rotation + allOf: #inheritance + - $ref: '#/components/schemas/PoseValue' + properties: + position: + description : Pose Position + $ref: '#/components/schemas/Vector3' + rotation: + description : Pose Rotation + $ref: '#/components/schemas/Quaternion' + unit: + description: Unit system of the pose + $ref: '#/components/schemas/UnitSystem' + + Vector3: + description: A 3 coordinates vector + type: array + minItems: 3 + maxItems: 3 + items: + type: number + format: float + example: [ 1, 0, 0 ] + + Quaternion: + description: A quaternion + type: array + minItems: 4 + maxItems: 4 + items: + type: number + format: float + example: [ 0, 0, 0, 1 ] + + TypeWorldStorage: + description: Trackable or Anchor + type: string + enum: [TRACKABLE, ANCHOR] + example: ANCHOR + + Capability: + description: An object representing a supported capability of the World Analysis and its associated metadata + type: object + uniqueItems: true + properties: + trackableType: + type: string + enum: [FIDUCIAL_MARKER, IMAGE_MARKER, MAP, GEOPOSE, OTHER] + example: "FIDUCIAL_MARKER" + encodingInformation: + $ref: '#/components/schemas/EncodingInformationStructure' + framerate: + description: Number of frames per second the tracking of this type of trackable is performed by the World Analysis + type: number + example : 30.0 + latency: + description: Mean tracking latency in milliseconds for this type of trackable + type: number + example: 10.0 + accuracy: + description: Accuracy score for the detection of this type of Trackable by the World Analysis + type: number + example: 50.0 + + #------------------------------- + # Reusable responses + #------------------------------- + responses: + ####################### + # 1xx : Informational # + ####################### + + ################# + # 2xx : Success # + ################# + + ##################### + # 3xx : Redirection # + ##################### + + ####################### + # 4xx : Client Errors # + ####################### + 400_BadRequest: + description: Bad request. + content: + text/plain: + schema: + type: string + example: "Bad request" + + 400_InvalidUUID: + description: Invalid UUID supplied. + content: + text/plain: + schema: + example: "The format of the UUID is incorrect" + type: string + + 403_Forbidden: + description: Not allowed. + content: + text/plain: + schema: + type: string + example: "Not allowed" + + 404_NotFound: + description: Not found. + content: + text/plain: + schema: + type: string + example: "Not found" + + 404_NotFoundUUID: + description: Not found, could not find UUID in database. + content: + text/plain: + schema: + type: string + example: "Element not found" + + 405_NotSupported: + description: Not supported. + content: + text/plain: + schema: + type: string + example: "Not supported" + + 4xx_UnexpectedError: # Can be referenced as '#/components/responses/GenericError' + description: Unexpected error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + + 409_NotEmptyUUID: + description: Invalid UUID, id must be a Nil value. + content: + text/plain: + schema: + type: string + example: "The element you sent has already a value and can't be sent to the world storage" + + ######################## + # 5xx : Server Errors # + ######################## + 5xx_UnexpectedError: + description: Unexpected server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' diff --git a/API/worldanalysis/worldanalysisopenapi.yaml b/API/worldanalysis/worldanalysisopenapi.yaml index 85c8664..fce0ade 100644 --- a/API/worldanalysis/worldanalysisopenapi.yaml +++ b/API/worldanalysis/worldanalysisopenapi.yaml @@ -68,11 +68,11 @@ paths: - in: header name: token schema: - $ref: '#/components/schemas/Token' + $ref: '../common/commonopenapi.yaml#/components/schemas/Token' - in: header name: sessionID schema: - $ref: '#/components/schemas/SessionID' + $ref: '../common/commonopenapi.yaml#/components/schemas/SessionID' requestBody: required: true content: @@ -83,9 +83,9 @@ paths: '200': description: Successful operation. '405': - $ref: '#/components/responses/405_NotSupported' + $ref: '../common/commonopenapi.yaml#/components/responses/405_NotSupported' 'default': - $ref: '#/components/responses/4xx_UnexpectedError' + $ref: '../common/commonopenapi.yaml#/components/responses/4xx_UnexpectedError' /pose/{trackableOrAnchorUUID}: get: @@ -98,11 +98,11 @@ paths: - in: header name: token schema: - $ref: '#/components/schemas/Token' + $ref: '../common/commonopenapi.yaml#/components/schemas/Token' - in: header name: sessionID schema: - $ref: '#/components/schemas/SessionID' + $ref: '../common/commonopenapi.yaml#/components/schemas/SessionID' - name: trackableOrAnchorUUID in: path description: UUID of the Trackable or Anchor to request @@ -116,7 +116,7 @@ paths: description: Mode representing the context of the Relocalization information (AR device to WorldAnchor/Trackable or WorldAnchor/Trackable to AR device) required: true schema: - $ref: '#/components/schemas/Mode' + $ref: '../common/commonopenapi.yaml#/components/schemas/Mode' responses: '200': description: Successful operation. @@ -125,15 +125,15 @@ paths: schema: $ref: '#/components/schemas/Pose' '400': - $ref: '#/components/responses/400_BadRequest' + $ref: '../common/commonopenapi.yaml#/components/responses/400_BadRequest' '403': - $ref: '#/components/responses/403_Forbidden' + $ref: '../common/commonopenapi.yaml#/components/responses/403_Forbidden' '404': - $ref: '#/components/responses/404_NotFound' + $ref: '../common/commonopenapi.yaml#/components/responses/404_NotFound' '405': - $ref: '#/components/responses/405_NotSupported' + $ref: '../common/commonopenapi.yaml#/components/responses/405_NotSupported' 'default': - $ref: '#/components/responses/4xx_UnexpectedError' + $ref: '../common/commonopenapi.yaml#/components/responses/4xx_UnexpectedError' /poses: get: @@ -146,13 +146,13 @@ paths: - in: header name: token schema: - $ref: '#/components/schemas/Token' + $ref: '../common/commonopenapi.yaml#/components/schemas/Token' - in: header name: sessionID schema: - $ref: '#/components/schemas/SessionID' + $ref: '../common/commonopenapi.yaml#/components/schemas/SessionID' - name: uuid - in: query + in: header description: UUID of the Trackable or Anchor to request required: true schema: @@ -166,7 +166,7 @@ paths: description: Mode representing the context of the Relocalization information (AR device to WorldAnchor/Trackable or WorldAnchor/Trackable to AR device) required: true schema: - $ref: '#/components/schemas/Mode' + $ref: '../common/commonopenapi.yaml#/components/schemas/Mode' responses: '200': description: Successful operation. @@ -180,15 +180,15 @@ paths: items: $ref: '#/components/schemas/Pose' '400': - $ref: '#/components/responses/400_BadRequest' + $ref: '../common/commonopenapi.yaml#/components/responses/400_BadRequest' '403': - $ref: '#/components/responses/403_Forbidden' + $ref: '../common/commonopenapi.yaml#/components/responses/403_Forbidden' '404': - $ref: '#/components/responses/404_NotFound' + $ref: '../common/commonopenapi.yaml#/components/responses/404_NotFound' '405': - $ref: '#/components/responses/405_NotSupported' + $ref: '../common/commonopenapi.yaml#/components/responses/405_NotSupported' 'default': - $ref: '#/components/responses/4xx_UnexpectedError' + $ref: '../common/commonopenapi.yaml#/components/responses/4xx_UnexpectedError' /pose/subscriptions: post: @@ -201,11 +201,11 @@ paths: - in: header name: token schema: - $ref: '#/components/schemas/Token' + $ref: '../common/commonopenapi.yaml#/components/schemas/Token' - in: header name: sessionID schema: - $ref: '#/components/schemas/SessionID' + $ref: '../common/commonopenapi.yaml#/components/schemas/SessionID' - name: target in: query description: UUID of the Trackable or Anchor to subscribe @@ -234,15 +234,15 @@ paths: - $ref: '#/components/schemas/SubscriptionSingle' - $ref: '#/components/schemas/SubscriptionMultiple' '400': - $ref: '#/components/responses/400_BadRequest' + $ref: '../common/commonopenapi.yaml#/components/responses/400_BadRequest' '403': - $ref: '#/components/responses/403_Forbidden' + $ref: '../common/commonopenapi.yaml#/components/responses/403_Forbidden' '404': - $ref: '#/components/responses/404_NotFound' + $ref: '../common/commonopenapi.yaml#/components/responses/404_NotFound' '405': - $ref: '#/components/responses/405_NotSupported' + $ref: '../common/commonopenapi.yaml#/components/responses/405_NotSupported' 'default': - $ref: '#/components/responses/4xx_UnexpectedError' + $ref: '../common/commonopenapi.yaml#/components/responses/4xx_UnexpectedError' /pose/subscriptions/{subscriptionUUID}: @@ -256,11 +256,11 @@ paths: - in: header name: token schema: - $ref: '#/components/schemas/Token' + $ref: '../common/commonopenapi.yaml#/components/schemas/Token' - in: header name: sessionID schema: - $ref: '#/components/schemas/SessionID' + $ref: '../common/commonopenapi.yaml#/components/schemas/SessionID' - name: subscriptionUUID in: path description: Subscription UUID to retrieve. @@ -277,9 +277,9 @@ paths: schema: $ref: '#/components/schemas/SubscriptionSingle' '400': - $ref: '#/components/responses/400_BadRequest' + $ref: '../common/commonopenapi.yaml#/components/responses/400_BadRequest' '404': - $ref: '#/components/responses/404_NotFound' + $ref: '../common/commonopenapi.yaml#/components/responses/404_NotFound' put: summary: Update a subscription operationId: updateSubscription @@ -290,11 +290,11 @@ paths: - in: header name: token schema: - $ref: '#/components/schemas/Token' + $ref: '../common/commonopenapi.yaml#/components/schemas/Token' - in: header name: sessionID schema: - $ref: '#/components/schemas/SessionID' + $ref: '../common/commonopenapi.yaml#/components/schemas/SessionID' - name: subscriptionUUID in: path description: Subscription UUID to delete. @@ -312,7 +312,7 @@ paths: properties: mode: description: Mode representing the context of the Relocalization information (AR device to WorldAnchor/Trackable or WorldAnchor/Trackable to AR device) - $ref: '#/components/schemas/Mode' + $ref: '../common/commonopenapi.yaml#/components/schemas/Mode' validity: description: Subscription validity delay in millisecond type: integer @@ -330,9 +330,9 @@ paths: schema: $ref: '#/components/schemas/SubscriptionSingle' '400': - $ref: '#/components/responses/400_BadRequest' + $ref: '../common/commonopenapi.yaml#/components/responses/400_BadRequest' '404': - $ref: '#/components/responses/404_NotFound' + $ref: '../common/commonopenapi.yaml#/components/responses/404_NotFound' delete: summary: Remove a subscription to a given pose operationId: unsubscribeFromPose @@ -343,11 +343,11 @@ paths: - in: header name: token schema: - $ref: '#/components/schemas/Token' + $ref: '../common/commonopenapi.yaml#/components/schemas/Token' - in: header name: sessionID schema: - $ref: '#/components/schemas/SessionID' + $ref: '../common/commonopenapi.yaml#/components/schemas/SessionID' - name: subscriptionUUID in: path description: Subscription UUID to delete. @@ -365,9 +365,9 @@ paths: type: string example: "Subscription succesfuly deleted" '400': - $ref: '#/components/responses/400_BadRequest' + $ref: '../common/commonopenapi.yaml#/components/responses/400_BadRequest' '404': - $ref: '#/components/responses/404_NotFound' + $ref: '../common/commonopenapi.yaml#/components/responses/404_NotFound' /capabilities: get: @@ -380,11 +380,11 @@ paths: - in: header name: token schema: - $ref: '#/components/schemas/Token' + $ref: '../common/commonopenapi.yaml#/components/schemas/Token' - in: header name: sessionID schema: - $ref: '#/components/schemas/SessionID' + $ref: '../common/commonopenapi.yaml#/components/schemas/SessionID' responses: '200': description: Successful operation. @@ -396,9 +396,9 @@ paths: capabilities: type: array items: - $ref: '#/components/schemas/Capability' + $ref: '../common/commonopenapi.yaml#/components/schemas/Capability' 'default': - $ref: '#/components/responses/4xx_UnexpectedError' + $ref: '../common/commonopenapi.yaml#/components/responses/4xx_UnexpectedError' /capabilities/{trackableOrAnchorUUID}: @@ -412,11 +412,11 @@ paths: - in: header name: token schema: - $ref: '#/components/schemas/Token' + $ref: '../common/commonopenapi.yaml#/components/schemas/Token' - in: header name: sessionID schema: - $ref: '#/components/schemas/SessionID' + $ref: '../common/commonopenapi.yaml#/components/schemas/SessionID' - name: trackableOrAnchorUUID in: path description: UUID of the Trackable or Anchor to check support @@ -433,19 +433,19 @@ paths: type: object properties: type: - $ref: '#/components/schemas/TypeWorldStorage' + $ref: '../common/commonopenapi.yaml#/components/schemas/TypeWorldStorage' capability: - $ref: '#/components/schemas/Capability' + $ref: '../common/commonopenapi.yaml#/components/schemas/Capability' '400': - $ref: '#/components/responses/400_BadRequest' + $ref: '../common/commonopenapi.yaml#/components/responses/400_BadRequest' '403': - $ref: '#/components/responses/403_Forbidden' + $ref: '../common/commonopenapi.yaml#/components/responses/403_Forbidden' '404': - $ref: '#/components/responses/404_NotFound' + $ref: '../common/commonopenapi.yaml#/components/responses/404_NotFound' '405': - $ref: '#/components/responses/405_NotSupported' + $ref: '../common/commonopenapi.yaml#/components/responses/405_NotSupported' 'default': - $ref: '#/components/responses/4xx_UnexpectedError' + $ref: '../common/commonopenapi.yaml#/components/responses/4xx_UnexpectedError' # COMPONENTS ############################################### components: @@ -454,16 +454,7 @@ components: # Reusable schemas (data models) #------------------------------- schemas: - - Token: - type: string - example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwczovL2V4YW1wbGUuYXV0aDAuY29tLyIsImF1ZCI6Imh0dHBzOi8vYXBpLmV4YW1wbGUuY29tL2NhbGFuZGFyL3YxLyIsInN1YiI6InVzcl8xMjMiLCJpYXQiOjE0NTg3ODU3OTYsImV4cCI6MTQ1ODg3MjE5Nn0.CA7eaHjIHz5NxeIJoFK9krqaeZrPLwmMmgI_XiQiIkQ - description: A string representing the token of the User. - SessionID: - type: string - example: 4JA1xVJSYKE47UM7RKDrfUcTXlJ0wxSQ - description: A string representing the session ID associated with the AR session. Pose: description: An element representing the result of the pose estimation of an AR device, a Trackable or a WorldAnchor by the World Analysis @@ -493,12 +484,12 @@ components: example : 50.00 mode: description: Mode representing the context of the Relocalization information (AR device to WorldAnchor/Trackable or WorldAnchor/Trackable to AR device) - $ref: '#/components/schemas/Mode' + $ref: '../common/commonopenapi.yaml#/components/schemas/Mode' value: description: The pose value oneOf: - $ref: '#/components/schemas/MatrixPoseValue' - - $ref: '#/components/schemas/VectorQuaternionPoseValue' + - $ref: '../common/commonopenapi.yaml#/components/schemas/VectorQuaternionPoseValue' - $ref: '#/components/schemas/GeodeticPoseValue' example: type: "MATRIX" @@ -527,25 +518,10 @@ components: properties: transform: description : Pose data - $ref: '#/components/schemas/Transform3D' - unit: - description: Unit system of the pose - $ref: '#/components/schemas/UnitSystem' - - VectorQuaternionPoseValue: - description: A pose value that is described with a position and a rotation - allOf: #inheritance - - $ref: '#/components/schemas/PoseValue' - properties: - position: - description : Pose Position - $ref: '#/components/schemas/Vector3' - rotation: - description : Pose Rotation - $ref: '#/components/schemas/Quaternion' + $ref: '../common/commonopenapi.yaml#/components/schemas/Transform3D' unit: description: Unit system of the pose - $ref: '#/components/schemas/UnitSystem' + $ref: '../common/commonopenapi.yaml#/components/schemas/UnitSystem' GeodeticPoseValue: description : A pose value in a geodetic coordinate system @@ -563,7 +539,7 @@ components: example: 43.57351 rotation: description: Pose Rotation - $ref: '#/components/schemas/Quaternion' + $ref: '../common/commonopenapi.yaml#/components/schemas/Quaternion' geodeticsystem: description: Associated geodetic system of the pose type: string @@ -574,81 +550,6 @@ components: enum: [EASTUPSOUTH, WESTUPNORTH] example: EASTUPSOUTH - UnitSystem: - description: Unit of length. - type: string - enum: [MM, CM, DM, M, DAM, HM, KM, INCH, FOOT, YARD, MILE] - example: M - - Transform3D: - description: Coordinate reference system of the world anchor, a 4*4 matrix (rowmajor) represented by a float vector. - type: array - minItems: 16 - maxItems: 16 - items: - type: number - format: float - example: [ 1, 0, 0, 3, - 0, 1, 0, 3, - 0, 0, 1, 3, - 0, 0, 0, 1 ] - - Vector3: - description: A 3 coordinates vector - type: array - minItems: 3 - maxItems: 3 - items: - type: number - format: float - example: [ 1, 0, 0 ] - - Quaternion: - description: A quaternion - type: array - minItems: 4 - maxItems: 4 - items: - type: number - format: float - example: [ 0, 0, 0, 1 ] - - TypeWorldStorage: - description: Trackable or Anchor - type: string - enum: [TRACKABLE, ANCHOR] - example: ANCHOR - - Mode: - description: Mode representing the context of the relocalization information (AR device to WorldAnchor/Trackable or WorldAnchor/Trackable to AR device) - type: string - enum: [DEVICE_TO_TRACKABLE_OR_ANCHOR, TRACKABLE_OR_ANCHOR_TO_DEVICE] - example: DEVICE_TO_TRACKABLE_OR_ANCHOR - - Capability: - description: An object representing a supported capability of the World Analysis and its associated metadata - type: object - uniqueItems: true - properties: - trackableType: - type: string - enum: [FIDUCIAL_MARKER, IMAGE_MARKER, MAP, GEOPOSE, OTHER] - example: "FIDUCIAL_MARKER" - encodingInformation: - $ref: '#/components/schemas/EncodingInformationStructure' - framerate: - description: Number of frames per second the tracking of this type of trackable is performed by the World Analysis - type: number - example : 30.0 - latency: - description: Mean tracking latency in milliseconds for this type of trackable - type: number - example: 10.0 - accuracy: - description: Accuracy score for the detection of this type of Trackable by the World Analysis - type: number - example: 50.0 - PoseConfiguration: description: An object representing the framerate that the World Analysis needs to reach for a given Trackable Type type: object @@ -659,7 +560,7 @@ components: enum: [FIDUCIAL_MARKER, IMAGE_MARKER, MAP, GEOPOSE, OTHER] example: "FIDUCIAL_MARKER" encodingInformation: - $ref: '#/components/schemas/EncodingInformationStructure' + $ref: '../common/commonopenapi.yaml#/components/schemas/EncodingInformationStructure' framerate: description: Number of frames per second the tracking expected for this type of trackable is performed by the World Analysis type: number @@ -682,7 +583,7 @@ components: example: [ "fa8bbe40-8052-11ec-a8a3-0242ac120002", "fa8bbe40-8052-11ec-a8a3-0242ac120003"] mode: description: Mode representing the context of the Relocalization information (AR device to WorldAnchor/Trackable or WorldAnchor/Trackable to AR device) - $ref: '#/components/schemas/Mode' + $ref: '../common/commonopenapi.yaml#/components/schemas/Mode' validity: description: Subscription validity delay in millisecond type: integer @@ -708,7 +609,7 @@ components: example: [ "fa8bbe40-8052-11ec-a8a3-0242ac120002", "fa8bbe40-8052-11ec-a8a3-0242ac120003"] mode: description: Mode representing the context of the Relocalization information (AR device to WorldAnchor/Trackable or WorldAnchor/Trackable to AR device) - $ref: '#/components/schemas/Mode' + $ref: '../common/commonopenapi.yaml#/components/schemas/Mode' validity: description: Subscription validity delay in millisecond type: integer @@ -737,7 +638,7 @@ components: example: "fa8bbe40-8052-11ec-a8a3-0242ac120002" mode: description: Mode representing the context of the Relocalization information (AR device to WorldAnchor/Trackable or WorldAnchor/Trackable to AR device) - $ref: '#/components/schemas/Mode' + $ref: '../common/commonopenapi.yaml#/components/schemas/Mode' validity: type: integer example: 20000 @@ -759,99 +660,3 @@ components: items: $ref: '#/components/schemas/SubscriptionSingle' - Error: - required: - - code - - message - properties: - code: - type: integer - format: int32 - example: 406 - message: - type: string - example: "Error 406" - - # From World Storage - EncodingInformationStructure: - description: An object holding the info of a Trackable`'`s encoding information `:` the data format and the version. - required: - - dataFormat - - version - properties: - dataFormat: - description: Identifier of the target framework. - type: string - enum: [HOLOLENS, ARKIT, ARCORE, VUFORIA, ARUCO, OTHER] - example : "HOLOLENS" - version: - description: The version of the format - type: string - example : "1.01" - - #------------------------------- - # Reusable responses - #------------------------------- - responses: - ####################### - # 1xx : Informational # - ####################### - ################# - # 2xx : Success # - ################# - - ##################### - # 3xx : Redirection # - ##################### - - ####################### - # 4xx : Client Errors # - ####################### - 400_BadRequest: - description: Bad/Invalid request. - content: - text/plain: - schema: - type: string - example: "Bad request" - - 403_Forbidden: - description: Not allowed. - content: - text/plain: - schema: - type: string - example: "Not allowed" - - 404_NotFound: - description: Not found. - content: - text/plain: - schema: - type: string - example: "Not found" - - 405_NotSupported: - description: Not supported. - content: - text/plain: - schema: - type: string - example: "Not supported" - - 4xx_UnexpectedError: # Can be referenced as '#/components/responses/GenericError' - description: Unexpected error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - - ######################## - # 5xx : Server Errors # - ######################## - 5xx_UnexpectedError: - description: Unexpected server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' diff --git a/API/worldstorage/worldstorageopenapi.yaml b/API/worldstorage/worldstorageopenapi.yaml index 0aa5d46..b0fa86a 100644 --- a/API/worldstorage/worldstorageopenapi.yaml +++ b/API/worldstorage/worldstorageopenapi.yaml @@ -91,8 +91,8 @@ paths: - in: header name: token schema: - $ref: '#/components/schemas/Token' - - in: query + $ref: '../common/commonopenapi.yaml#/components/schemas/Token' + - in: header name: uuids description: List of pairs consisting of UUIDs of requested World Anchors or Trackables and a mode representing the context of the requested information required: true @@ -107,17 +107,16 @@ paths: format: uuid example: "fa8bbe40-8052-11ec-a8a3-0242ac120002" mode: - description: Mode representing the context of the Relocalization information (AR device to WorldAnchor/Trackable or WorldAnchor/Trackable to AR device) - $ref: '#/components/schemas/Mode' + $ref: '../common/commonopenapi.yaml#/components/schemas/Mode' - - in: query + - in: header name: capabilities description: the list of all trackables and his encoding structure associated representing the supported data of the User required: true schema: type: array items: - $ref: '#/components/schemas/Capability' + $ref: '../common/commonopenapi.yaml#/components/schemas/Capability' responses: '200': description: Successful operation. @@ -131,11 +130,11 @@ paths: items: $ref: '#/components/schemas/RelocalizationInformation' '400': - $ref: '#/components/responses/400_InvalidUUID' + $ref: '../common/commonopenapi.yaml#/components/responses/400_InvalidUUID' '404': - $ref: '#/components/responses/404_NotFoundUUID' + $ref: '../common/commonopenapi.yaml#/components/responses/404_NotFoundUUID' 'default': - $ref: '#/components/responses/4xx_UnexpectedError' + $ref: '../common/commonopenapi.yaml#/components/responses/4xx_UnexpectedError' @@ -157,7 +156,7 @@ paths: - in: header name: token schema: - $ref: '#/components/schemas/Token' + $ref: '../common/commonopenapi.yaml#/components/schemas/Token' requestBody: description: The Trackable to be added to the world storage. required: true @@ -181,11 +180,11 @@ paths: type: string example: "" '400': - $ref: '#/components/responses/400_BadRequest' + $ref: '../common/commonopenapi.yaml#/components/responses/400_BadRequest' '409': - $ref: '#/components/responses/409_NotEmptyUUID' + $ref: '../common/commonopenapi.yaml#/components/responses/409_NotEmptyUUID' 'default': - $ref: '#/components/responses/4xx_UnexpectedError' + $ref: '../common/commonopenapi.yaml#/components/responses/4xx_UnexpectedError' put: summary: Modify a Trackable. operationId: modifyTrackable @@ -196,7 +195,7 @@ paths: - in: header name: token schema: - $ref: '#/components/schemas/Token' + $ref: '../common/commonopenapi.yaml#/components/schemas/Token' requestBody: description: The Trackable to be modified in the world storage. required: true @@ -213,11 +212,11 @@ paths: type: string example: "777266da-e286-11ec-8fea-0242ac120002" '400': - $ref: '#/components/responses/400_BadRequest' + $ref: '../common/commonopenapi.yaml#/components/responses/400_BadRequest' '404': - $ref: '#/components/responses/404_NotFoundUUID' + $ref: '../common/commonopenapi.yaml#/components/responses/404_NotFoundUUID' 'default': - $ref: '#/components/responses/4xx_UnexpectedError' + $ref: '../common/commonopenapi.yaml#/components/responses/4xx_UnexpectedError' get: summary: Return all the Trackables. operationId: getTrackables @@ -228,7 +227,7 @@ paths: - in: header name: token schema: - $ref: '#/components/schemas/Token' + $ref: '../common/commonopenapi.yaml#/components/schemas/Token' responses: '200': description: OK, return all the Trackables defined by the world storage. @@ -246,7 +245,7 @@ paths: type: string example: "" default: - $ref: '#/components/responses/4xx_UnexpectedError' + $ref: '../common/commonopenapi.yaml#/components/responses/4xx_UnexpectedError' /trackables/{trackableUUID}: get: @@ -259,7 +258,7 @@ paths: - in: header name: token schema: - $ref: '#/components/schemas/Token' + $ref: '../common/commonopenapi.yaml#/components/schemas/Token' - name: trackableUUID in: path description: UUID of the Trackable to retrieve. @@ -275,9 +274,9 @@ paths: schema: $ref: '#/components/schemas/Trackable' '400': - $ref: '#/components/responses/400_InvalidUUID' + $ref: '../common/commonopenapi.yaml#/components/responses/400_InvalidUUID' '404': - $ref: '#/components/responses/404_NotFoundUUID' + $ref: '../common/commonopenapi.yaml#/components/responses/404_NotFoundUUID' delete: summary: Delete a Trackable. operationId: deleteTrackable @@ -288,7 +287,7 @@ paths: - in: header name: token schema: - $ref: '#/components/schemas/Token' + $ref: '../common/commonopenapi.yaml#/components/schemas/Token' - name: trackableUUID in: path description: Trackable UUID to delete. @@ -305,9 +304,9 @@ paths: type: string example: "Element succesfully deleted" '400': - $ref: '#/components/responses/400_InvalidUUID' + $ref: '../common/commonopenapi.yaml#/components/responses/400_InvalidUUID' '404': - $ref: '#/components/responses/404_NotFoundUUID' + $ref: '../common/commonopenapi.yaml#/components/responses/404_NotFoundUUID' ################# # WORLD ANCHORS # @@ -323,7 +322,7 @@ paths: - in: header name: token schema: - $ref: '#/components/schemas/Token' + $ref: '../common/commonopenapi.yaml#/components/schemas/Token' requestBody: description: The World Anchor to be added to the world storage. required: true @@ -347,11 +346,11 @@ paths: type: string example: "" '400': - $ref: '#/components/responses/400_BadRequest' + $ref: '../common/commonopenapi.yaml#/components/responses/400_BadRequest' '409': - $ref: '#/components/responses/409_NotEmptyUUID' + $ref: '../common/commonopenapi.yaml#/components/responses/409_NotEmptyUUID' 'default': - $ref: '#/components/responses/4xx_UnexpectedError' + $ref: '../common/commonopenapi.yaml#/components/responses/4xx_UnexpectedError' put: summary: Modify a World Anchor. operationId: modifyWorldAnchor @@ -362,7 +361,7 @@ paths: - in: header name: token schema: - $ref: '#/components/schemas/Token' + $ref: '../common/commonopenapi.yaml#/components/schemas/Token' requestBody: description: The World Anchor to be modified in the world storage. required: true @@ -379,11 +378,11 @@ paths: type: string example: "777266da-e286-11ec-8fea-0242ac120002" '400': - $ref: '#/components/responses/400_BadRequest' + $ref: '../common/commonopenapi.yaml#/components/responses/400_BadRequest' '404': - $ref: '#/components/responses/404_NotFoundUUID' + $ref: '../common/commonopenapi.yaml#/components/responses/404_NotFoundUUID' 'default': - $ref: '#/components/responses/4xx_UnexpectedError' + $ref: '../common/commonopenapi.yaml#/components/responses/4xx_UnexpectedError' get: summary: Return all the World Anchors. operationId: getWorldAnchors @@ -394,7 +393,7 @@ paths: - in: header name: token schema: - $ref: '#/components/schemas/Token' + $ref: '../common/commonopenapi.yaml#/components/schemas/Token' responses: '200': description: OK, return all the World Anchors defined by the world storage. @@ -412,7 +411,7 @@ paths: type: string example: "" default: - $ref: '#/components/responses/4xx_UnexpectedError' + $ref: '../common/commonopenapi.yaml#/components/responses/4xx_UnexpectedError' /worldAnchors/{worldAnchorUUID}: get: @@ -425,7 +424,7 @@ paths: - in: header name: token schema: - $ref: '#/components/schemas/Token' + $ref: '../common/commonopenapi.yaml#/components/schemas/Token' - name: worldAnchorUUID in: path description: UUID of the World Anchor to retrieve. @@ -441,9 +440,9 @@ paths: schema: $ref: '#/components/schemas/WorldAnchor' '400': - $ref: '#/components/responses/400_InvalidUUID' + $ref: '../common/commonopenapi.yaml#/components/responses/400_InvalidUUID' '404': - $ref: '#/components/responses/404_NotFoundUUID' + $ref: '../common/commonopenapi.yaml#/components/responses/404_NotFoundUUID' delete: summary: Delete a World Anchor. operationId: deleteWorldAnchor @@ -454,7 +453,7 @@ paths: - in: header name: token schema: - $ref: '#/components/schemas/Token' + $ref: '../common/commonopenapi.yaml#/components/schemas/Token' - name: worldAnchorUUID in: path description: World Anchor UUID to delete. @@ -471,9 +470,9 @@ paths: type: string example: "Element succesfuly deleted" '400': - $ref: '#/components/responses/400_InvalidUUID' + $ref: '../common/commonopenapi.yaml#/components/responses/400_InvalidUUID' '404': - $ref: '#/components/responses/404_NotFoundUUID' + $ref: '../common/commonopenapi.yaml#/components/responses/404_NotFoundUUID' ############### # WORLD LINKS # @@ -489,7 +488,7 @@ paths: - in: header name: token schema: - $ref: '#/components/schemas/Token' + $ref: '../common/commonopenapi.yaml#/components/schemas/Token' requestBody: description: The link to be added to the world storage. required: true @@ -513,11 +512,11 @@ paths: type: string example: "" '400': - $ref: '#/components/responses/400_BadRequest' + $ref: '../common/commonopenapi.yaml#/components/responses/400_BadRequest' '409': - $ref: '#/components/responses/409_NotEmptyUUID' + $ref: '../common/commonopenapi.yaml#/components/responses/409_NotEmptyUUID' 'default': - $ref: '#/components/responses/4xx_UnexpectedError' + $ref: '../common/commonopenapi.yaml#/components/responses/4xx_UnexpectedError' put: summary: Modify a World Link. operationId: modifyWorldLink @@ -528,7 +527,7 @@ paths: - in: header name: token schema: - $ref: '#/components/schemas/Token' + $ref: '../common/commonopenapi.yaml#/components/schemas/Token' requestBody: description: The World Link to be modified in the world storage. required: true @@ -545,11 +544,11 @@ paths: type: string example: "777266da-e286-11ec-8fea-0242ac120002" '400': - $ref: '#/components/responses/400_BadRequest' + $ref: '../common/commonopenapi.yaml#/components/responses/400_BadRequest' '404': - $ref: '#/components/responses/404_NotFoundUUID' + $ref: '../common/commonopenapi.yaml#/components/responses/404_NotFoundUUID' 'default': - $ref: '#/components/responses/4xx_UnexpectedError' + $ref: '../common/commonopenapi.yaml#/components/responses/4xx_UnexpectedError' get: summary: Return all World Links. description: Get all the World Links currently being stored in the world storage. @@ -560,7 +559,7 @@ paths: - in: header name: token schema: - $ref: '#/components/schemas/Token' + $ref: '../common/commonopenapi.yaml#/components/schemas/Token' responses: '200': description: OK return all the World Links defined by the world storage. @@ -578,7 +577,7 @@ paths: type: string example: "" default: - $ref: '#/components/responses/4xx_UnexpectedError' + $ref: '../common/commonopenapi.yaml#/components/responses/4xx_UnexpectedError' /worldLinks/{worldLinkUUID}: get: @@ -591,7 +590,7 @@ paths: - in: header name: token schema: - $ref: '#/components/schemas/Token' + $ref: '../common/commonopenapi.yaml#/components/schemas/Token' - name: worldLinkUUID in: path description: UUID of the World Link to retrieve. @@ -607,9 +606,9 @@ paths: schema: $ref: '#/components/schemas/WorldLink' '400': - $ref: '#/components/responses/400_InvalidUUID' + $ref: '../common/commonopenapi.yaml#/components/responses/400_InvalidUUID' '404': - $ref: '#/components/responses/404_NotFoundUUID' + $ref: '../common/commonopenapi.yaml#/components/responses/404_NotFoundUUID' delete: summary: Delete a World Link. operationId: deleteWorldLink @@ -620,7 +619,7 @@ paths: - in: header name: token schema: - $ref: '#/components/schemas/Token' + $ref: '../common/commonopenapi.yaml#/components/schemas/Token' - name: worldLinkUUID in: path description: World Link id to delete. @@ -637,338 +636,176 @@ paths: type: string example: "Element succesfully deleted" '400': - $ref: '#/components/responses/400_InvalidUUID' + $ref: '../common/commonopenapi.yaml#/components/responses/400_InvalidUUID' '404': - $ref: '#/components/responses/404_NotFoundUUID' + $ref: '../common/commonopenapi.yaml#/components/responses/404_NotFoundUUID' - # COMPONENTS ############################################### components: - #------------------------------- - # Reusable schemas (data models) - #------------------------------- - schemas: - - - RelocalizationInformation: - description: An element representing all information needed in relation with a Trackable or a WorldAnchor. - type: object - properties: - rootUUID: - description: The UUID of the original WorldAnchor or the Trackable asked. - type: string - format: uuid - example: 89b7e1f5-dd41-4746-9279-e1ef9284fe4d - relocObjects: - description: an array with trackables and their transforms linking them to the rootUUID element. - type: array - items: + #------------------------------- + # Reusable schemas (data models) + #------------------------------- + schemas: + RelocalizationInformation: + description: An element representing all information needed in relation with a Trackable or a WorldAnchor. type: object properties: - trackable: - $ref : '#/components/schemas/Trackable' - Transform3D: - $ref : '#/components/schemas/Transform3D' - mode: - description: Mode representing the context of the Relocalization information (AR device to WorldAnchor/Trackable or WorldAnchor/Trackable to AR device) - $ref: '#/components/schemas/Mode' - - Mode: - description: Mode representing the context of the relocalization information (AR device to WorldAnchor/Trackable or WorldAnchor/Trackable to AR device) - type: string - enum: [DEVICE_TO_TRACKABLE_OR_ANCHOR, TRACKABLE_OR_ANCHOR_TO_DEVICE] - example: DEVICE_TO_TRACKABLE_OR_ANCHOR - - Trackable: - description: An element representing a Trackable object in the real world. - type: object - required: - - name - - creatorUUID - - trackableType - - trackableEncodingInformation - - trackablePayload - - localCRS - - unit - - trackableSize - - keyvalueTags - properties: - UUID: - description: An Universally Unique IDentifier identifying the Trackable (RFC 4122). - type: string - format: uuid - example: fa8bbe40-8052-11ec-a8a3-0242ac120002 - name: - description: A human readable name for the Trackable. - type: string - example: myTrackableXYZ - creatorUUID: - description: An Universally Unique IDentifier identifying the creator of the Trackable (a person, a team or a company). - type: string - format: uuid - example: bd6ce7ce-7fe8-487d-a179-fddfe914f293 - trackableType: - description: Extensible list of Trackable types, possibly handled by complient world storage implementation. - type: string - enum: [FIDUCIAL_MARKER, IMAGE_MARKER, MAP, GEOPOSE, OTHER] - example: FIDUCIAL_MARKER - trackableEncodingInformation: - $ref: '#/components/schemas/EncodingInformationStructure' - trackablePayload: - description: The data provided to create the Trackable in a specific format handled by the world storage service. - type: string - format: byte - example: "10110101" - localCRS: - $ref: '#/components/schemas/Transform3D' - unit: - $ref: '#/components/schemas/UnitSystem' - trackableSize: - $ref: '#/components/schemas/Size' - keyvalueTags: - $ref: '#/components/schemas/KeyvalueTagList' - confidence: - type: number - example : 50.00 - - - WorldAnchor: - description: An element describing a pose in the world graph. - type: object - required: - - name - - creatorUUID - - localCRS - - unit - - worldAnchorSize - - keyvalueTags - properties: - UUID: - description: An Universally Unique IDentifier identifying the World Anchor (RFC 4122). - type: string - format: uuid - example: 49d18ab3-1bf8-481d-919b-cd062a2fd428 - name: - description: A human readable name for the World Anchor. - type: string - example: myWorldAnchorXYZ - creatorUUID: - description: An Universally Unique IDentifier identifying the creator of the World Anchor. - type: string - format: uuid - example: 6ddeb59e-7740-42f7-b329-1374b92e7fc2 - localCRS: - $ref: '#/components/schemas/Transform3D' - unit: - $ref: '#/components/schemas/UnitSystem' - worldAnchorSize: - $ref: '#/components/schemas/Size' - keyvalueTags: - $ref: '#/components/schemas/KeyvalueTagList' - - WorldLink: - description: An object holding the info of a transform between two elements. - type: object - required: - - creatorUUID - - UUIDFrom - - UUIDTo - - typeFrom - - typeTo - - transform - - unit - - keyvalueTags - properties: - UUID: - description: An Universally Unique IDentifier identifying the World Link (RFC 4122). - type: string - format: uuid - example: c6998f4f-1b8d-460b-9de8-4793b92fae2a - creatorUUID: - description: An Universally Unique IDentifier identifying the creator of the World Link. - type: string - format: uuid - example: 7506001c-9c00-4f84-ae2e-e4dfcb77d36a - UUIDFrom: - description: An Universally Unique IDentifier identifying a World Anchor or Trackable. - type: string - format: uuid - example: 60e11d81-1230-4588-be4c-93520a275012 - UUIDTo: - description: An Universally Unique IDentifier identifying a World Anchor or Trackable. - type: string - format: uuid - example: 85eed503-875c-4d3d-9569-06c4859bd4cd - typeFrom: - $ref: '#/components/schemas/ObjectType' - typeTo: - $ref: '#/components/schemas/ObjectType' - transform: - $ref: '#/components/schemas/Transform3D' - unit: - $ref: '#/components/schemas/UnitSystem' - keyvalueTags: - $ref: '#/components/schemas/KeyvalueTagList' - - Capability: - description: An object representing an instance of the possible supported data - type: object - uniqueItems: true - properties: - trackableType: - type: string - enum: [FIDUCIAL_MARKER, IMAGE_MARKER, MAP, GEOPOSE, OTHER] - example: "FIDUCIAL_MARKER" - encodingInformation: - $ref: '#/components/schemas/EncodingInformationStructure' - - - - EncodingInformationStructure: - description: An object holding the info of a Trackable`'`s encoding information `:` the data format and the version. - required: - - dataFormat - - version - properties: - dataFormat: - description: Identifier of the target framework. - type: string - enum: [HOLOLENS, ARKIT, ARCORE, VUFORIA, ARUCO, OTHER] - example : "HOLOLENS" - version: - description: The version of the format - type: string - example : "1.01" - - Transform3D: - description: Coordinate reference system of the world anchor, a 4*4 matrix (rowmajor) represented by a float vector. - type: array - minItems: 16 - maxItems: 16 - items: - type: number - format: float - example: [ 1, 0, 0, 3, - 0, 1, 0, 3, - 0, 0, 1, 3, - 0, 0, 0, 1] - - ObjectType: - description: Type of a world representaion object. - type: string - enum: [Trackable, WorldAnchor, NotIdentified] - example: Trackable - - UnitSystem: - description: Unit of length. - type: string - enum: [MM, CM, DM, M, DAM, HM, KM, INCH, FOOT, YARD, MILE] - example: M - - Size: - description: Size object in format {width, length, depth}. - type: array - items: - type: number - format: double - minItems: 3 - maxItems: 3 - example: [1.0,1.0,1.5] - - KeyvalueTagList: - description: List of additional parameters to be stored with the object. - type: object - additionalProperties: - type: array - items: + requestUUID: + description: The UUID of the original WorldAnchor or the Trackable requested. type: string - minItems: 1 - example: { "Place" : ["Building 123"], "Room" : ["007"]} - - Token: - type: string - example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwczovL2V4YW1wbGUuYXV0aDAuY29tLyIsImF1ZCI6Imh0dHBzOi8vYXBpLmV4YW1wbGUuY29tL2NhbGFuZGFyL3YxLyIsInN1YiI6InVzcl8xMjMiLCJpYXQiOjE0NTg3ODU3OTYsImV4cCI6MTQ1ODg3MjE5Nn0.CA7eaHjIHz5NxeIJoFK9krqaeZrPLwmMmgI_XiQiIkQ - description: A string representing the token of the User. - - Error: - required: - - code - - message - properties: - code: - type: integer - format: int32 - example: 406 - message: - type: string - example: "Error 406" - - #------------------------------- - # Reusable responses - #------------------------------- - responses: - ####################### - # 1xx : Informational # - ####################### - - ################# - # 2xx : Success # - ################# - - ##################### - # 3xx : Redirection # - ##################### - - ####################### - # 4xx : Client Errors # - ####################### - 400_BadRequest: - description: Bad request. - content: - text/plain: - schema: - type: string - example: "Bad request" - - 400_InvalidUUID: - description: Invalid UUID supplied. - content: - text/plain: - schema: - example: "The format of the UUID is incorrect" - type: string - - 404_NotFoundUUID: - description: Not found, could not find UUID in database. - content: - text/plain: - schema: - type: string - example: "Element not found" - - 409_NotEmptyUUID: - description: Invalid UUID, id must be a Nil value. - content: - text/plain: - schema: - type: string - example: "The element you sent has already a value and can't be sent to the world storage" - - 4xx_UnexpectedError: # Can be referenced as '#/components/responses/GenericError' - description: Unexpected error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - - ######################## - # 5xx : Server Errors # - ######################## - 5xx_UnexpectedError: - description: Unexpected server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' + format: uuid + example: 89b7e1f5-dd41-4746-9279-e1ef9284fe4d + relocObjects: + description: an array with trackables and their transforms linking them to the requestUUID element. + type: array + items: + type: object + properties: + trackable: + $ref : '#/components/schemas/Trackable' + Transform3D: + $ref : '../common/commonopenapi.yaml#/components/schemas/Transform3D' + mode: + $ref: '#/components/schemas/Mode' + + Trackable: + description: An element representing a Trackable object in the real world. + type: object + required: + - name + - creatorUUID + - trackableType + - trackableEncodingInformation + - trackablePayload + - localCRS + - unit + - trackableSize + - keyvalueTags + properties: + UUID: + description: An Universally Unique IDentifier identifying the Trackable (RFC 4122). + type: string + format: uuid + example: fa8bbe40-8052-11ec-a8a3-0242ac120002 + name: + description: A human readable name for the Trackable. + type: string + example: myTrackableXYZ + creatorUUID: + description: An Universally Unique IDentifier identifying the creator of the Trackable (a person, a team or a company). + type: string + format: uuid + example: bd6ce7ce-7fe8-487d-a179-fddfe914f293 + trackableType: + description: Extensible list of Trackable types, possibly handled by complient world storage implementation. + type: string + enum: [FIDUCIAL_MARKER, IMAGE_MARKER, MAP, GEOPOSE, OTHER] + example: FIDUCIAL_MARKER + trackableEncodingInformation: + $ref: '#/components/schemas/EncodingInformationStructure' + trackablePayload: + description: The data provided to create the Trackable in a specific format handled by the world storage service. + type: string + format: byte + example: "10110101" + localCRS: + $ref: '../common/commonopenapi.yaml#/components/schemas/Transform3D' + unit: + $ref: '#/components/schemas/UnitSystem' + trackableSize: + $ref: '../common/commonopenapi.yaml#/components/schemas/Size' + keyvalueTags: + $ref: '#/components/schemas/KeyvalueTagList' + confidence: + type: number + example : 50.00 + + WorldAnchor: + description: An element describing a pose in the world graph. + type: object + required: + - name + - creatorUUID + - localCRS + - unit + - worldAnchorSize + - keyvalueTags + properties: + UUID: + description: An Universally Unique IDentifier identifying the World Anchor (RFC 4122). + type: string + format: uuid + example: 49d18ab3-1bf8-481d-919b-cd062a2fd428 + name: + description: A human readable name for the World Anchor. + type: string + example: myWorldAnchorXYZ + creatorUUID: + description: An Universally Unique IDentifier identifying the creator of the World Anchor. + type: string + format: uuid + example: 6ddeb59e-7740-42f7-b329-1374b92e7fc2 + localCRS: + $ref: '#/components/schemas/Transform3D' + unit: + $ref: '#/components/schemas/UnitSystem' + worldAnchorSize: + $ref: '../common/commonopenapi.yaml#/components/schemas/Size' + keyvalueTags: + $ref: '#/components/schemas/KeyvalueTagList' + + WorldLink: + description: An object holding the info of a transform between two elements. + type: object + required: + - creatorUUID + - UUIDFrom + - UUIDTo + - typeFrom + - typeTo + - transform + - unit + - keyvalueTags + properties: + UUID: + description: An Universally Unique IDentifier identifying the World Link (RFC 4122). + type: string + format: uuid + example: c6998f4f-1b8d-460b-9de8-4793b92fae2a + creatorUUID: + description: An Universally Unique IDentifier identifying the creator of the World Link. + type: string + format: uuid + example: 7506001c-9c00-4f84-ae2e-e4dfcb77d36a + UUIDFrom: + description: An Universally Unique IDentifier identifying a World Anchor or Trackable. + type: string + format: uuid + example: 60e11d81-1230-4588-be4c-93520a275012 + UUIDTo: + description: An Universally Unique IDentifier identifying a World Anchor or Trackable. + type: string + format: uuid + example: 85eed503-875c-4d3d-9569-06c4859bd4cd + typeFrom: + $ref: '../common/commonopenapi.yaml#/components/schemas/TypeWorldStorage' + typeTo: + $ref: '../common/commonopenapi.yaml#/components/schemas/TypeWorldStorage' + transform: + $ref: '../common/commonopenapi.yaml#/components/schemas/Transform3D' + unit: + $ref: '#/components/schemas/UnitSystem' + keyvalueTags: + $ref: '#/components/schemas/KeyvalueTagList' + + KeyvalueTagList: + description: List of additional parameters to be stored with the object. + type: object + additionalProperties: + type: array + items: + type: string + minItems: 1 + example: { "Place" : ["Building 123"], "Room" : ["007"]} \ No newline at end of file -- GitLab From e087faf33c85b581114b3bf0cf6d3f8359bfa3ca Mon Sep 17 00:00:00 2001 From: kreber Date: Fri, 1 Mar 2024 16:26:04 +0100 Subject: [PATCH 2/4] add openapi: 3.3.0 --- API/common/commonopenapi.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/API/common/commonopenapi.yaml b/API/common/commonopenapi.yaml index 496fb00..ce7e364 100644 --- a/API/common/commonopenapi.yaml +++ b/API/common/commonopenapi.yaml @@ -2,7 +2,7 @@ - + openapi: 3.0.0 # COMPONENTS ############################################### -- GitLab From d4cf05508ab8ba4770aa690a99d26cf9850dfc77 Mon Sep 17 00:00:00 2001 From: kreber Date: Mon, 4 Mar 2024 16:29:36 +0100 Subject: [PATCH 3/4] creating a different mode for worldStorage and worldAnalysis --- API/common/commonopenapi.yaml | 8 +++++++- API/worldanalysis/worldanalysisopenapi.yaml | 14 +++++++------- API/worldstorage/worldstorageopenapi.yaml | 4 ++-- 3 files changed, 16 insertions(+), 10 deletions(-) diff --git a/API/common/commonopenapi.yaml b/API/common/commonopenapi.yaml index ce7e364..2b792ea 100644 --- a/API/common/commonopenapi.yaml +++ b/API/common/commonopenapi.yaml @@ -13,7 +13,13 @@ #------------------------------- schemas: - Mode: + Mode_WorldAnalysis: + description: Mode representing the context of the relocalization information (AR device to WorldAnchor/Trackable or WorldAnchor/Trackable to AR device) + type: string + enum: [TRACKABLES_TO_DEVICE, DEVICE_TO_TRACKABLES] + example: TRACKABLES_TO_DEVICE + + Mode_WorldStorage: description: Mode representing the context of the relocalization information (AR device to WorldAnchor/Trackable or WorldAnchor/Trackable to AR device) type: string enum: [TRACKABLES_TO_REQUEST, REQUEST_TO_TRACKABLES] diff --git a/API/worldanalysis/worldanalysisopenapi.yaml b/API/worldanalysis/worldanalysisopenapi.yaml index fce0ade..6832c93 100644 --- a/API/worldanalysis/worldanalysisopenapi.yaml +++ b/API/worldanalysis/worldanalysisopenapi.yaml @@ -116,7 +116,7 @@ paths: description: Mode representing the context of the Relocalization information (AR device to WorldAnchor/Trackable or WorldAnchor/Trackable to AR device) required: true schema: - $ref: '../common/commonopenapi.yaml#/components/schemas/Mode' + $ref: '../common/commonopenapi.yaml#/components/schemas/Mode_WorldAnalysis' responses: '200': description: Successful operation. @@ -166,7 +166,7 @@ paths: description: Mode representing the context of the Relocalization information (AR device to WorldAnchor/Trackable or WorldAnchor/Trackable to AR device) required: true schema: - $ref: '../common/commonopenapi.yaml#/components/schemas/Mode' + $ref: '../common/commonopenapi.yaml#/components/schemas/Mode_WorldAnalysis' responses: '200': description: Successful operation. @@ -312,7 +312,7 @@ paths: properties: mode: description: Mode representing the context of the Relocalization information (AR device to WorldAnchor/Trackable or WorldAnchor/Trackable to AR device) - $ref: '../common/commonopenapi.yaml#/components/schemas/Mode' + $ref: '../common/commonopenapi.yaml#/components/schemas/Mode_WorldAnalysis' validity: description: Subscription validity delay in millisecond type: integer @@ -484,7 +484,7 @@ components: example : 50.00 mode: description: Mode representing the context of the Relocalization information (AR device to WorldAnchor/Trackable or WorldAnchor/Trackable to AR device) - $ref: '../common/commonopenapi.yaml#/components/schemas/Mode' + $ref: '../common/commonopenapi.yaml#/components/schemas/Mode_WorldAnalysis' value: description: The pose value oneOf: @@ -583,7 +583,7 @@ components: example: [ "fa8bbe40-8052-11ec-a8a3-0242ac120002", "fa8bbe40-8052-11ec-a8a3-0242ac120003"] mode: description: Mode representing the context of the Relocalization information (AR device to WorldAnchor/Trackable or WorldAnchor/Trackable to AR device) - $ref: '../common/commonopenapi.yaml#/components/schemas/Mode' + $ref: '../common/commonopenapi.yaml#/components/schemas/Mode_WorldAnalysis' validity: description: Subscription validity delay in millisecond type: integer @@ -609,7 +609,7 @@ components: example: [ "fa8bbe40-8052-11ec-a8a3-0242ac120002", "fa8bbe40-8052-11ec-a8a3-0242ac120003"] mode: description: Mode representing the context of the Relocalization information (AR device to WorldAnchor/Trackable or WorldAnchor/Trackable to AR device) - $ref: '../common/commonopenapi.yaml#/components/schemas/Mode' + $ref: '../common/commonopenapi.yaml#/components/schemas/Mode_WorldAnalysis' validity: description: Subscription validity delay in millisecond type: integer @@ -638,7 +638,7 @@ components: example: "fa8bbe40-8052-11ec-a8a3-0242ac120002" mode: description: Mode representing the context of the Relocalization information (AR device to WorldAnchor/Trackable or WorldAnchor/Trackable to AR device) - $ref: '../common/commonopenapi.yaml#/components/schemas/Mode' + $ref: '../common/commonopenapi.yaml#/components/schemas/Mode_WorldAnalysis' validity: type: integer example: 20000 diff --git a/API/worldstorage/worldstorageopenapi.yaml b/API/worldstorage/worldstorageopenapi.yaml index b0fa86a..6934fc1 100644 --- a/API/worldstorage/worldstorageopenapi.yaml +++ b/API/worldstorage/worldstorageopenapi.yaml @@ -107,7 +107,7 @@ paths: format: uuid example: "fa8bbe40-8052-11ec-a8a3-0242ac120002" mode: - $ref: '../common/commonopenapi.yaml#/components/schemas/Mode' + $ref: '../common/commonopenapi.yaml#/components/schemas/Mode_WorldStorage' - in: header name: capabilities @@ -668,7 +668,7 @@ components: Transform3D: $ref : '../common/commonopenapi.yaml#/components/schemas/Transform3D' mode: - $ref: '#/components/schemas/Mode' + $ref: '#/components/schemas/Mode_WorldStorage' Trackable: description: An element representing a Trackable object in the real world. -- GitLab From 7081381cd16303cb397bc2f1dcefb3bd0f4cfceb Mon Sep 17 00:00:00 2001 From: kreber Date: Mon, 4 Mar 2024 17:11:16 +0100 Subject: [PATCH 4/4] fix mistake: parameter of relocalization information in query --- API/worldstorage/worldstorageopenapi.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/API/worldstorage/worldstorageopenapi.yaml b/API/worldstorage/worldstorageopenapi.yaml index 6934fc1..33a9887 100644 --- a/API/worldstorage/worldstorageopenapi.yaml +++ b/API/worldstorage/worldstorageopenapi.yaml @@ -92,7 +92,7 @@ paths: name: token schema: $ref: '../common/commonopenapi.yaml#/components/schemas/Token' - - in: header + - in: query name: uuids description: List of pairs consisting of UUIDs of requested World Anchors or Trackables and a mode representing the context of the requested information required: true @@ -109,7 +109,7 @@ paths: mode: $ref: '../common/commonopenapi.yaml#/components/schemas/Mode_WorldStorage' - - in: header + - in: query name: capabilities description: the list of all trackables and his encoding structure associated representing the supported data of the User required: true -- GitLab