diff --git a/API/common/commonopenapi.yaml b/API/common/commonopenapi.yaml index 0c92edc42d6ccac4af8bf2f7f7ea37995fec112f..138ff618c8314f0e36b0a3e593975f3eced598bd 100644 --- a/API/common/commonopenapi.yaml +++ b/API/common/commonopenapi.yaml @@ -1,240 +1,289 @@ +# Copyright 2022 ETSI. Licensed under the BSD-3-Clause license +# API for the Augmented Reality Framework (ARF) +# Working group: ETSI ISG ARF +# STF group: STF620 (validation) +# +# References: +# - Explaination UUID: https://en.wikipedia.org/wiki/Universally_unique_identifier / https://fr.wikipedia.org/wiki/Universally_unique_identifier +# - UUID formats: 8-4-4-4-12 format string, lower case (but case insensitive on input) +# - UUID RFC4122: https://datatracker.ietf.org/doc/html/rfc4122#section-3 +# - online UUID generator: https://www.uuidgenerator.net/ +# - Rules for RESTful error code RFC2616: https://datatracker.ietf.org/doc/html/rfc2616#section-10 +# - Guide: https://restfulapi.net/http-status-codes/ +# +# Last Version: 06.09.2024 +openapi: 3.0.0 +info: + version: 2.0.0 + title: Common module for ARF API + description: Common components for the World Storage and the World Analysis services + license: + name: BSD-3-clause + url: https://opensource.org/licenses/BSD-3-Clause - openapi: 3.0.0 - - # COMPONENTS ############################################### - components: +components: - #------------------------------- - # Reusable schemas (data models) - #------------------------------- - schemas: + #------------------------------- + # Reusable schemas (data models) + #------------------------------- + schemas: - 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] - 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. + 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] + 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: [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. + enum: [HOLOLENS, ARKIT, ARCORE, VUFORIA, ARUCO, OTHER] + example : "HOLOLENS" + version: + description: The version of the format + type: string + example : "1.01" - Vector3: - description: A 3 coordinates vector + Transform3D: + description: Coordinate reference system of the world anchor, a 4*4 matrix (rowmajor) represented by a float vector. type: array - minItems: 3 - maxItems: 3 + minItems: 16 + maxItems: 16 items: type: number format: float - example: [ 1, 0, 0 ] + example: [ 1, 0, 0, 3, + 0, 1, 0, 3, + 0, 0, 1, 3, + 0, 0, 0, 1] - Quaternion: - description: A quaternion + 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 - minItems: 4 - maxItems: 4 items: + type: number + format: double + minItems: 3 + maxItems: 3 + example: [1.0,1.0,1.5] + + Token: + type: string + example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9 + description: A string representing the token of the User. + + Success: + type: object + properties: + message: + type: string + example: "Success 2xx" + + Error: + type: object + properties: + message: + type: string + example: "Error 4xx" + + SessionID: + type: string + example: 4JA1xVJSYKE47UM7RKDrfUcTXlJ0wxSQ + description: A string representing the session ID associated with the AR session. + + 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, UNKNOWN] + example: ANCHOR + + TrackableType: + description: Type for trackable + type: string + enum: [FIDUCIAL_MARKER, IMAGE_MARKER, MESH, MAP, GEOPOSE, OTHER] + example: "FIDUCIAL_MARKER" + + Capability: + description: An object representing a supported capability of the World Analysis and its associated metadata + type: object + properties: + trackableType: + $ref: '#/components/schemas/TrackableType' + 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 - format: float - example: [ 0, 0, 0, 1 ] + 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 # + ####################### - TypeWorldStorage: - description: Trackable or Anchor - type: string - enum: [TRACKABLE, ANCHOR, UNKNOWN] - example: ANCHOR + ################# + # 2xx : Success # + ################# + 200_SuccessRequest: + description: Success request. + content: + application/json: + schema: + $ref: '#/components/schemas/Success' + example: "Success request" + + 200_UuidResponse: + description: OK, return the UUID of the Trackable defined by the world storage. + content: + application/json: + schema: + $ref: '#/components/schemas/Success' + example: "777266da-e286-11ec-8fea-0242ac120002" - TrackableType: - description: Type for trackable - type: string - enum: [FIDUCIAL_MARKER, IMAGE_MARKER, MESH, MAP, GEOPOSE, OTHER] - example: "FIDUCIAL_MARKER" - - Capability: - description: An object representing a supported capability of the World Analysis and its associated metadata - type: object - uniqueItems: true - properties: - trackableType: - $ref: '#/components/schemas/TrackableType' - 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" + ##################### + # 3xx : Redirection # + ##################### + + ####################### + # 4xx : Client Errors # + ####################### + 400_BadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + example: "Bad request" + + 400_InvalidUUID: + description: Invalid UUID supplied. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + example: "The format of the UUID is incorrect" + + 401_NullResponse: + description: Null response. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + example: "Null response" + + 403_Forbidden: + description: Not allowed. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + example: "Not allowed" + + 404_NotFound: + description: Not found. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + example: "Not found" + + 404_NotFoundUUID: + description: Not found, could not find UUID in database. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + example: "Element not found" - 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' + 405_NotSupported: + description: Not supported. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + 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: + application/json: + schema: + $ref: '#/components/schemas/Error' + example: "The element you sent has already a value and can't be sent to the world storage" + + ######################## + # 5xx : Server Errors # + ######################## + 511_InvalidToken: + description: The secret token is not valid. Please ask an ISG ARF team member for a valid token. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + + 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 430da1d33fd11305f84878313baf44ae80a28f4b..436b25872056feef669da5718fe1d3d33b482ebf 100644 --- a/API/worldanalysis/worldanalysisopenapi.yaml +++ b/API/worldanalysis/worldanalysisopenapi.yaml @@ -1,14 +1,31 @@ +# Copyright 2022 ETSI. Licensed under the BSD-3-Clause license +# API for the Augmented Reality Framework (ARF) +# Working group: ETSI ISG ARF +# STF group: STF620 (validation) +# +# References: +# - Explaination UUID: https://en.wikipedia.org/wiki/Universally_unique_identifier / https://fr.wikipedia.org/wiki/Universally_unique_identifier +# - UUID formats: 8-4-4-4-12 format string, lower case (but case insensitive on input) +# - UUID RFC4122: https://datatracker.ietf.org/doc/html/rfc4122#section-3 +# - online UUID generator: https://www.uuidgenerator.net/ +# - Rules for RESTful error code RFC2616: https://datatracker.ietf.org/doc/html/rfc2616#section-10 +# - Guide: https://restfulapi.net/http-status-codes/ +# +# Last Version: 06.09.2024 + openapi: "3.0.0" info: - version: 2.0.1 + version: 2.0.0 title: World Analysis API description: API ensuring interoperability between Scene Management and a World Analysis service license: name: BSD-3-clause url: https://opensource.org/licenses/BSD-3-Clause servers: + - url: https://localhost:44301 - url: http://localhost:8080 + - url: https://analysis.etsi.hhi.fraunhofer.de tags: - name: default @@ -19,7 +36,6 @@ tags: description : Operation to retrieves the supported capabilities of the World Analysis paths: -## Default /ping: get: summary: Test the server availability. @@ -57,6 +73,9 @@ paths: type: string example: "1.0.0" +################# +# Configuration # +################# /pose/configure/framerate: post: summary: Specify the a minimum frame rate for pose estimation for Trackable types @@ -84,9 +103,14 @@ paths: description: Successful operation. '405': $ref: '../common/commonopenapi.yaml#/components/responses/405_NotSupported' + '511': + $ref: '../common/commonopenapi.yaml#/components/responses/511_InvalidToken' 'default': $ref: '../common/commonopenapi.yaml#/components/responses/4xx_UnexpectedError' - + +######### +# Poses # +######### /pose/{trackableOrAnchorUUID}: get: summary: Request the last pose of a single Anchor or Trackable @@ -132,6 +156,8 @@ paths: $ref: '../common/commonopenapi.yaml#/components/responses/404_NotFound' '405': $ref: '../common/commonopenapi.yaml#/components/responses/405_NotSupported' + '511': + $ref: '../common/commonopenapi.yaml#/components/responses/511_InvalidToken' 'default': $ref: '../common/commonopenapi.yaml#/components/responses/4xx_UnexpectedError' @@ -160,6 +186,7 @@ paths: uniqueItems: true items: type: object + title: UuidAndMode properties: uuid: type: string @@ -178,6 +205,7 @@ paths: application/json: schema: type: object + title: Poses properties: poses: type: array @@ -191,6 +219,8 @@ paths: $ref: '../common/commonopenapi.yaml#/components/responses/404_NotFound' '405': $ref: '../common/commonopenapi.yaml#/components/responses/405_NotSupported' + '511': + $ref: '../common/commonopenapi.yaml#/components/responses/511_InvalidToken' 'default': $ref: '../common/commonopenapi.yaml#/components/responses/4xx_UnexpectedError' @@ -236,6 +266,8 @@ paths: $ref: '../common/commonopenapi.yaml#/components/responses/404_NotFound' '405': $ref: '../common/commonopenapi.yaml#/components/responses/405_NotSupported' + '511': + $ref: '../common/commonopenapi.yaml#/components/responses/511_InvalidToken' 'default': $ref: '../common/commonopenapi.yaml#/components/responses/4xx_UnexpectedError' @@ -275,6 +307,8 @@ paths: $ref: '../common/commonopenapi.yaml#/components/responses/400_BadRequest' '404': $ref: '../common/commonopenapi.yaml#/components/responses/404_NotFound' + '511': + $ref: '../common/commonopenapi.yaml#/components/responses/511_InvalidToken' put: summary: Update a subscription operationId: updateSubscription @@ -328,6 +362,8 @@ paths: $ref: '../common/commonopenapi.yaml#/components/responses/400_BadRequest' '404': $ref: '../common/commonopenapi.yaml#/components/responses/404_NotFound' + '511': + $ref: '../common/commonopenapi.yaml#/components/responses/511_InvalidToken' delete: summary: Remove a subscription to a given pose operationId: unsubscribeFromPose @@ -353,17 +389,17 @@ paths: example: "bdc83e6b-a89d-4b29-9c99-e9015d448b10" responses: '200': - description: OK, unsubcription successful. - content: - text/plain: - schema: - type: string - example: "Subscription succesfuly deleted" + $ref: '../common/commonopenapi.yaml#/components/responses/200_SuccessRequest' '400': $ref: '../common/commonopenapi.yaml#/components/responses/400_BadRequest' '404': $ref: '../common/commonopenapi.yaml#/components/responses/404_NotFound' + '511': + $ref: '../common/commonopenapi.yaml#/components/responses/511_InvalidToken' +################ +# Capabilities # +################ /capabilities: get: summary: Get the supported capabilities of the World Analysis @@ -387,11 +423,14 @@ paths: application/json: schema: type: object + title: Capabilities properties: capabilities: type: array items: $ref: '../common/commonopenapi.yaml#/components/schemas/Capability' + '511': + $ref: '../common/commonopenapi.yaml#/components/responses/511_InvalidToken' 'default': $ref: '../common/commonopenapi.yaml#/components/responses/4xx_UnexpectedError' @@ -426,6 +465,7 @@ paths: application/json: schema: type: object + title: Supports properties: type: $ref: '../common/commonopenapi.yaml#/components/schemas/TypeWorldStorage' @@ -441,6 +481,8 @@ paths: $ref: '../common/commonopenapi.yaml#/components/responses/404_NotFound' '405': $ref: '../common/commonopenapi.yaml#/components/responses/405_NotSupported' + '511': + $ref: '../common/commonopenapi.yaml#/components/responses/511_InvalidToken' 'default': $ref: '../common/commonopenapi.yaml#/components/responses/4xx_UnexpectedError' @@ -565,7 +607,6 @@ components: PoseConfiguration: description: An object representing the framerate that the World Analysis needs to reach for a given Trackable Type type: object - uniqueItems: true properties: trackableType: type: string @@ -611,9 +652,10 @@ components: description: List of UUID of the Trackable or Anchor to subscribe type: array items: + type: string format: uuid example: [ "fa8bbe40-8052-11ec-a8a3-0242ac120002", "fa8bbe40-8052-11ec-a8a3-0242ac120003"] - mode: + modes: description: List of modes representing the context of the Relocalization information (AR device to WorldAnchor/Trackable or WorldAnchor/Trackable to AR device) type: array items: @@ -629,7 +671,7 @@ components: example: "http://myscenemanagementserver.com/poses" required: - targets - - mode + - modes SubscriptionSingle: description: Response when subscribing for pose update of a Trackable or a WorldAnchor diff --git a/API/worldstorage/worldstorageopenapi.yaml b/API/worldstorage/worldstorageopenapi.yaml index 35e994b3f9c8a9920acb92196844073a0e18ca9a..2e504f4110b1d56314e2c43f35c3faaec1658acd 100644 --- a/API/worldstorage/worldstorageopenapi.yaml +++ b/API/worldstorage/worldstorageopenapi.yaml @@ -11,12 +11,12 @@ # - Rules for RESTful error code RFC2616: https://datatracker.ietf.org/doc/html/rfc2616#section-10 # - Guide: https://restfulapi.net/http-status-codes/ # -# Last Version: 01.06.2022 +# Last Version: 06.09.2024 openapi: "3.0.0" info: - version: 2.0.1 + version: 2.0.0 title: World Storage API description: API ensuring interoperability between an authoring tool and a World Storage service license: @@ -82,7 +82,6 @@ paths: ############################# # RelocalizationInformation # ############################# - /relocalizationInformation: get: summary: Operation to retrieve all the relocalization information of one or severals WorldAnchors or Trackables. @@ -103,6 +102,7 @@ paths: uniqueItems: true items: type: object + title: UuidAndMode properties: uuid: type: string @@ -126,6 +126,7 @@ paths: application/json: schema: type: object + title: RelocalizationInformations properties: RelocInfo: type: array @@ -135,15 +136,11 @@ paths: $ref: '../common/commonopenapi.yaml#/components/responses/400_InvalidUUID' '404': $ref: '../common/commonopenapi.yaml#/components/responses/404_NotFoundUUID' + '511': + $ref: '../common/commonopenapi.yaml#/components/responses/511_InvalidToken' 'default': $ref: '../common/commonopenapi.yaml#/components/responses/4xx_UnexpectedError' - - - - - - - + ############## # TRACKABLES # ############## @@ -168,23 +165,13 @@ paths: $ref: '#/components/schemas/Trackable' responses: '200': - description: OK, return the UUID of the Trackable defined by the world storage. - content: - text/plain: - schema: - type: string - example: "777266da-e286-11ec-8fea-0242ac120002" - '201': - description: Null response. - content: - text/plain: - schema: - type: string - example: "" + $ref: '../common/commonopenapi.yaml#/components/responses/200_UuidResponse' '400': $ref: '../common/commonopenapi.yaml#/components/responses/400_BadRequest' '409': $ref: '../common/commonopenapi.yaml#/components/responses/409_NotEmptyUUID' + '511': + $ref: '../common/commonopenapi.yaml#/components/responses/511_InvalidToken' 'default': $ref: '../common/commonopenapi.yaml#/components/responses/4xx_UnexpectedError' put: @@ -207,16 +194,13 @@ paths: $ref: '#/components/schemas/Trackable' responses: '200': - description: OK, return the UUID of the modified Trackable. - content: - text/plain: - schema: - type: string - example: "777266da-e286-11ec-8fea-0242ac120002" + $ref: '../common/commonopenapi.yaml#/components/responses/200_UuidResponse' '400': $ref: '../common/commonopenapi.yaml#/components/responses/400_BadRequest' '404': $ref: '../common/commonopenapi.yaml#/components/responses/404_NotFoundUUID' + '511': + $ref: '../common/commonopenapi.yaml#/components/responses/511_InvalidToken' 'default': $ref: '../common/commonopenapi.yaml#/components/responses/4xx_UnexpectedError' get: @@ -236,16 +220,17 @@ paths: content: application/json: schema: - type : array - items : - $ref: "#/components/schemas/Trackable" - '201': - description: Null response. - content: - text/plain: - schema: - type: string - example: "" + type: object + title: TrackablesResponse + properties: + trackables: + type: array + items: + $ref: "#/components/schemas/Trackable" + '401': + $ref: '../common/commonopenapi.yaml#/components/responses/401_NullResponse' + '511': + $ref: '../common/commonopenapi.yaml#/components/responses/511_InvalidToken' default: $ref: '../common/commonopenapi.yaml#/components/responses/4xx_UnexpectedError' @@ -274,11 +259,15 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Trackable' + $ref: '#/components/schemas/Trackable' '400': $ref: '../common/commonopenapi.yaml#/components/responses/400_InvalidUUID' + '401': + $ref: '../common/commonopenapi.yaml#/components/responses/401_NullResponse' '404': $ref: '../common/commonopenapi.yaml#/components/responses/404_NotFoundUUID' + '511': + $ref: '../common/commonopenapi.yaml#/components/responses/511_InvalidToken' delete: summary: Delete a Trackable. operationId: deleteTrackable @@ -299,16 +288,13 @@ paths: format: uuid responses: '200': - description: OK, delete successful. - content: - text/plain: - schema: - type: string - example: "Element succesfully deleted" + $ref: '../common/commonopenapi.yaml#/components/responses/200_SuccessRequest' '400': $ref: '../common/commonopenapi.yaml#/components/responses/400_InvalidUUID' '404': $ref: '../common/commonopenapi.yaml#/components/responses/404_NotFoundUUID' + '511': + $ref: '../common/commonopenapi.yaml#/components/responses/511_InvalidToken' ################# # WORLD ANCHORS # @@ -334,23 +320,13 @@ paths: $ref: '#/components/schemas/WorldAnchor' responses: '200': - description: OK, return the UUID of the World Anchor defined by the world storage. - content: - text/plain: - schema: - type: string - example: "777266da-e286-11ec-8fea-0242ac120002" - '201': - description: Null response. - content: - text/plain: - schema: - type: string - example: "" + $ref: '../common/commonopenapi.yaml#/components/responses/200_UuidResponse' '400': $ref: '../common/commonopenapi.yaml#/components/responses/400_BadRequest' '409': $ref: '../common/commonopenapi.yaml#/components/responses/409_NotEmptyUUID' + '511': + $ref: '../common/commonopenapi.yaml#/components/responses/511_InvalidToken' 'default': $ref: '../common/commonopenapi.yaml#/components/responses/4xx_UnexpectedError' put: @@ -373,16 +349,13 @@ paths: $ref: '#/components/schemas/WorldAnchor' responses: '200': - description: OK, return the UUID of the modified World Anchor. - content: - text/plain: - schema: - type: string - example: "777266da-e286-11ec-8fea-0242ac120002" + $ref: '../common/commonopenapi.yaml#/components/responses/200_UuidResponse' '400': $ref: '../common/commonopenapi.yaml#/components/responses/400_BadRequest' '404': $ref: '../common/commonopenapi.yaml#/components/responses/404_NotFoundUUID' + '511': + $ref: '../common/commonopenapi.yaml#/components/responses/511_InvalidToken' 'default': $ref: '../common/commonopenapi.yaml#/components/responses/4xx_UnexpectedError' get: @@ -402,16 +375,17 @@ paths: content: application/json: schema: - type : array - items : - $ref: "#/components/schemas/WorldAnchor" - '201': - description: Null response. - content: - text/plain: - schema: - type: string - example: "" + type: object + title: WorldAnchorsResponse + properties: + worldAnchors: + type : array + items : + $ref: "#/components/schemas/WorldAnchor" + '401': + $ref: '../common/commonopenapi.yaml#/components/responses/401_NullResponse' + '511': + $ref: '../common/commonopenapi.yaml#/components/responses/511_InvalidToken' default: $ref: '../common/commonopenapi.yaml#/components/responses/4xx_UnexpectedError' @@ -443,8 +417,12 @@ paths: $ref: '#/components/schemas/WorldAnchor' '400': $ref: '../common/commonopenapi.yaml#/components/responses/400_InvalidUUID' + '401': + $ref: '../common/commonopenapi.yaml#/components/responses/401_NullResponse' '404': $ref: '../common/commonopenapi.yaml#/components/responses/404_NotFoundUUID' + '511': + $ref: '../common/commonopenapi.yaml#/components/responses/511_InvalidToken' delete: summary: Delete a World Anchor. operationId: deleteWorldAnchor @@ -465,16 +443,13 @@ paths: format: uuid responses: '200': - description: OK, delete successful. - content: - text/plain: - schema: - type: string - example: "Element succesfuly deleted" + $ref: '../common/commonopenapi.yaml#/components/responses/200_SuccessRequest' '400': $ref: '../common/commonopenapi.yaml#/components/responses/400_InvalidUUID' '404': $ref: '../common/commonopenapi.yaml#/components/responses/404_NotFoundUUID' + '511': + $ref: '../common/commonopenapi.yaml#/components/responses/511_InvalidToken' ############### # WORLD LINKS # @@ -500,23 +475,13 @@ paths: $ref: '#/components/schemas/WorldLink' responses: '200': - description: OK, return the UUID of the World Link defined by the world storage. - content: - text/plain: - schema: - type: string - example: "777266da-e286-11ec-8fea-0242ac120002" - '201': - description: Null response. - content: - text/plain: - schema: - type: string - example: "" + $ref: '../common/commonopenapi.yaml#/components/responses/200_UuidResponse' '400': $ref: '../common/commonopenapi.yaml#/components/responses/400_BadRequest' '409': $ref: '../common/commonopenapi.yaml#/components/responses/409_NotEmptyUUID' + '511': + $ref: '../common/commonopenapi.yaml#/components/responses/511_InvalidToken' 'default': $ref: '../common/commonopenapi.yaml#/components/responses/4xx_UnexpectedError' put: @@ -539,16 +504,13 @@ paths: $ref: '#/components/schemas/WorldLink' responses: '200': - description: OK, return the UUID of the modified World Link. - content: - text/plain: - schema: - type: string - example: "777266da-e286-11ec-8fea-0242ac120002" + $ref: '../common/commonopenapi.yaml#/components/responses/200_UuidResponse' '400': $ref: '../common/commonopenapi.yaml#/components/responses/400_BadRequest' '404': $ref: '../common/commonopenapi.yaml#/components/responses/404_NotFoundUUID' + '511': + $ref: '../common/commonopenapi.yaml#/components/responses/511_InvalidToken' 'default': $ref: '../common/commonopenapi.yaml#/components/responses/4xx_UnexpectedError' get: @@ -568,18 +530,19 @@ paths: content: application/json: schema: - type : array - items : - $ref: "#/components/schemas/WorldLink" - '201': - description: Null response. - content: - text/plain: - schema: - type: string - example: "" + type: object + title: WorldLinksResponse + properties: + worldLinks: + type : array + items : + $ref: "#/components/schemas/WorldLink" + '401': + $ref: '../common/commonopenapi.yaml#/components/responses/401_NullResponse' + '511': + $ref: '../common/commonopenapi.yaml#/components/responses/511_InvalidToken' default: - $ref: '../common/commonopenapi.yaml#/components/responses/4xx_UnexpectedError' + $ref: '../common/commonopenapi.yaml#/components/responses/4xx_UnexpectedError' /worldLinks/{worldLinkUUID}: get: @@ -606,11 +569,15 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/WorldLink' + $ref: '#/components/schemas/WorldLink' '400': $ref: '../common/commonopenapi.yaml#/components/responses/400_InvalidUUID' + '401': + $ref: '../common/commonopenapi.yaml#/components/responses/401_NullResponse' '404': $ref: '../common/commonopenapi.yaml#/components/responses/404_NotFoundUUID' + '511': + $ref: '../common/commonopenapi.yaml#/components/responses/511_InvalidToken' delete: summary: Delete a World Link. operationId: deleteWorldLink @@ -631,17 +598,14 @@ paths: format: uuid responses: '200': - description: OK, delete successful. - content: - text/plain: - schema: - type: string - example: "Element succesfully deleted" + $ref: '../common/commonopenapi.yaml#/components/responses/200_SuccessRequest' '400': $ref: '../common/commonopenapi.yaml#/components/responses/400_InvalidUUID' '404': $ref: '../common/commonopenapi.yaml#/components/responses/404_NotFoundUUID' - + '511': + $ref: '../common/commonopenapi.yaml#/components/responses/511_InvalidToken' + # COMPONENTS ############################################### components: @@ -666,6 +630,7 @@ components: type: array items: type: object + title: RelocObject properties: trackable: $ref : '#/components/schemas/Trackable'