Commit eec9df4c authored by Eric Villain's avatar Eric Villain
Browse files

Replace Uid and id by UUID where it's necessary

Dimension becomes size
Create an orientation for the world link (UUIDFrom, UUIDTo)
CRS becomesTransform3D
Deleted every duplicated descriptions (they are factorized at the schemas level when possible to avoid discrepancies)
parent 54c57845
Loading
Loading
Loading
Loading
+64 −85
Original line number Original line Diff line number Diff line
openapi: "3.0.0"
openapi: "3.0.0"
info: 
info: 
  version: 0.0.3
  version: 0.0.4
  title: World Storage API
  title: World Storage API
  description: API ensuring interoperability between an authoring tool and a World Storage service
  description: API ensuring interoperability between an authoring tool and a World Storage service
  license:
  license:
@@ -57,13 +57,16 @@ paths:
            application/json:
            application/json:
              schema:
              schema:
                $ref: '#/components/schemas/Error'
                $ref: '#/components/schemas/Error'
# Check 2xx, 4xx, 5xx...            
        '401':
          $ref: '#/components/responses/UUID'
    get:
    get:
      summary: returns the list of all trackables defined by the world storage.
      summary: returns the list of all trackables defined by the world storage.
      operationId: getTrackables
      operationId: getTrackables
      tags:
      tags:
        - trackables
        - trackables
      responses:
      responses:
        200:
        '200':
          description: OK returns all the Trackables defined by the world storage.
          description: OK returns all the Trackables defined by the world storage.
          content:
          content:
            application/json:
            application/json:
@@ -71,7 +74,7 @@ paths:
                type : array
                type : array
                items :
                items :
                  $ref: "#/components/schemas/Trackable"          
                  $ref: "#/components/schemas/Trackable"          
        201:
        '201':
          description: Null response
          description: Null response
        default:
        default:
          description: unexpected error
          description: unexpected error
@@ -79,16 +82,17 @@ paths:
            application/json:
            application/json:
              schema:
              schema:
                $ref: "#/components/schemas/Error"    
                $ref: "#/components/schemas/Error"    
  /trackables/{trackableId}:

  /trackables/{trackableUUID}:
    get:
    get:
      summary: Find a trackable by his ID
      summary: Find a trackable by its UUID
      operationId: getTrackableById
      operationId: getTrackableById
      tags:
      tags:
      - trackables
      - trackables
      parameters:
      parameters:
        - name: trackableId
        - name: trackableUUID
          in: path
          in: path
          description: ID of the trackable to retrieve
          description: UUID of the trackable to retrieve
          required: true
          required: true
          schema:
          schema:
            type: string
            type: string
@@ -100,7 +104,7 @@ paths:
              schema:
              schema:
                $ref: '#/components/schemas/Trackable' 
                $ref: '#/components/schemas/Trackable' 
        '400':
        '400':
          description: Invalid ID supplied
          description: Invalid UUID supplied
        '404':
        '404':
          description: Trackable not found
          description: Trackable not found
    delete:
    delete:
@@ -109,9 +113,9 @@ paths:
      tags:
      tags:
      - trackables
      - trackables
      parameters:
      parameters:
        - name: trackableId
        - name: trackableUUID
          in: path
          in: path
          description: trackable id to delete
          description: trackable UUID to delete
          required: true
          required: true
          schema:
          schema:
            type: string
            type: string
@@ -119,7 +123,7 @@ paths:
        '200':
        '200':
          description: OK
          description: OK
        '400':
        '400':
          description: Invalid ID supplied
          description: Invalid UUID supplied
        '404':
        '404':
          description: trackable not found              
          description: trackable not found              
  /worldAnchors:
  /worldAnchors:
@@ -175,16 +179,16 @@ paths:
            application/json:
            application/json:
              schema:
              schema:
                $ref: "#/components/schemas/Error"  
                $ref: "#/components/schemas/Error"  
  /worldAnchors/{worldAnchorId}:
  /worldAnchors/{worldAnchorUUID}:
    get:
    get:
      summary: Find a world anchor by his ID
      summary: Find a world anchor by his UUID
      operationId: getWorldAnchorById
      operationId: getWorldAnchorById
      tags:
      tags:
      - world anchors
      - world anchors
      parameters:
      parameters:
        - name: worldAnchorId
        - name: trackableUUID
          in: path
          in: path
          description: ID of the world anchor to retrieve
          description: UUID of the world anchor to retrieve
          required: true
          required: true
          schema:
          schema:
            type: string
            type: string
@@ -196,7 +200,7 @@ paths:
              schema:
              schema:
                $ref: '#/components/schemas/WorldAnchor' 
                $ref: '#/components/schemas/WorldAnchor' 
        '400':
        '400':
          description: Invalid ID supplied
          description: Invalid UUID supplied
        '404':
        '404':
          description: World Anchor not found
          description: World Anchor not found
    delete:
    delete:
@@ -205,9 +209,9 @@ paths:
      tags:
      tags:
      - world anchors
      - world anchors
      parameters:
      parameters:
        - name: worldAnchorId
        - name: trackableUUID
          in: path
          in: path
          description: world anchor id to delete
          description: world anchor UUID to delete
          required: true
          required: true
          schema:
          schema:
            type: string
            type: string
@@ -215,7 +219,7 @@ paths:
        '200':
        '200':
          description: OK
          description: OK
        '400':
        '400':
          description: Invalid ID supplied
          description: Invalid UUID supplied
        '404':
        '404':
          description: World anchor not found
          description: World anchor not found
  /worldLinks:
  /worldLinks:
@@ -271,14 +275,14 @@ paths:
            application/json:
            application/json:
              schema:
              schema:
                $ref: "#/components/schemas/Error"
                $ref: "#/components/schemas/Error"
  /worldLinks/{linkId}:
  /worldLinks/{worldLinkUUID}:
    get:
    get:
      summary: Find a link by his ID
      summary: Find a link by his ID
      operationId: getWorldLinkById
      operationId: getWorldLinkById
      tags:
      tags:
      - world links
      - world links
      parameters:
      parameters:
        - name: worldLinkId
        - name: worldLinkUUID
          in: path
          in: path
          description: ID of the link to retrieve
          description: ID of the link to retrieve
          required: true
          required: true
@@ -301,7 +305,7 @@ paths:
      tags:
      tags:
      - world links
      - world links
      parameters:
      parameters:
        - name: linkId
        - name: worldLinkUUID
          in: path
          in: path
          description: link id to delete
          description: link id to delete
          required: true
          required: true
@@ -319,22 +323,22 @@ components:
    Trackable:
    Trackable:
      type: object
      type: object
      required:
      required:
        - creatorUID
        - creatorUUID
        - trackableType
        - trackableType
        - trackableEncodingInformation
        - trackableEncodingInformation
        - trackablePayload
        - trackablePayload
        - localCRS
        - localCRS
        - unit
        - unit
        - trackableDimension
        - trackableSize
        - keyvalueTagList
        - keyvalueTagList
      properties:
      properties:
        UID:
        UUID:
          description: A Universally Unique IDentifier identifying the trackable
          description: A Universally Unique IDentifier identifying the trackable (RFC 4122)
          type: string
          type: string
          format: uuid
          format: uuid
          example: fa8bbe40-8052-11ec-a8a3-0242ac120002
          example: fa8bbe40-8052-11ec-a8a3-0242ac120002
        creatorUID:
        creatorUUID:        
          description: A Universally Unique IDentifier identifying the creator of the trackable
          description: A Universally Unique IDentifier identifying the creator of the trackable (a person, a team or a company)
          type: string
          type: string
          format: uuid
          format: uuid
          example: c75f6324-77a0-11ec-90d6-0242ac120003
          example: c75f6324-77a0-11ec-90d6-0242ac120003
@@ -344,7 +348,6 @@ components:
          enum: [FIDUCIAL_MARKER, IMAGE_MARKER, MAP, OTHER]
          enum: [FIDUCIAL_MARKER, IMAGE_MARKER, MAP, OTHER]
          example: FIDUCIAL_MARKER
          example: FIDUCIAL_MARKER
        trackableEncodingInformation:         
        trackableEncodingInformation:         
          description: Identifies targeted framework and version of the format.
          $ref: '#/components/schemas/EncodingInformationStructure'
          $ref: '#/components/schemas/EncodingInformationStructure'
        trackablePayload:
        trackablePayload:
          description: The data provided to create the trackable in a specific format handled by the World Storage service.
          description: The data provided to create the trackable in a specific format handled by the World Storage service.
@@ -352,106 +355,77 @@ components:
          format: byte
          format: byte
          example: "10110101"
          example: "10110101"
        localCRS:
        localCRS:
            description: Coordinate reference system 
            $ref: '#/components/schemas/Transform3D'
            $ref: '#/components/schemas/CRS'
            example: [-2,  1,  -3, 4,
                    4,   4,  4,  2,
                    1,   0,  -2, 1,
                    -1,  -2, 0,  0]
        unit:
        unit:
            description: Unit of length
            $ref: '#/components/schemas/UnitSystem'
            $ref: '#/components/schemas/UnitSystem'
        trackableDimension:
        trackableSize:
            description: Bounding box of the Trackable, {width, length, 0} for 2D trackables, {width, length, depth} for 3D trackables
            $ref: '#/components/schemas/Size'
            $ref: '#/components/schemas/Dimension'
            example: [1,5,0]
        keyvalueTags:
        keyvalueTags:
            description: List of additional parameters to be stored
            $ref: '#/components/schemas/KeyvalueTagList'
            $ref: '#/components/schemas/KeyvalueTagList'
            example: { "author" : ["james","donovan"], "image" : ["skater"]}
                WorldAnchor:
                WorldAnchor:
      type: object
      type: object
      required:
      required:
        - creatorUID        
        - creatorUUID        
        - localCRS
        - localCRS
        - unit
        - unit
        - worldAnchorDimension
        - worldAnchorSize
        - keyvalueTagList
        - keyvalueTagList
      properties:
      properties:
        UID:
        UUID:
          description: A Universally Unique IDentifier identifying the world anchor
          description: A Universally Unique IDentifier identifying the world anchor
          type: string
          type: string
          format: uuid
          format: uuid
          example: ce8ccd80-56ee-2a5c-a8a3-0242ac150d002
          example: ce8ccd80-56ee-2a5c-a8a3-0242ac150d002
        creatorUID:
        creatorUUID:
          description: A Universally Unique IDentifier identifying the creator of the world anchor
          description: A Universally Unique IDentifier identifying the creator of the world anchor
          type: string
          type: string
          format: uuid
          format: uuid
          example: c75f6324-77a0-11ec-90d6-0242ac120003
          example: c75f6324-77a0-11ec-90d6-0242ac120003
        localCRS:
        localCRS:
            description: Coordinate reference system 
            $ref: '#/components/schemas/Transform3D'
            $ref: '#/components/schemas/CRS'
            example: [-2,  1,  -3, 4,
                    4,   4,  4,  2,
                    1,   0,  -2, 1,
                    -1,  -2, 0,  0]
        unit:
        unit:
            description: Unit of length
            $ref: '#/components/schemas/UnitSystem'
            $ref: '#/components/schemas/UnitSystem'
        worldAnchorDimension:
        worldAnchorSize:
            description: Bounding box {width, length, depth}
            $ref: '#/components/schemas/Size'
            $ref: '#/components/schemas/Dimension'
            example: [1,5,0]
        keyvalueTags:
        keyvalueTags:
            description: List of additional parameters to be stored
            $ref: '#/components/schemas/KeyvalueTagList'
            $ref: '#/components/schemas/KeyvalueTagList'
            example: { "Place" : ["Museum 1"], "room" : ["B4"]}   
    WorldLink:
    WorldLink:
      type: object
      type: object
      required:
      required:
        - creatorUID
        - creatorUUID
        - UIDA
        - UUIDFrom
        - UIDB
        - UUIDTo
        - localCRS
        - transform
        - unit
        - unit
        - linkDimension
        - linkSize
        - keyvalueTags
        - keyvalueTags
      properties:
      properties:
        UID:
        UUID:
          description: A Universally Unique IDentifier identifying the link
          description: A Universally Unique IDentifier identifying the link
          type: string
          type: string
          format: uuid
          format: uuid
          example: ce8ccd80-56ee-2a5c-a8a3-0242ac150d002
          example: ce8ccd80-56ee-2a5c-a8a3-0242ac150d002
        creatorUID:
        creatorUUID:
          description: A Universally Unique IDentifier identifying the creator of the link
          description: A Universally Unique IDentifier identifying the creator of the link
          type: string
          type: string
          format: uuid
          format: uuid
          example: c75f6324-77a0-11ec-90d6-0242ac120003
          example: c75f6324-77a0-11ec-90d6-0242ac120003
        UIDA:
        UUIDFrom:
          description: A Universally Unique IDentifier identifying a world anchor or trackable
          description: A Universally Unique IDentifier identifying a world anchor or trackable
          type: string
          type: string
          format: uuid
          format: uuid
          example: ce8ccd80-56ee-2a5c-a8a3-0242ac150d002
          example: ce8ccd80-56ee-2a5c-a8a3-0242ac150d002
        UIDB:
        UUIDTo:
          description: A Universally Unique IDentifier identifying a world anchor or trackable
          description: A Universally Unique IDentifier identifying a world anchor or trackable
          type: string
          type: string
          format: uuid
          format: uuid
          example: ce8ccd80-56ee-2a5c-a8a3-0242ac150d002    
          example: ce8ccd80-56ee-2a5c-a8a3-0242ac150d002    
        localCRS:
        transform:
            description: Coordinate reference system 
            $ref: '#/components/schemas/Transform3D'
            $ref: '#/components/schemas/CRS'
            example: [-2,  1,  -3, 4,
                    4,   4,  4,  2,
                    1,   0,  -2, 1,
                    -1,  -2, 0,  0]
        unit:
        unit:
            description: Unit of length
            $ref: '#/components/schemas/UnitSystem'
            $ref: '#/components/schemas/UnitSystem'
            example: M
        linkSize:
        linkDimension:
            $ref: '#/components/schemas/Size'
            description: Bounding box
            $ref: '#/components/schemas/Dimension'
            example: [1,5,0]
        keyvalueTags:
        keyvalueTags:
            description: List of additional parameters to be stored
            description: List of additional parameters to be stored
            $ref: '#/components/schemas/KeyvalueTagList'
            $ref: '#/components/schemas/KeyvalueTagList'
@@ -470,7 +444,7 @@ components:
          description: The version of the format
          description: The version of the format
          type: string
          type: string
          example : "1.01"
          example : "1.01"
    CRS:
    Transform3D:
        description: Coordinate reference system of the world anchor, a 4*4 matrix (rowmajor) represented by a float vector
        description: Coordinate reference system of the world anchor, a 4*4 matrix (rowmajor) represented by a float vector
        type: array
        type: array
        minItems: 16
        minItems: 16
@@ -478,12 +452,17 @@ components:
        items:
        items:
            type: number
            type: number
            format: float
            format: float
        example: [-2, 1,-3, 4,
                   4, 4, 4, 2,
                   1, 0,-2, 1,
                  -1,-2, 0, 0]
    UnitSystem:
    UnitSystem:
        description: Unit of length
        description: Unit of length
        type: string
        type: string
        enum: [MM,  CM,  DM,  M,  DAM,  HM,  KM,  INCH, FOOT, YARD, MILE]
        enum: [MM,  CM,  DM,  M,  DAM,  HM,  KM,  INCH, FOOT, YARD, MILE]
    Dimension:
        example: M
        description: Bounding box {width, length, depth}
    Size:
        description: Size {width, length, depth}
        type: array
        type: array
        items:
        items:
            type: number
            type: number