From 2350fcbd8cdab760aa9592e71306db219886a323 Mon Sep 17 00:00:00 2001 From: jroyan Date: Thu, 5 Sep 2024 09:24:26 +0200 Subject: [PATCH 01/11] add title to objects to control model name during code generation --- API/worldanalysis/worldanalysisopenapi.yaml | 4 +++ API/worldstorage/worldstorageopenapi.yaml | 33 +++++++++++++++------ 2 files changed, 28 insertions(+), 9 deletions(-) diff --git a/API/worldanalysis/worldanalysisopenapi.yaml b/API/worldanalysis/worldanalysisopenapi.yaml index 430da1d..c7d7d8e 100644 --- a/API/worldanalysis/worldanalysisopenapi.yaml +++ b/API/worldanalysis/worldanalysisopenapi.yaml @@ -160,6 +160,7 @@ paths: uniqueItems: true items: type: object + title: UuidAndMode properties: uuid: type: string @@ -178,6 +179,7 @@ paths: application/json: schema: type: object + title: Poses properties: poses: type: array @@ -387,6 +389,7 @@ paths: application/json: schema: type: object + title: Capabilities properties: capabilities: type: array @@ -426,6 +429,7 @@ paths: application/json: schema: type: object + title: Supports properties: type: $ref: '../common/commonopenapi.yaml#/components/schemas/TypeWorldStorage' diff --git a/API/worldstorage/worldstorageopenapi.yaml b/API/worldstorage/worldstorageopenapi.yaml index 35e994b..74a088c 100644 --- a/API/worldstorage/worldstorageopenapi.yaml +++ b/API/worldstorage/worldstorageopenapi.yaml @@ -103,6 +103,7 @@ paths: uniqueItems: true items: type: object + title: UuidAndMode properties: uuid: type: string @@ -126,6 +127,7 @@ paths: application/json: schema: type: object + title: RelocalizationInformations properties: RelocInfo: type: array @@ -236,9 +238,13 @@ paths: content: application/json: schema: - type : array - items : - $ref: "#/components/schemas/Trackable" + type: object + title: Trackables + properties: + trackables: + type: array + items: + $ref: "#/components/schemas/Trackable" '201': description: Null response. content: @@ -402,9 +408,13 @@ paths: content: application/json: schema: - type : array - items : - $ref: "#/components/schemas/WorldAnchor" + type: object + title: WorldAnchors + properties: + worldAnchors: + type : array + items : + $ref: "#/components/schemas/WorldAnchor" '201': description: Null response. content: @@ -568,9 +578,13 @@ paths: content: application/json: schema: - type : array - items : - $ref: "#/components/schemas/WorldLink" + type: object + title: WorldLinks + properties: + worldLinks: + type : array + items : + $ref: "#/components/schemas/WorldLink" '201': description: Null response. content: @@ -666,6 +680,7 @@ components: type: array items: type: object + title: RelocObject properties: trackable: $ref : '#/components/schemas/Trackable' -- GitLab From 64f219e8b3545acf6133663ecfbda1b8b0b42e57 Mon Sep 17 00:00:00 2001 From: jroyan Date: Thu, 5 Sep 2024 09:26:34 +0200 Subject: [PATCH 02/11] remove uniqueItem for objects --- API/common/commonopenapi.yaml | 1 - API/worldanalysis/worldanalysisopenapi.yaml | 1 - 2 files changed, 2 deletions(-) diff --git a/API/common/commonopenapi.yaml b/API/common/commonopenapi.yaml index 0c92edc..c36c00a 100644 --- a/API/common/commonopenapi.yaml +++ b/API/common/commonopenapi.yaml @@ -128,7 +128,6 @@ 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' diff --git a/API/worldanalysis/worldanalysisopenapi.yaml b/API/worldanalysis/worldanalysisopenapi.yaml index c7d7d8e..f66fe60 100644 --- a/API/worldanalysis/worldanalysisopenapi.yaml +++ b/API/worldanalysis/worldanalysisopenapi.yaml @@ -569,7 +569,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 -- GitLab From 9dfde64ec5f94c01b9308b135e14f6e36b45846a Mon Sep 17 00:00:00 2001 From: jroyan Date: Thu, 5 Sep 2024 09:30:10 +0200 Subject: [PATCH 03/11] all responses return a json object for homogeneity, even error ones --- API/common/commonopenapi.yaml | 55 ++++++--- API/worldanalysis/worldanalysisopenapi.yaml | 7 +- API/worldstorage/worldstorageopenapi.yaml | 121 +++++--------------- 3 files changed, 68 insertions(+), 115 deletions(-) diff --git a/API/common/commonopenapi.yaml b/API/common/commonopenapi.yaml index c36c00a..d130128 100644 --- a/API/common/commonopenapi.yaml +++ b/API/common/commonopenapi.yaml @@ -157,6 +157,29 @@ ################# # 2xx : Success # ################# + 200_SuccessRequest: + description: Success request. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + 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/Error' + example: "777266da-e286-11ec-8fea-0242ac120002" + + 201_NullResponse: + description: Null response. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + example: "Null response" ##################### # 3xx : Redirection # @@ -168,49 +191,49 @@ 400_BadRequest: description: Bad request. content: - text/plain: + application/json: schema: - type: string + $ref: '#/components/schemas/Error' example: "Bad request" 400_InvalidUUID: description: Invalid UUID supplied. content: - text/plain: + application/json: schema: + $ref: '#/components/schemas/Error' example: "The format of the UUID is incorrect" - type: string 403_Forbidden: description: Not allowed. - content: - text/plain: + content: + application/json: schema: - type: string + $ref: '#/components/schemas/Error' example: "Not allowed" 404_NotFound: description: Not found. content: - text/plain: + application/json: schema: - type: string + $ref: '#/components/schemas/Error' example: "Not found" 404_NotFoundUUID: description: Not found, could not find UUID in database. content: - text/plain: + application/json: schema: - type: string + $ref: '#/components/schemas/Error' example: "Element not found" 405_NotSupported: description: Not supported. content: - text/plain: + application/json: schema: - type: string + $ref: '#/components/schemas/Error' example: "Not supported" 4xx_UnexpectedError: # Can be referenced as '#/components/responses/GenericError' @@ -222,10 +245,10 @@ 409_NotEmptyUUID: description: Invalid UUID, id must be a Nil value. - content: - text/plain: + content: + application/json: schema: - type: string + $ref: '#/components/schemas/Error' example: "The element you sent has already a value and can't be sent to the world storage" ######################## diff --git a/API/worldanalysis/worldanalysisopenapi.yaml b/API/worldanalysis/worldanalysisopenapi.yaml index f66fe60..18ee8fa 100644 --- a/API/worldanalysis/worldanalysisopenapi.yaml +++ b/API/worldanalysis/worldanalysisopenapi.yaml @@ -355,12 +355,7 @@ 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': diff --git a/API/worldstorage/worldstorageopenapi.yaml b/API/worldstorage/worldstorageopenapi.yaml index 74a088c..ac5e153 100644 --- a/API/worldstorage/worldstorageopenapi.yaml +++ b/API/worldstorage/worldstorageopenapi.yaml @@ -170,19 +170,9 @@ 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" + $ref: '../common/commonopenapi.yaml#/components/responses/200_UuidResponse' '201': - description: Null response. - content: - text/plain: - schema: - type: string - example: "" + $ref: '../common/commonopenapi.yaml#/components/responses/201_NullResponse' '400': $ref: '../common/commonopenapi.yaml#/components/responses/400_BadRequest' '409': @@ -209,12 +199,7 @@ 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': @@ -246,12 +231,7 @@ paths: items: $ref: "#/components/schemas/Trackable" '201': - description: Null response. - content: - text/plain: - schema: - type: string - example: "" + $ref: '../common/commonopenapi.yaml#/components/responses/201_NullResponse' default: $ref: '../common/commonopenapi.yaml#/components/responses/4xx_UnexpectedError' @@ -280,7 +260,9 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Trackable' + $ref: '#/components/schemas/Trackable' + '201': + $ref: '../common/commonopenapi.yaml#/components/responses/201_NullResponse' '400': $ref: '../common/commonopenapi.yaml#/components/responses/400_InvalidUUID' '404': @@ -305,12 +287,7 @@ 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': @@ -340,19 +317,9 @@ 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" + $ref: '../common/commonopenapi.yaml#/components/responses/200_UuidResponse' '201': - description: Null response. - content: - text/plain: - schema: - type: string - example: "" + $ref: '../common/commonopenapi.yaml#/components/responses/201_NullResponse' '400': $ref: '../common/commonopenapi.yaml#/components/responses/400_BadRequest' '409': @@ -379,12 +346,9 @@ 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' + '201': + $ref: '../common/commonopenapi.yaml#/components/responses/201_NullResponse' '400': $ref: '../common/commonopenapi.yaml#/components/responses/400_BadRequest' '404': @@ -416,12 +380,7 @@ paths: items : $ref: "#/components/schemas/WorldAnchor" '201': - description: Null response. - content: - text/plain: - schema: - type: string - example: "" + $ref: '../common/commonopenapi.yaml#/components/responses/201_NullResponse' default: $ref: '../common/commonopenapi.yaml#/components/responses/4xx_UnexpectedError' @@ -451,6 +410,8 @@ paths: application/json: schema: $ref: '#/components/schemas/WorldAnchor' + '201': + $ref: '../common/commonopenapi.yaml#/components/responses/201_NullResponse' '400': $ref: '../common/commonopenapi.yaml#/components/responses/400_InvalidUUID' '404': @@ -475,12 +436,7 @@ 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': @@ -510,19 +466,9 @@ 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" + $ref: '../common/commonopenapi.yaml#/components/responses/200_UuidResponse' '201': - description: Null response. - content: - text/plain: - schema: - type: string - example: "" + $ref: '../common/commonopenapi.yaml#/components/responses/201_NullResponse' '400': $ref: '../common/commonopenapi.yaml#/components/responses/400_BadRequest' '409': @@ -549,12 +495,9 @@ 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' + '201': + $ref: '../common/commonopenapi.yaml#/components/responses/201_NullResponse' '400': $ref: '../common/commonopenapi.yaml#/components/responses/400_BadRequest' '404': @@ -586,14 +529,9 @@ paths: items : $ref: "#/components/schemas/WorldLink" '201': - description: Null response. - content: - text/plain: - schema: - type: string - example: "" + $ref: '../common/commonopenapi.yaml#/components/responses/201_NullResponse' default: - $ref: '../common/commonopenapi.yaml#/components/responses/4xx_UnexpectedError' + $ref: '../common/commonopenapi.yaml#/components/responses/4xx_UnexpectedError' /worldLinks/{worldLinkUUID}: get: @@ -620,7 +558,9 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/WorldLink' + $ref: '#/components/schemas/WorldLink' + '201': + $ref: '../common/commonopenapi.yaml#/components/responses/201_NullResponse' '400': $ref: '../common/commonopenapi.yaml#/components/responses/400_InvalidUUID' '404': @@ -645,12 +585,7 @@ 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': -- GitLab From f9606e806eaa796a75d3e630257ff806affd6876 Mon Sep 17 00:00:00 2001 From: jroyan Date: Thu, 5 Sep 2024 09:31:16 +0200 Subject: [PATCH 04/11] remove code from error schema --- API/common/commonopenapi.yaml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/API/common/commonopenapi.yaml b/API/common/commonopenapi.yaml index d130128..17d8573 100644 --- a/API/common/commonopenapi.yaml +++ b/API/common/commonopenapi.yaml @@ -76,14 +76,8 @@ description: A string representing the token of the User. Error: - required: - - code - - message + type: object properties: - code: - type: integer - format: int32 - example: 406 message: type: string example: "Error 406" -- GitLab From b2be8faabcae29cefb74e2ef0ecf59e5e78041b3 Mon Sep 17 00:00:00 2001 From: jroyan Date: Thu, 5 Sep 2024 09:33:17 +0200 Subject: [PATCH 05/11] specify that uuid is of type string --- API/worldanalysis/worldanalysisopenapi.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/API/worldanalysis/worldanalysisopenapi.yaml b/API/worldanalysis/worldanalysisopenapi.yaml index 18ee8fa..ecf41f1 100644 --- a/API/worldanalysis/worldanalysisopenapi.yaml +++ b/API/worldanalysis/worldanalysisopenapi.yaml @@ -609,6 +609,7 @@ 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: -- GitLab From b639a02180c2b5e301c77483b3a2fa645ba94169 Mon Sep 17 00:00:00 2001 From: jroyan Date: Thu, 5 Sep 2024 09:36:40 +0200 Subject: [PATCH 06/11] rename mode into modes --- API/worldanalysis/worldanalysisopenapi.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/API/worldanalysis/worldanalysisopenapi.yaml b/API/worldanalysis/worldanalysisopenapi.yaml index ecf41f1..6a3759f 100644 --- a/API/worldanalysis/worldanalysisopenapi.yaml +++ b/API/worldanalysis/worldanalysisopenapi.yaml @@ -612,7 +612,7 @@ components: 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: @@ -628,7 +628,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 -- GitLab From 7421675a811e56303796864ba3fae35c3b3d47b7 Mon Sep 17 00:00:00 2001 From: Sylvain Renault Date: Fri, 6 Sep 2024 13:00:40 +0200 Subject: [PATCH 07/11] Issues with title in get endpoints solved. Return type 201 issues solved (exchanged with 401). Added success message. --- API/common/commonopenapi.yaml | 31 +++++++++------ API/worldanalysis/worldanalysisopenapi.yaml | 19 ++++++++- API/worldstorage/worldstorageopenapi.yaml | 44 ++++++++------------- 3 files changed, 54 insertions(+), 40 deletions(-) diff --git a/API/common/commonopenapi.yaml b/API/common/commonopenapi.yaml index 17d8573..0442c96 100644 --- a/API/common/commonopenapi.yaml +++ b/API/common/commonopenapi.yaml @@ -75,13 +75,20 @@ example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwczovL2V4YW1wbGUuYXV0aDAuY29tLyIsImF1ZCI6Imh0dHBzOi8vYXBpLmV4YW1wbGUuY29tL2NhbGFuZGFyL3YxLyIsInN1YiI6InVzcl8xMjMiLCJpYXQiOjE0NTg3ODU3OTYsImV4cCI6MTQ1ODg3MjE5Nn0.CA7eaHjIHz5NxeIJoFK9krqaeZrPLwmMmgI_XiQiIkQ 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 406" - + example: "Error 4xx" + SessionID: type: string example: 4JA1xVJSYKE47UM7RKDrfUcTXlJ0wxSQ @@ -156,7 +163,7 @@ content: application/json: schema: - $ref: '#/components/schemas/Error' + $ref: '#/components/schemas/Success' example: "Success request" 200_UuidResponse: @@ -164,17 +171,9 @@ content: application/json: schema: - $ref: '#/components/schemas/Error' + $ref: '#/components/schemas/Success' example: "777266da-e286-11ec-8fea-0242ac120002" - 201_NullResponse: - description: Null response. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - example: "Null response" - ##################### # 3xx : Redirection # ##################### @@ -198,6 +197,14 @@ $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: diff --git a/API/worldanalysis/worldanalysisopenapi.yaml b/API/worldanalysis/worldanalysisopenapi.yaml index 6a3759f..1e4f26b 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.2 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 diff --git a/API/worldstorage/worldstorageopenapi.yaml b/API/worldstorage/worldstorageopenapi.yaml index ac5e153..daff860 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.2 title: World Storage API description: API ensuring interoperability between an authoring tool and a World Storage service license: @@ -171,8 +171,6 @@ paths: responses: '200': $ref: '../common/commonopenapi.yaml#/components/responses/200_UuidResponse' - '201': - $ref: '../common/commonopenapi.yaml#/components/responses/201_NullResponse' '400': $ref: '../common/commonopenapi.yaml#/components/responses/400_BadRequest' '409': @@ -224,14 +222,14 @@ paths: application/json: schema: type: object - title: Trackables + title: TrackablesResponse properties: trackables: type: array items: $ref: "#/components/schemas/Trackable" - '201': - $ref: '../common/commonopenapi.yaml#/components/responses/201_NullResponse' + '401': + $ref: '../common/commonopenapi.yaml#/components/responses/401_NullResponse' default: $ref: '../common/commonopenapi.yaml#/components/responses/4xx_UnexpectedError' @@ -261,10 +259,10 @@ paths: application/json: schema: $ref: '#/components/schemas/Trackable' - '201': - $ref: '../common/commonopenapi.yaml#/components/responses/201_NullResponse' '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' delete: @@ -318,8 +316,6 @@ paths: responses: '200': $ref: '../common/commonopenapi.yaml#/components/responses/200_UuidResponse' - '201': - $ref: '../common/commonopenapi.yaml#/components/responses/201_NullResponse' '400': $ref: '../common/commonopenapi.yaml#/components/responses/400_BadRequest' '409': @@ -347,8 +343,6 @@ paths: responses: '200': $ref: '../common/commonopenapi.yaml#/components/responses/200_UuidResponse' - '201': - $ref: '../common/commonopenapi.yaml#/components/responses/201_NullResponse' '400': $ref: '../common/commonopenapi.yaml#/components/responses/400_BadRequest' '404': @@ -373,14 +367,14 @@ paths: application/json: schema: type: object - title: WorldAnchors + title: WorldAnchorsResponse properties: worldAnchors: type : array items : $ref: "#/components/schemas/WorldAnchor" - '201': - $ref: '../common/commonopenapi.yaml#/components/responses/201_NullResponse' + '401': + $ref: '../common/commonopenapi.yaml#/components/responses/401_NullResponse' default: $ref: '../common/commonopenapi.yaml#/components/responses/4xx_UnexpectedError' @@ -410,10 +404,10 @@ paths: application/json: schema: $ref: '#/components/schemas/WorldAnchor' - '201': - $ref: '../common/commonopenapi.yaml#/components/responses/201_NullResponse' '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' delete: @@ -467,8 +461,6 @@ paths: responses: '200': $ref: '../common/commonopenapi.yaml#/components/responses/200_UuidResponse' - '201': - $ref: '../common/commonopenapi.yaml#/components/responses/201_NullResponse' '400': $ref: '../common/commonopenapi.yaml#/components/responses/400_BadRequest' '409': @@ -496,8 +488,6 @@ paths: responses: '200': $ref: '../common/commonopenapi.yaml#/components/responses/200_UuidResponse' - '201': - $ref: '../common/commonopenapi.yaml#/components/responses/201_NullResponse' '400': $ref: '../common/commonopenapi.yaml#/components/responses/400_BadRequest' '404': @@ -522,14 +512,14 @@ paths: application/json: schema: type: object - title: WorldLinks + title: WorldLinksResponse properties: worldLinks: type : array items : $ref: "#/components/schemas/WorldLink" - '201': - $ref: '../common/commonopenapi.yaml#/components/responses/201_NullResponse' + '401': + $ref: '../common/commonopenapi.yaml#/components/responses/401_NullResponse' default: $ref: '../common/commonopenapi.yaml#/components/responses/4xx_UnexpectedError' @@ -559,10 +549,10 @@ paths: application/json: schema: $ref: '#/components/schemas/WorldLink' - '201': - $ref: '../common/commonopenapi.yaml#/components/responses/201_NullResponse' '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' delete: -- GitLab From 4fed58caf4ff17b0ac52cd75558814dfc829072c Mon Sep 17 00:00:00 2001 From: Sylvain Renault Date: Fri, 6 Sep 2024 15:52:30 +0200 Subject: [PATCH 08/11] New error (511) for invalid token (secret token). --- API/common/commonopenapi.yaml | 9 ++++- API/worldanalysis/worldanalysisopenapi.yaml | 18 +++++++++ API/worldstorage/worldstorageopenapi.yaml | 42 +++++++++++++++++---- 3 files changed, 60 insertions(+), 9 deletions(-) diff --git a/API/common/commonopenapi.yaml b/API/common/commonopenapi.yaml index 0442c96..41c1e78 100644 --- a/API/common/commonopenapi.yaml +++ b/API/common/commonopenapi.yaml @@ -72,7 +72,7 @@ Token: type: string - example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwczovL2V4YW1wbGUuYXV0aDAuY29tLyIsImF1ZCI6Imh0dHBzOi8vYXBpLmV4YW1wbGUuY29tL2NhbGFuZGFyL3YxLyIsInN1YiI6InVzcl8xMjMiLCJpYXQiOjE0NTg3ODU3OTYsImV4cCI6MTQ1ODg3MjE5Nn0.CA7eaHjIHz5NxeIJoFK9krqaeZrPLwmMmgI_XiQiIkQ + example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9 description: A string representing the token of the User. Success: @@ -255,6 +255,13 @@ ######################## # 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: diff --git a/API/worldanalysis/worldanalysisopenapi.yaml b/API/worldanalysis/worldanalysisopenapi.yaml index 1e4f26b..34a6997 100644 --- a/API/worldanalysis/worldanalysisopenapi.yaml +++ b/API/worldanalysis/worldanalysisopenapi.yaml @@ -101,6 +101,8 @@ 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' @@ -149,6 +151,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' @@ -210,6 +214,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' @@ -255,6 +261,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' @@ -294,6 +302,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 @@ -347,6 +357,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 @@ -377,6 +389,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' /capabilities: get: @@ -407,6 +421,8 @@ paths: 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' @@ -457,6 +473,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' diff --git a/API/worldstorage/worldstorageopenapi.yaml b/API/worldstorage/worldstorageopenapi.yaml index daff860..47e1588 100644 --- a/API/worldstorage/worldstorageopenapi.yaml +++ b/API/worldstorage/worldstorageopenapi.yaml @@ -137,15 +137,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 # ############## @@ -175,6 +171,8 @@ paths: $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: @@ -202,6 +200,8 @@ paths: $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: @@ -230,6 +230,8 @@ paths: $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' @@ -265,6 +267,8 @@ paths: $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 @@ -290,6 +294,8 @@ 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' ################# # WORLD ANCHORS # @@ -320,6 +326,8 @@ paths: $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: @@ -347,6 +355,8 @@ paths: $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: @@ -375,6 +385,8 @@ paths: $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' @@ -410,6 +422,8 @@ paths: $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 @@ -435,6 +449,8 @@ 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' ############### # WORLD LINKS # @@ -465,6 +481,8 @@ paths: $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: @@ -492,6 +510,8 @@ paths: $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: @@ -520,6 +540,8 @@ paths: $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' @@ -555,6 +577,8 @@ paths: $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 @@ -580,7 +604,9 @@ 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' + # COMPONENTS ############################################### components: -- GitLab From 3d34f3373d7faa7bad7b7da5edeb49733fe6e913 Mon Sep 17 00:00:00 2001 From: Sylvain Renault Date: Tue, 17 Sep 2024 14:38:06 +0200 Subject: [PATCH 09/11] Version updates to 2.0.0 (common file has also a version number) Some new comment lines --- API/common/commonopenapi.yaml | 493 ++++++++++---------- API/worldanalysis/worldanalysisopenapi.yaml | 2 +- API/worldstorage/worldstorageopenapi.yaml | 2 +- 3 files changed, 258 insertions(+), 239 deletions(-) diff --git a/API/common/commonopenapi.yaml b/API/common/commonopenapi.yaml index 41c1e78..138ff61 100644 --- a/API/common/commonopenapi.yaml +++ b/API/common/commonopenapi.yaml @@ -1,270 +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: + + #------------------------------- + # 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 -# COMPONENTS ############################################### - components: + 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" - #------------------------------- - # Reusable schemas (data models) - #------------------------------- - schemas: + 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] - 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) + UnitSystem: + description: Unit of length. 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" + 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: + Size: + description: Size object in format {width, length, depth}. + type: array + items: type: number - format: float - example: [ 1, 0, 0, 3, - 0, 1, 0, 3, - 0, 0, 1, 3, - 0, 0, 0, 1] + format: double + minItems: 3 + maxItems: 3 + example: [1.0,1.0,1.5] - UnitSystem: - description: Unit of length. + Token: + type: string + example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9 + description: A string representing the token of the User. + + Success: + type: object + properties: + message: type: string - enum: [MM, CM, DM, M, DAM, HM, KM, INCH, FOOT, YARD, MILE] - example: M + example: "Success 2xx" - 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] + Error: + type: object + properties: + message: + type: string + example: "Error 4xx" - Token: - type: string - example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9 - 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. - Success: - type: object - properties: - message: - type: string - example: "Success 2xx" + Vector3: + description: A 3 coordinates vector + type: array + minItems: 3 + maxItems: 3 + items: + type: number + format: float + example: [ 1, 0, 0 ] - Error: - type: object - properties: - message: - type: string - example: "Error 4xx" + Quaternion: + description: A quaternion + type: array + minItems: 4 + maxItems: 4 + items: + type: number + format: float + example: [ 0, 0, 0, 1 ] - SessionID: - type: string - example: 4JA1xVJSYKE47UM7RKDrfUcTXlJ0wxSQ - description: A string representing the session ID associated with the AR session. + TypeWorldStorage: + description: Trackable or Anchor + type: string + enum: [TRACKABLE, ANCHOR, UNKNOWN] + example: ANCHOR - Vector3: - description: A 3 coordinates vector - type: array - minItems: 3 - maxItems: 3 - items: - type: number - format: float - example: [ 1, 0, 0 ] + TrackableType: + description: Type for trackable + type: string + enum: [FIDUCIAL_MARKER, IMAGE_MARKER, MESH, MAP, GEOPOSE, OTHER] + example: "FIDUCIAL_MARKER" - Quaternion: - description: A quaternion - type: array - minItems: 4 - maxItems: 4 - items: + 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 ] - - 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" + 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 # + ####################### - 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 - 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 # + ################# + 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" - ################# - # 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" + ##################### + # 3xx : Redirection # + ##################### - ##################### - # 3xx : Redirection # - ##################### + ####################### + # 4xx : Client Errors # + ####################### + 400_BadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + example: "Bad request" - ####################### - # 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" - 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" - 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" - 403_Forbidden: - description: Not allowed. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - example: "Not allowed" + 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: - 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" - - 405_NotSupported: - description: Not supported. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - example: "Not supported" + 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' + 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" + 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 : 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' + 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 34a6997..704a320 100644 --- a/API/worldanalysis/worldanalysisopenapi.yaml +++ b/API/worldanalysis/worldanalysisopenapi.yaml @@ -16,7 +16,7 @@ openapi: "3.0.0" info: - version: 2.0.2 + version: 2.0.0 title: World Analysis API description: API ensuring interoperability between Scene Management and a World Analysis service license: diff --git a/API/worldstorage/worldstorageopenapi.yaml b/API/worldstorage/worldstorageopenapi.yaml index 47e1588..b3fc019 100644 --- a/API/worldstorage/worldstorageopenapi.yaml +++ b/API/worldstorage/worldstorageopenapi.yaml @@ -16,7 +16,7 @@ openapi: "3.0.0" info: - version: 2.0.2 + version: 2.0.0 title: World Storage API description: API ensuring interoperability between an authoring tool and a World Storage service license: -- GitLab From 0430c599248eecaf5a0cb7ea41ff88b87efaec4c Mon Sep 17 00:00:00 2001 From: Sylvain Renault Date: Tue, 17 Sep 2024 14:45:01 +0200 Subject: [PATCH 10/11] Some new comments + indents --- API/worldanalysis/worldanalysisopenapi.yaml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/API/worldanalysis/worldanalysisopenapi.yaml b/API/worldanalysis/worldanalysisopenapi.yaml index 704a320..436b258 100644 --- a/API/worldanalysis/worldanalysisopenapi.yaml +++ b/API/worldanalysis/worldanalysisopenapi.yaml @@ -36,7 +36,6 @@ tags: description : Operation to retrieves the supported capabilities of the World Analysis paths: -## Default /ping: get: summary: Test the server availability. @@ -74,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 @@ -105,7 +107,10 @@ paths: $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 @@ -392,6 +397,9 @@ paths: '511': $ref: '../common/commonopenapi.yaml#/components/responses/511_InvalidToken' +################ +# Capabilities # +################ /capabilities: get: summary: Get the supported capabilities of the World Analysis -- GitLab From 5734880080c52572af65fe6d2703228ed6ee5653 Mon Sep 17 00:00:00 2001 From: Sylvain Renault Date: Tue, 17 Sep 2024 15:32:31 +0200 Subject: [PATCH 11/11] Line feed. --- API/worldstorage/worldstorageopenapi.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/API/worldstorage/worldstorageopenapi.yaml b/API/worldstorage/worldstorageopenapi.yaml index b3fc019..2e504f4 100644 --- a/API/worldstorage/worldstorageopenapi.yaml +++ b/API/worldstorage/worldstorageopenapi.yaml @@ -82,7 +82,6 @@ paths: ############################# # RelocalizationInformation # ############################# - /relocalizationInformation: get: summary: Operation to retrieve all the relocalization information of one or severals WorldAnchors or Trackables. -- GitLab