Commit 4fed58ca authored by Sylvain Renault's avatar Sylvain Renault
Browse files

New error (511) for invalid token (secret token).

parent 7421675a
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -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:
+18 −0
Original line number Diff line number Diff line
@@ -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'

+34 −8
Original line number Diff line number Diff line
@@ -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,6 +604,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'       


# COMPONENTS ###############################################