diff --git a/API/common/commonopenapi.yaml b/API/common/commonopenapi.yaml new file mode 100644 index 0000000000000000000000000000000000000000..10e43658cd974d6166499110521b942dcbc23785 --- /dev/null +++ b/API/common/commonopenapi.yaml @@ -0,0 +1,147 @@ + +openapi: "3.0.0" + +# COMPONENTS ############################################### +components: + + #------------------------------- + # Reusable schemas (data models) + #------------------------------- + schemas: + + Token: + type: string + example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwczovL2V4YW1wbGUuYXV0aDAuY29tLyIsImF1ZCI6Imh0dHBzOi8vYXBpLmV4YW1wbGUuY29tL2NhbGFuZGFyL3YxLyIsInN1YiI6InVzcl8xMjMiLCJpYXQiOjE0NTg3ODU3OTYsImV4cCI6MTQ1ODg3MjE5Nn0.CA7eaHjIHz5NxeIJoFK9krqaeZrPLwmMmgI_XiQiIkQ + description: A string representing the token of the User. + + 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 ] + + 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" + + 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_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" + + 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' \ No newline at end of file diff --git a/API/worldanalysis/worldanalysisopenapi.yaml b/API/worldanalysis/worldanalysisopenapi.yaml index e7038181445d15d459b4eb9a848092973dfe2d23..e0d5bb08e070e0cc987b3ec8bfd46efc99bf6deb 100644 --- a/API/worldanalysis/worldanalysisopenapi.yaml +++ b/API/worldanalysis/worldanalysisopenapi.yaml @@ -68,7 +68,7 @@ paths: - in: header name: token schema: - $ref: '#/components/schemas/Token' + $ref: './../common/commonopenapi.yaml#/components/schemas/Token' - in: header name: sessionID schema: @@ -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,7 +98,7 @@ paths: - in: header name: token schema: - $ref: '#/components/schemas/Token' + $ref: './../common/commonopenapi.yaml#/components/schemas/Token' - in: header name: sessionID schema: @@ -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_NotFoundUUID' '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,7 +146,7 @@ paths: - in: header name: token schema: - $ref: '#/components/schemas/Token' + $ref: './../common/commonopenapi.yaml#/components/schemas/Token' - in: header name: sessionID schema: @@ -185,15 +185,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_NotFoundUUID' '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: @@ -206,7 +206,7 @@ paths: - in: header name: token schema: - $ref: '#/components/schemas/Token' + $ref: './../common/commonopenapi.yaml#/components/schemas/Token' - in: header name: sessionID schema: @@ -239,15 +239,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_NotFoundUUID' '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}: @@ -261,7 +261,7 @@ paths: - in: header name: token schema: - $ref: '#/components/schemas/Token' + $ref: './../common/commonopenapi.yaml#/components/schemas/Token' - in: header name: sessionID schema: @@ -282,9 +282,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_NotFoundUUID' put: summary: Update a subscription operationId: updateSubscription @@ -295,7 +295,7 @@ paths: - in: header name: token schema: - $ref: '#/components/schemas/Token' + $ref: './../common/commonopenapi.yaml#/components/schemas/Token' - in: header name: sessionID schema: @@ -335,9 +335,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_NotFoundUUID' delete: summary: Remove a subscription to a given pose operationId: unsubscribeFromPose @@ -348,7 +348,7 @@ paths: - in: header name: token schema: - $ref: '#/components/schemas/Token' + $ref: './../common/commonopenapi.yaml#/components/schemas/Token' - in: header name: sessionID schema: @@ -370,9 +370,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_NotFoundUUID' /capabilities: get: @@ -385,7 +385,7 @@ paths: - in: header name: token schema: - $ref: '#/components/schemas/Token' + $ref: './../common/commonopenapi.yaml#/components/schemas/Token' - in: header name: sessionID schema: @@ -403,7 +403,7 @@ paths: items: $ref: '#/components/schemas/Capability' 'default': - $ref: '#/components/responses/4xx_UnexpectedError' + $ref: './../common/commonopenapi.yaml#/components/responses/4xx_UnexpectedError' /capabilities/{trackableOrAnchorUUID}: @@ -417,7 +417,7 @@ paths: - in: header name: token schema: - $ref: '#/components/schemas/Token' + $ref: './../common/commonopenapi.yaml#/components/schemas/Token' - in: header name: sessionID schema: @@ -442,15 +442,15 @@ paths: capability: $ref: '#/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_NotFoundUUID' '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: @@ -459,12 +459,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 @@ -532,10 +527,10 @@ components: properties: transform: description : Pose data - $ref: '#/components/schemas/Transform3D' + $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' VectorQuaternionPoseValue: description: A pose value that is described with a position and a rotation @@ -550,7 +545,7 @@ components: $ref: '#/components/schemas/Quaternion' 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 @@ -579,25 +574,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 @@ -640,7 +616,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 of this type of trackable is performed by the World Analysis type: number @@ -664,7 +640,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 @@ -742,100 +718,3 @@ components: type: array 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 0aa5d46d623382aa179517c7bac8a2c6ca60a74a..3b8be33e53dcd016ac413965e8cca24abf18569a 100644 --- a/API/worldstorage/worldstorageopenapi.yaml +++ b/API/worldstorage/worldstorageopenapi.yaml @@ -91,7 +91,7 @@ paths: - in: header name: token schema: - $ref: '#/components/schemas/Token' + $ref: './../common/commonopenapi.yaml#/components/schemas/Token' - 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 @@ -131,11 +131,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 +157,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 +181,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 +196,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 +213,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 +228,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 +246,7 @@ paths: type: string example: "" default: - $ref: '#/components/responses/4xx_UnexpectedError' + $ref: './../common/commonopenapi.yaml#/components/responses/4xx_UnexpectedError' /trackables/{trackableUUID}: get: @@ -259,7 +259,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 +275,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 +288,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 +305,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 +323,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 +347,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 +362,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 +379,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 +394,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 +412,7 @@ paths: type: string example: "" default: - $ref: '#/components/responses/4xx_UnexpectedError' + $ref: './../common/commonopenapi.yaml#/components/responses/4xx_UnexpectedError' /worldAnchors/{worldAnchorUUID}: get: @@ -425,7 +425,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 +441,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 +454,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 +471,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 +489,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 +513,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 +528,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 +545,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 +560,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 +578,7 @@ paths: type: string example: "" default: - $ref: '#/components/responses/4xx_UnexpectedError' + $ref: './../common/commonopenapi.yaml#/components/responses/4xx_UnexpectedError' /worldLinks/{worldLinkUUID}: get: @@ -591,7 +591,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 +607,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 +620,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,9 +637,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' @@ -670,7 +670,7 @@ components: trackable: $ref : '#/components/schemas/Trackable' Transform3D: - $ref : '#/components/schemas/Transform3D' + $ref : './../common/commonopenapi.yaml#/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' @@ -715,16 +715,16 @@ components: enum: [FIDUCIAL_MARKER, IMAGE_MARKER, MAP, GEOPOSE, OTHER] example: FIDUCIAL_MARKER trackableEncodingInformation: - $ref: '#/components/schemas/EncodingInformationStructure' + $ref: './../common/commonopenapi.yaml#/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' + $ref: './../common/commonopenapi.yaml#/components/schemas/Transform3D' unit: - $ref: '#/components/schemas/UnitSystem' + $ref: './../common/commonopenapi.yaml#/components/schemas/UnitSystem' trackableSize: $ref: '#/components/schemas/Size' keyvalueTags: @@ -760,9 +760,9 @@ components: format: uuid example: 6ddeb59e-7740-42f7-b329-1374b92e7fc2 localCRS: - $ref: '#/components/schemas/Transform3D' + $ref: './../common/commonopenapi.yaml#/components/schemas/Transform3D' unit: - $ref: '#/components/schemas/UnitSystem' + $ref: './../common/commonopenapi.yaml#/components/schemas/UnitSystem' worldAnchorSize: $ref: '#/components/schemas/Size' keyvalueTags: @@ -806,9 +806,9 @@ components: typeTo: $ref: '#/components/schemas/ObjectType' transform: - $ref: '#/components/schemas/Transform3D' + $ref: './../common/commonopenapi.yaml#/components/schemas/Transform3D' unit: - $ref: '#/components/schemas/UnitSystem' + $ref: './../common/commonopenapi.yaml#/components/schemas/UnitSystem' keyvalueTags: $ref: '#/components/schemas/KeyvalueTagList' @@ -822,38 +822,8 @@ components: enum: [FIDUCIAL_MARKER, IMAGE_MARKER, MAP, GEOPOSE, OTHER] example: "FIDUCIAL_MARKER" encodingInformation: - $ref: '#/components/schemas/EncodingInformationStructure' + $ref: './../common/commonopenapi.yaml#/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. @@ -887,88 +857,3 @@ components: 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'