Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Swagger open api macro
swagger: "2.0"
info:
  version: "0.0.1"
  title: ARES Kudo API server
# during dev, should point to your local machine
host: localhost:3000
# basePath prefixes all resource paths

basePath: /api
#

tags:
  - name: ARES Kudo Required
    description: Required APIs to load and store a drawing
  - name: ARES Kudo Optional
    description: Optional APIs to improve interactions for loading and storing a drawing
  - name: File Sessions
    description: Optional File Session Handling (has
to be implemented if sessionId query parameter is passed to editor url)
  - name: Commenting
    description: API support for commenting panel
  - name: User Sessions
    description: Optional User Session Handling
(has to be- implementedname: ifBlock sessionIdLibrary
query parameter is passed todescription: editorAPI url)support for Block Library


schemes:
  # tip: remove http to make production-grade
  - http
  - https
# format of bodies a client can send (Content-Type)
consumes:
  - application/json
# format of the responses to the client (Accepts)
produces:
  - application/json
parameters:
  fileId:
    name: fileId
    in: path
    description: The id of the file
    required: true
    type: string
  sessionIdlibId:
    name: sessionIdlibId
    in: headerpath
    description: The id of the userlibrary
sessionId     required: true
    type: string
  threadIditemId:
    name: threadIditemId
    in: path
    description: The id of the commentblock
thread     required: true
    type: string
  markupIdownerType:
    name: markupIdownerType
    in: pathheader
    description: Type of the markup library (PUBLIC/USER/ORG)
    required: truefalse
    type: string
  commentIdsessionId:
    name: commentIdsessionid
    in: pathheader
    description: the user commentsessionId
    required: true
    type: string
  attachmentIdthreadId:
    name: attachmentIdthreadId
    in: path
    description: the comment attachmentthread
    required: true
    type: string
  optionalSessionIdmarkupId:
    name: sessionIdmarkupId
    in: headerpath
    description: the usermarkup
sessionId (optional; sent only if sessionId query parameter was passed to editor url)
    required: false
    required: true
    type: string
  fileSessionIdcommentId:
    name: xSessionIdcommentId
    in: headerpath
    description: the file sessionIdcomment
    required: true
    type: string
paths:   /files/{fileId}/diffsattachmentId:
    parametersname: attachmentId
    in: -path
$ref: '#/parameters/fileId'   description: the attachment
 - $ref: '#/parameters/optionalSessionId'
  required: true
  # binds a127type: appstring
logic to aoptionalSessionId:
route     x-swagger-router-controllername: filessessionid
     getin:  header
    description: Returnsthe fileuser contentsessionId
    required: false
# used as the methodtype: namestring
ofpaths:
the controller /library/blocks:
     operationIdparameters:
diffs_get      - tags$ref: "#/parameters/optionalSessionId"
       - ARES Kudo Required$ref: "#/parameters/ownerType"

    x-swagger-router-controller: blocks
responses:
    get:
   "200":   description: Returns block  libraries

  description: Success   operationId: libraries_get
      schematags:
        - Block Library
 required:     responses:
        "200":
- status         description: Success
    - baseContent     schema:
       properties:     $ref: "#/definitions/LibrariesResponse"
        statusdefault:
          description: Error
     type: string    schema:
            default$ref: "ok#/definitions/ErrorResponse"

  /library/blocks/{libId}/items:
          baseContentparameters:
      - $ref: "#/parameters/libId"
      - type$ref: string"#/parameters/optionalSessionId"

    x-swagger-router-controller: blocks

    get:
      description: Base64 encoded content of fileReturns blocks of a library

      operationId: blocks_get
      tags:
        - Block Library
# responses may fall through to errorsresponses:
        "404200":
          description: ErrorSuccess
          schema:
            $ref: "#/definitions/ErrorResponseBlocksResponse"
    put:    default:
  description: Update file content     description: Error
# used as the method name of the controller  schema:
    operationId: diffs_put       tags$ref: "#/definitions/ErrorResponse"

  /library/blocks/{libId}/items/{itemId}/content:
   - ARESparameters:
Kudo Required     - $ref: parameters:"#/parameters/libId"
        - name$ref: body"#/parameters/itemId"
      - $ref: "#/parameters/optionalSessionId"
 in: body           required- in: truequery
          schemaname:    fileType
        required: false
        default: "dwg"
   - baseContent    type: string

      propertiesx-swagger-router-controller: blocks

    get:
       baseContentdescription: Returns block file

            typeoperationId: stringblock_getfile
      tags:
        - description:Block Base64Library
encoded content of file   produces:
        - application/octet-stream
      responses:
        "200":
          description: Success
          schemadefault:
            requireddescription: Error
          schema:
  - status         $ref: "#/definitions/ErrorResponse"

   - changeId/library/blocks/{libId}/items/{itemId}/thumbnail:
    parameters:
      -   properties$ref: "#/parameters/libId"
      - $ref: "#/parameters/itemId"
    status  - $ref: "#/parameters/optionalSessionId"
      - in: query
        typename: stringfileType
        required: false
        default: "okpng"
        type: string

   changeId x-swagger-router-controller: blocks

    get:
      description: Returns block type:thumbnail
string
      operationId: block_getthumbnail
# responses may fall through to errorstags:
        default:- Block Library
        descriptionproduces:
Error        - application/octet-stream
 schema:     responses:
       $ref: "#/definitions/ErrorResponse"
  /files200":
    post:       description: CreateSuccess
a new file      default:
# used as the method name of the controller   description: Error
  operationId: post_file       tagsschema:
        - ARES Kudo Optional $ref: "#/definitions/ErrorResponse"

  /files:
consumes:    parameters:
     - multipart/form-data $ref: "#/parameters/optionalSessionId"
    parametersx-swagger-router-controller: files
    post:
  - in: header  description: Create/Update a file
     name: folderId# used as the method name of the controller
  required: true   operationId: post_file
      typetags:
string         - in:ARES formDataKudo Required
      consumes:
  name: file     - multipart/form-data
    required: true parameters:
        - typein: fileheader
      responses:    name:     "200":fileId
           description: SuccessID of the file (New file will be created if this value schema:is not specified)
          required: false
          type: string
 - status      - in: formData
      -   changeId name: file
          propertiesrequired: true
          type: file
 status     responses:
        "200":
        type  description: stringSuccess
          schema:
     default:  "ok"     required:
         changeId:     - id
          type: string   - filename
    # responses may fall through to errors    - isNewFile
   default:           description:- ErrorchangeId
          schema:  properties:
          $ref: "#/definitions/ErrorResponse"   /files/{fileId}/xref/searchid:
    # binds a127 app logic to a route     x-swagger-router-controller: filestype: string
       post:       descriptionfilename:
XRef  search       # used as the method name of thetype: controllerstring
      operationId: xref_search       tagsisNewFile:
        - ARES Kudo Optional     type: boolean
parameters:         - $ref: '#/parameters/fileId'   changeId:
     - $ref: '#/parameters/optionalSessionId'         - nametype: bodystring
        # responses in:may bodyfall through to errors
       required default:
true           schemadescription: Error
           requiredschema:
            $ref: "#/definitions/ErrorResponse"
 - path /files/{fileId}/data:
    parameters:
      - properties:$ref: "#/parameters/fileId"
      - $ref: "#/parameters/optionalSessionId"
    # binds path:a127 app logic to a route
    x-swagger-router-controller: files

    typeget:
array      description: Returns file content
      # description:used xrefsas pathsthe tomethod searchname of the controller
      operationId: data_get
      tags:
        - ARES items:Kudo Required
      produces:
        - application/octet-stream
 type: string       responses:
        "200":
          description: Success
        # responses schema:may fall through to errors
        type"404":
object             propertiesdescription: Error
             statusschema:
            $ref: "#/definitions/ErrorResponse"

  type/files/{fileId}/xref/search:
string    # binds a127 app logic to a route
     defaultx-swagger-router-controller: "ok"files
    post:
         resultdescription: XRef search
      # used as the method name of the type:controller
array      operationId: xref_search
         itemstags:
        - ARES Kudo Optional
      typeparameters:
object        - $ref: "#/parameters/fileId"
        - properties$ref: "#/parameters/optionalSessionId"
        - name: body
          pathin: body
          required: true
          typeschema:
string            required:
        files:      - path
            properties:
  type:  array          path:
            items:    type: array
                description: xrefs paths type:to search
object                items:
        properties:          type: string
      responses:
        "_id200":
          description: Success
          schema:
     type: string      type: array
 # responses may fall through to errors     items:
   default:           descriptiontype: Errorobject
          schema:    properties:
        $ref: "#/definitions/ErrorResponse"   /files/{fileId}/preview:    path:
# binds a127 app logic to a route     x-swagger-router-controller: files     posttype: string
     description: Optionally handle receiving updates previews      files:
# used as the method name of the controller       operationId: preview_post       tagstype: array
       - ARES Kudo Optional       parameters:
        - $ref: '#/parameters/fileId' items:
         - $ref: '#/parameters/optionalSessionId'       responses:         "200"type: object
         description: Success           schemaproperties:
            type: object             properties:
   "_id":
          status:                  type: string
                default: "ok"
        # responses may fall through to errors
        default:
          description: Error
          schema:
            $ref: "#/definitions/ErrorResponse"
                        
  /files/{fileId}/infopreview:
    # binds a127 app logic to a route
    x-swagger-router-controller: files
    getpost:
      description: ReturnsOptionally file informationhandle receiving updates previews
      # used as the method name of the controller
      operationId: infopreview_getpost
      tags:
        - ARES Kudo RequiredOptional
      parameters:
        - $ref: '"#/parameters/fileId'"
        - $ref: '"#/parameters/optionalSessionId'"
        responses:- in: formData
          "200"name: file
          descriptionrequired: Successtrue
          schematype: file
      responses:
        required:"200":
          description: Success
     - status     schema:
            type: object
            properties:
              status:
                 type: string
                default: "ok"
        # responses may fall through to filename:errors
        default:
        type: string description: Error
            folderIdschema:
            $ref: "#/definitions/ErrorResponse"

  type: string/files/{fileId}/info:
    # binds a127 app logic to a route
    ownerx-swagger-router-controller: files
    get:
      description: Returns file information
 type: string    # used as the method #name responsesof maythe fallcontroller
through to errors    operationId: info_get
   "401"   tags:
        - ARES description:Kudo UserRequired
is not autenticated    parameters:
      schema:  - $ref: "#/parameters/fileId"
        - $ref: "#/definitionsparameters/ErrorResponse"optionalSessionId"
      responses:
        "404200":
          description: File is notSuccess
found           schema:
            $refrequired:
"#/definitions/ErrorResponse"   /files/{fileId}/session:     # binds a127 app logic to a- routestatus
    parameters:       - $reftype: '#/parameters/fileId'object
      - $ref: '#/parameters/optionalSessionId'    properties:
 x-swagger-router-controller: files     get:       descriptionstatus:
get file sessions       # used as the method name of the controllertype: string
        operationId: session_get       tagsdefault: "ok"
       - File Sessions       filename:
       responses:         "200"type: string
         description     folderId:
Success                schematype: string
           #   aowner:
pointer to a definition             $reftype: "#/definitions/SessionsResponse"string
        # responses may fall through to errors
        default"401":
          description: ErrorUser is not autenticated
          schema:
            $ref: "#/definitions/ErrorResponse"

   post:       description"404":
Create file session. Sessions need to be either of type "view" or "edit"
 description: File is not found
    # used as the method name of the controllerschema:
      operationId: session_post       tags$ref: "#/definitions/ErrorResponse"
   /files/{fileId}/session:
   - File Sessions
  # binds a127 app logic to a route
    parameters:
      - $ref: "#/parameters/fileId"
 - name: body   - $ref: "#/parameters/sessionId"

    inx-swagger-router-controller: bodyfiles_sessions
    get:
      requireddescription: trueget file sessions
      # used schema:as the method name of the controller
      requiredoperationId: session_get
      tags:
      - mode - File Sessions
         propertiesresponses:
        "200":
     mode:     description: Success
          typeschema:
string            # a pointer to a description:definition
Type of session requested         $ref: "#/definitions/SessionsResponse"
        # enum: [view, edit]
  responses may fall through to errors
        default:
  fileId:        description: Error
       type: string  schema:
            $ref:  description: fileId for the file for which the session is being requested    
      responses:
 "#/definitions/ErrorResponse"
    post:
      description: Create file session. Sessions need to be either of type "view" or "edit"
      "200":# used as the method name of the controller
  description: Success   operationId: session_post
      schematags:
        - File Sessions
 required:      parameters:
        - statusname: body
          in: body
 - "_id"         required: true
  properties:        schema:
      status:      required:
           type: string  - mode
             defaultproperties:
"ok"               "_id"mode:
                type: string
        # responses may fall through to errors  description: Type of session requested
  default:           description: Error  enum: [view, edit]
      schema:        fileId:
    $ref: "#/definitions/ErrorResponse"     delete:       descriptiontype: deletestring
file session       # used as the method name of the controllerdescription: fileId for the file for which operationId:the session_delete is being requested
   tags:   responses:
     - File Sessions "200":
     parameters:     description: Success
  - $ref: '#/parameters/fileSessionId'       responsesschema:
        "200":    required:
      description: Success       - status
  schema:            - #"_id"
a pointer to a definition        properties:
    $ref: "#/definitions/SessionsResponse"         #status:
responses may fall through to errors         default:  type: string
       description: Error        default: "ok"
 schema:             $ref"_id": "#/definitions/ErrorResponse"
                /authtype: string
        # bindsresponses a127may appfall logicthrough to aerrors
 route     x-swagger-router-controller: auth default:
   get:       description: validateError
user session       # used asschema:
the method name of the controller       tags:$ref: "#/definitions/ErrorResponse"
    delete:
   -  User Sessionsdescription: delete file session
   operationId: auth_get  # used as the method parameters:name of the controller
     - $refoperationId: '#/parameters/sessionId'session_delete
      responsestags:
        - #File Sessions
 responses may fall through to errorsresponses:
        "200":
          description: Success
          schema:
            type:# objecta pointer to a definition
        properties:    $ref: "#/definitions/SessionsResponse"
        # status:responses may fall through to errors
            typedefault:
string          description: Error
     default: "ok"    schema:
    401:           description: Authorization information is missing or invalid.
  /users$ref: "#/definitions/ErrorResponse"
  /auth:
    # binds a127 app logic to a route
    x-swagger-router-controller: usersauth
    get:
      description: Returnsvalidate user objectsession
      # used as the method name of the controller
      operationIdtags:
users_get       tags: - User Sessions
     - User SessionsoperationId: auth_get
      parameters:
        - $ref: '"#/parameters/sessionId'optionalSessionId"
      responses:
        # responses may fall through to errors
        "200":
          description: Success
          schema:
            type: object
            properties:
              status: 
                type: string
                default: "ok"
        401:
     results:     description: Authorization information is missing or invalid.
     type/users:
array    # binds a127 app logic to a route
     itemsx-swagger-router-controller: users
    get:
      description: Get user data and preferences
   type: object  # used as the method name of the controller
      operationId: users_get
  properties:    tags:
        - Users
        fnameparameters:
        - $ref: "#/parameters/sessionId"
             typeresponses:
string            200:
            description: firstSuccess
name          schema:
            surname$ref: '#/definitions/GetUserResponse'
        400:
          description: Something went wrong type:while stringgetting the userdata from json file.
        default:
          description: lastError
name of user        schema:
            $ref:  "_id":"#/definitions/ErrorResponse"
    put:
      description: Update user data and preferences
      # type:used stringas the method name of the controller
      operationId: users_put
      tags:
 email:       - Users
      parameters:
        - type$ref: string"#/parameters/sessionId"
        - name: body
           licenseExpirationDatein: body
          required: true
           typeschema:
integer            $ref: '#/definitions/UserPreferencesObject'

        preferencesresponses:
        200:
               typedescription: objectSuccess
          schema:
             propertiestype: object
            properties:
            preferences_display:  status:
                type: string
        type: object       default: "ok"
        400:
           propertiesdescription: Something went wrong while saving the userdata into the json file.
        default:
           graphicswinmodelbackgrndcolordescription: Error
          schema:
            $ref: "#/definitions/ErrorResponse"

  /v1/files/{fileId}/annotations:
  type: string # binds a127 app logic to a route
    x-swagger-router-controller: comments
    get:
      description: Returns annotations for a file
 default: White    # used as the method name of the controller
      operationId: annotations_get
      windowtags:
        - Commenting
      parameters:
        - $ref:  type: object"#/parameters/fileId"
        - $ref: "#/parameters/sessionId"
        - name: timestamp
        properties:  type: integer
          in: query
          required: false
   edit:       description: timestamp of last request to only send new items
      responses:
        # type:responses objectmay fall through to errors
        "200":
          description: Success
     view:     schema:
            type: object
            properties:
type: object             status:
             variables:   type: string
                default: "ok"
      type: object       results:
                type: object
   properties:             properties:
                  dynasnaptimestamp:
                    type: integer
          type: string         description: time of response
                  commmentThreads:
 default: "63"     put:       description: Returns user object   type: array
  # used as the method name of the controller       operationId: users_put  description: ""
   tags:         - User Sessions       parametersitems:
 
      - $ref: '#/parameters/sessionId'         - name: body   type: object
      in: body           requiredmarkups:
true           schema:             propertiestype: array
             preferences:       description: ""
        type: object             items:
   description: user preferences                 propertiestype: object
                  windowstatus:
                    type: objectstring
                    propertiesdefault: "ok"
  /v1/files/{fileId}/markups:
    # binds a127 app logic to a route
      editx-swagger-router-controller: comments
    get:
      description: Returns markups for a file
      type:# objectused as the method name of the controller
      operationId: markups_get
      tags:
  properties:      - Commenting
      parameters:
        - $ref: "#/parameters/fileId"
  dockwidgets:      - $ref: "#/parameters/sessionId"
        - name: timestamp
          type: objectinteger
          in: query
          required: false
    properties:      description: timestamp of last request to only send new items
      responses:
        layerwindow:# responses may fall through to errors
        "200":
          description: Success
     type: object    schema:
            type: object
              properties:
              status:
                type: string
 h:               default: "ok"
              results:
     type: string          type: object
                properties:
        description: height o the layerwindow      timestamp:
 responses:         # responses may fall through to errors    type: integer
   "200":                 description: Successtime of response
                  schemamarkups:
                    type: object array
                    description: ""
                    items:
                      propertiestype: object
                  status:
                    type: string
                    default: "ok"
  /v1/files/{fileId}/annotationscommentThreads:
    # binds a127 app logic to a route
    x-swagger-router-controller: comments
    get:
      description: Returns annotationscomments for a file
      # used as the method name of the controller
      operationId: annotationscommentThreads_get
      tags:
        - Commenting
      parameters:
        - $ref: '"#/parameters/fileId'"
        - $ref: '"#/parameters/sessionId'"
        - name: timestamp
          type: integer
          in: query
          required: false
          description: timestamp of last request to only send new items
      responses:
        # responses may fall through to errors
        "200":
          description: Success
          schema:
            type: object
            properties:
              status: 
                type: string
                default: "ok"
              results:
                type: object
                properties:
                  timestamp:
                    type: integer
                    description: time of response
                  commmentThreads:
                    type: array
                    description: ""
                    items:
                      type: object
                  markupsstatus:
                    type: arraystring
                    descriptiondefault: "ok"
  /v1/files/{fileId}/commentThread:
    # binds a127 app logic to a route
     itemsx-swagger-router-controller: comments
    post:
      description: Add a new commentThread for a file
  type: object   # used as the method name of the controller
      operationId: commentThread_post
  status:    tags:
        - Commenting
      typeparameters:
string        - $ref: "#/parameters/fileId"
        -  default$ref: "ok#/parameters/sessionId"
  /v1/files/{fileId}/markups:      - #name: bindsbody
a127 app logic to a route     x-swagger-router-controllerin: commentsbody
    get:       descriptionrequired: Returnstrue
markups for a file       #schema:
used as the method name of the controller     type: object
operationId: markups_get       tags:    properties:
    - Commenting       parameters:  title:
      - $ref: '#/parameters/fileId'        type: -string
$ref: '#/parameters/sessionId'         - name: timestamp  text:
        type: integer       type: string
  in: query           requiredstate:
false           description: timestamp of last request totype: onlystring
send new items       responses:       enum: [ACTIVE, #RESOLVED]
responses may fall through to errors         "200"ids:

         description: Success      type: array
   schema:             typeitems:
object             properties:     type: string
      responses:
 status:       # responses may fall through to errors
    type: string   "200":
          description: Success
 default: "ok"        schema:
      results:      type: object
         type: object  properties:
              propertiesstatus:
                  timestamptype: string
                default: "ok"
 type: integer            timestamp:
        description: time of response     type: integer
            markups:    description: time of response
  /v1/files/{fileId}/commentThread/{threadId}:
    # binds a127 app logic to type:a arrayroute
    x-swagger-router-controller: comments
    put:
      description: Update a description:commentThread
""      # used as the method name of the controller
      itemsoperationId: commentThread_put
      tags:
        - Commenting
      typeparameters:
object        - $ref: "#/parameters/fileId"
        - status:$ref: "#/parameters/sessionId"
        - $ref: "#/parameters/threadId"
        - typename: stringbody
          in: body
        default  required: "ok" true
      /v1/files/{fileId}/commentThread:    schema:
# binds a127 app logic to a route     x-swagger-router-controller: commentstype: object
     post:       descriptionproperties:
 Add a new commentThread for a file       #title:
used as the method name of the controller       operationId: commentThread_post type: string
    tags:         - Commentingtext:
      parameters:         - $reftype: '#/parameters/fileId'string
        - $ref: '#/parameters/sessionId'    ids:
    - name: body           intype: bodyarray
          required: true      items:
    schema:              type: objectstring
      responses:
     properties:
        # responses may fall through to errors
        title"200":
          description: Success
    type: string     schema:
         text:   type: object
            typeproperties:
string               statestatus:
                type: string
                enumdefault: [ACTIVE, RESOLVED]"ok"
               idstimestamp:
                type: arrayinteger
                itemsdescription: time of response
    get:
      description: get a commentThread
 type: string    # used as responses:the method name of the controller
   # responses may fall through to errorsoperationId: commentThread_get
      tags:
   "200":     - Commenting
    description: Success parameters:
        - schema$ref: "#/parameters/fileId"
        - $ref:  type: object"#/parameters/sessionId"
        - $ref: "#/parameters/threadId"
   properties:   responses:
        # responses may status:fall through to errors
        "200":
     type: string    description: Success
          schema:
default: "ok"           type: object
  timestamp:          properties:
      type: integer       status:
         description: time of response
  /v1/files/{fileId}/commentThread/{threadId}:       type: string
                default: "ok"
              timestamp:
                type: integer
    # binds a127 app logic to a route     x-swagger-router-controller: commentsdescription: time of response
    putdelete:
      description: UpdateDelete a commentThreadcomment Thread
      # used as the method name of the controller
      operationId: commentThread_putdelete
      tags:
        - Commenting
      parameters:
        - $ref: '"#/parameters/fileId'"
        - $ref: '"#/parameters/sessionId'"
        - $ref: '"#/parameters/threadId'"
      responses:
 - name: body     # responses may fall through to in:errors
body        "200":
  required        description: trueSuccess
          schema:
             type: object
            properties:
              titlestatus:
                type: string
              text  default: "ok"
              timestamp:
type: string               idstype: integer
               type description: arraytime of response
  /v1/files/{fileId}/commentThread/{threadId}/comment/{commentId}:
    # binds a127 app logic to a items:route
    x-swagger-router-controller: comments
    put:
       typedescription: stringUpdate       responses:a comment
        # responsesused mayas fallthe throughmethod toname errorsof the controller
      "200"operationId: comment_put
      tags:
  description: Success     - Commenting
    schema:  parameters:
        -  type$ref: object"#/parameters/fileId"
        -    properties$ref: "#/parameters/sessionId"
        - $ref: "#/parameters/threadId"
  status:      - $ref: "#/parameters/commentId"
        - typename: stringbody
          in: body
    default: "ok"     required:  true
       timestamp:   schema:
             type: integerobject
                descriptionproperties:
time of response     get:       descriptiontext:
get a commentThread        # used as the method name oftype: thestring
controller       operationIdresponses:
commentThread_get       tags: # responses may fall through to errors
 - Commenting      "200":
parameters:         - $refdescription: '#/parameters/fileId' Success
         - $refschema:
'#/parameters/sessionId'           - $reftype: '#/parameters/threadId'object
      responses:      properties:
  # responses may fall through to errors      status:
  "200":           description: Success  type: string
       schema:         default: "ok"
  type: object           timestamp:
 properties:               statustype: integer
                typedescription: stringtime of response
    get:
      description: Retrieve a default:comment
"ok"      # used as the method name of the controller
timestamp:      operationId: comment_get
      tags:
  type: integer     - Commenting
      parameters:
   description: time of response   - $ref: "#/v1/filesparameters/{fileId}/commentThread/{threadId}/comment/{commentId}:fileId"
       # binds- a127 app logic to a route$ref: "#/parameters/sessionId"
        x-swagger-router-controller: comments- $ref: "#/parameters/threadId"
    put    - $ref: "#/parameters/commentId"
     description responses:
Update a comment        # usedresponses asmay thefall methodthrough nameto oferrors
the controller       operationId"200":
comment_put        tags:  description: Success
     - Commenting    schema:
  parameters:         - $reftype: '#/parameters/fileId'object
        - $ref: '#/parameters/sessionId'  properties:
      - $ref: '#/parameters/threadId'      status:
  - $ref: '#/parameters/commentId'         - name: body type: string
        in: body       default: "ok"
  required: true           schematimestamp:
             type: object  type: integer
         properties:       description: time of response
    textdelete:
      description: Delete a comment
      type: string# used as the method name of the controller
      operationId: comment_delete
      tags:
        - Commenting
      parameters:
        - $ref: "#/parameters/fileId"
        - $ref: "#/parameters/sessionId"
        - $ref: "#/parameters/threadId"
        - $ref: "#/parameters/commentId"
      responses:
        # responses may fall through to errors
        "200":
          description: Success
          schema:
            type: object
            properties:
              status: 
                type: string
                default: "ok"
              timestamp:
                type: integer
                description: time of response
    get/v1/files/{fileId}/commentThread/{threadId}/comment:
    # binds a127 app logic to a route
    x-swagger-router-controller: comments
    post:
      description: RetrievePost a new comment 
      # used as the method name of the controller
      operationId: comment_getpost
      tags:
        - Commenting
      parameters:
        - $ref: '"#/parameters/fileId'"
        - $ref: '"#/parameters/sessionId'"
        - $ref: '"#/parameters/threadId'"
        - $refname: '#/parameters/commentId'body
      responses:    in: body
   # responses may fall through to errors         "200":
       required: true
  description: Success           schema:
            type: object
            properties:
              statustext: 
                type: string
      responses:
        # default: "ok"
   responses may fall through to errors
          timestamp"200":
          description: Success
    type: integer     schema:
           description type: timeobject
of response     delete:       descriptionproperties:
Delete a comment        # used as the methodstatus:
name of the controller       operationId: comment_delete     type: string
tags:         - Commenting       parameters:default: "ok"
        - $ref: '#/parameters/fileId'    timestamp:
    - $ref: '#/parameters/sessionId'         - $reftype: '#/parameters/threadId' integer
         - $ref: '#/parameters/commentId'     description: time responses:of response
  /v1/files/{fileId}/markup:
    # responsesbinds maya127 fallapp throughlogic to errorsa route
    x-swagger-router-controller: comments
 "200":   post:
       description: SuccessAdd a new markup for a file
    schema:  # used as the method name of the controller
  type: object   operationId: markup_post
      tags:
 properties:       - Commenting
      statusparameters:
        - $ref: "#/parameters/fileId"
        type: string- $ref: "#/parameters/sessionId"
        - name: body
      default: "ok"   in: body
          timestamprequired: true
          schema:
    type: integer       type: object
        description: time of response properties:
 /v1/files/{fileId}/commentThread/{threadId}/comment:     # binds a127 app logic to a route title:
   x-swagger-router-controller: comments     post:       descriptiontype: Poststring
a new comment        # used as the methodtext:
name of the controller       operationId: comment_post       tagstype: string
       - Commenting       parametersstate:
        - $ref: '#/parameters/fileId'         - $reftype: '#/parameters/sessionId'string
        - $ref: '#/parameters/threadId'         - nameenum: body[ACTIVE, RESOLVED]
         in: body           required: true
   ids:
      schema:              type: object
array
           properties:          items:
    text:                 type: string
      responses:
        # responses may fall through to errors
        "200":
          description: Success
          schema:
            type: object
            properties:
              status:
                 type: string
                default: "ok"
              timestamp:
                type: integer
                description: time of response
  /v1/files/{fileId}/markup/{markupId}:
    # binds a127 app logic to a route
    x-swagger-router-controller: comments
    postput:
      description: AddUpdate a new markup for
a file       # used as the method name of the controller
      operationId: markup_postput
      tags:
        - Commenting
      parameters:
        - $ref: '"#/parameters/fileId'"
        - $ref: '"#/parameters/sessionId'"
        - name$ref: body"#/parameters/markupId"
        - name: in: body
          requiredin: truebody
          schemarequired: true
            typeschema:
object             propertiestype: object
             titleproperties:
                typetitle: string
              text:                 type: string
              statetext:
                type: string
                enum:
[ACTIVE, RESOLVED]
              ids:
                type: array
                items:
                  type: string
      responses:
        # responses may fall through to errors
        "200":
          description: Success
          schema:
            type: object
            properties:
              status:
                 type: string
                default: "ok"
              timestamp:
                type: integer
                description: time of response
  /v1/files/{fileId}/markup/{markupId}:
    # binds a127 app logic to a route
    x-swagger-router-controller: comments
    put   get:
      description: Updateget a markup
       # used as the method name of the controller
      operationId: markup_putget
      tags:
        - Commenting
      parameters:
        - $ref: '"#/parameters/fileId'"
        - $ref: '"#/parameters/sessionId'"
        - $ref: '"#/parameters/markupId'"
      responses:
        # - name: body
 responses may fall through to errors
        in"200": body
          requireddescription: trueSuccess
          schema:
             type: object
            properties:
              titlestatus:
                type: string
              text  default: "ok"
              timestamp:
type: string               idstype: integer
               type description: arraytime of response
    delete:
         itemsdescription: delete a markup
      # used as the method name of the controller
type: string     operationId: markup_delete
responses:       tags:
 # responses may fall through to errors - Commenting
      "200"parameters:
        -  description$ref: Success"#/parameters/fileId"
        -  schema$ref: "#/parameters/sessionId"
        -   type$ref: object"#/parameters/markupId"
      responses:
     properties:   # responses may fall through to errors
       status "200":
          description: Success
     type: string    schema:
            defaulttype: "ok"object
              timestampproperties:
              status:
 type: integer              type: string
 description: time of response     get:       descriptiondefault: get"ok"
a markup        # used as the method nametimestamp:
of the controller       operationId: markup_get      type: tags:integer
        - Commenting       parametersdescription: time of response
  /v1/files/{fileId}/markup/{markupId}/comment/{commentId}:
  - $ref: '#/parameters/fileId'
   # binds a127 app logic to a route
    x- $ref: '#/parameters/sessionId'swagger-router-controller: comments
    put:
     - $refdescription: '#/parameters/markupId'
 Update a comment
    responses:  # used as the method name of #the controller
responses may fall through to errors operationId: markupcomment_put
      "200"tags:
        - Commenting
description: Success     parameters:
     schema:   - $ref: "#/parameters/fileId"
       type: object- $ref: "#/parameters/sessionId"
        -  properties:$ref: "#/parameters/markupId"
        - $ref: "#/parameters/commentId"
   status:     - name: body
          typein: stringbody
          required: true
    default: "ok"     schema:
         timestamp:   type: object
            typeproperties:
integer                 descriptiontext:
time of response       delete:       descriptiontype: deletestring
a markup     responses:
  # used as the method name of# theresponses controllermay fall through to errors
  operationId: markup_delete     "200":
 tags:         -description: CommentingSuccess
      parameters:    schema:
    - $ref: '#/parameters/fileId'      type: object
 - $ref: '#/parameters/sessionId'         - $refproperties:
'#/parameters/markupId'       responses:       status:
 # responses may fall through to errors         "200"type: string
         description:  Success     default: "ok"
    schema:          timestamp:
  type: object             propertiestype: integer
             status:   description: time of response
    get:
      typedescription: stringRetrieve a markup comment
      # used as the method name of default: "ok"the controller
      operationId: markupcomment_get
      timestamptags:
        - Commenting
      typeparameters:
integer        -   $ref: "#/parameters/fileId"
      description: time of response  - $ref: "#/parameters/sessionId"
        - $ref: "#/v1/files/{fileId}/markup/{markupId}/comment/{commentId}parameters/markupId"
        - $ref: "#/parameters/commentId"
      responses:
        # bindsresponses a127may appfall logic to a routethrough to errors
        "200":
          description: Success
          schema:
            type: object
            properties:
              status:
                type: string
                default: "ok"
              timestamp:
                type: integer
                description: time of response
    delete:
      description: Delete a markup comment
      # used as the method name of the controller
      operationId: markupcomment_delete
      tags:
        - Commenting
      parameters:
        - $ref: "#/parameters/fileId"
        - $ref: "#/parameters/sessionId"
        - $ref: "#/parameters/markupId"
        - $ref: "#/parameters/commentId"
      responses:
        # responses may fall through to errors
        "200":
          description: Success
          schema:
            type: object
            properties:
              status:
                type: string
                default: "ok"
              timestamp:
                type: integer
                description: time of response
  /v1/files/{fileId}/markup/{markupId}/comment:
    # binds a127 app logic to a route
    x-swagger-router-controller: comments
    post:
      description: Post a new markup comment
      # used as the method name of the controller
      operationId: markupcomment_post
      tags:
        - Commenting
      parameters:
        - $ref: "#/parameters/fileId"
        - $ref: "#/parameters/sessionId"
        - $ref: "#/parameters/markupId"
        - name: body
          in: body
          required: true
          schema:
            type: object
            properties:
              text:
                type: string
      responses:
        # responses may fall through to errors
        "200":
          description: Success
          schema:
            type: object
            properties:
              status:
                type: string
                default: "ok"
              timestamp:
                type: integer
                description: time of response
  /v1/files/{fileId}/attachment:
    x-swagger-router-controller: comments
    post:
      description: Create a markup attachment
      # used as the method name of the controller
      operationId: attachment_post
      tags:
        - Commenting
      consumes:
        - multipart/form-data
      parameters:
        - $ref: "#/parameters/fileId"
        - $ref: "#/parameters/sessionId"
        - in: formData
          name: attachment
          required: true
          type: file
      responses:
        "200":
          description: Success
          schema:
            required:
              - status
              - changeId
            properties:
              status:
                type: string
                default: "ok"
              changeId:
                type: string
        # responses may fall through to errors
        default:
          description: Error
          schema:
            $ref: "#/definitions/ErrorResponse"
  /v1/files/{fileId}/attachments:
    x-swagger-router-controller: comments
    putget:
      description: UpdateRetrieve aall commentattachments
       # used as the method name of the controller
      operationId: markupcommentattachments_putget
      tags:
        - Commenting
      parameters:
        - $ref: '"#/parameters/fileId'"
        - $ref: '"#/parameters/sessionId'"
      responses:
        # responses may fall through to errors
        "200":
          description: Success
          schema:
            type: object
           - $ref: '#/parameters/markupId'properties:
              status:
    - $ref: '#/parameters/commentId'         - nametype: bodystring
           in: body    default: "ok"
     required: true        timestamp:
  schema:              type: objectinteger
            properties:    description: time of response
  /v1/files/{fileId}/attachments/{attachmentId}:
    text:# binds a127 app logic to a route
    x-swagger-router-controller: comments
   type get: string
      responsesdescription: Retrieve attachment
      # responsesused mayas fallthe throughmethod toname errorsof the controller
      "200"operationId: attachment_get
      tags:
    description: Success   - Commenting
      schemaparameters:
        - $ref: "#/parameters/fileId"
       type: object- $ref: "#/parameters/sessionId"
        -  properties$ref: "#/parameters/attachmentId"
      responses:
      status:  # responses may fall through to errors
         type"200":
string          description: Success
     default: "ok"    schema:
          timestamp:  type: object
             typeproperties:
integer              status:
  description: time of response     get:       descriptiontype: Retrievestring
a markup comment        # used as the method name of the controller
default: "ok"
      operationId: markupcomment_get       tagstimestamp:
        - Commenting       parameterstype: integer
       - $ref: '#/parameters/fileId'       description: time -of $ref: '#/parameters/sessionId'response
  /swagger:
      - $ref: '#/parameters/markupId'
        - $ref: '#/parameters/commentId'
 x-swagger-pipe: swagger_raw
# complex objects have schema definitions
definitions:
  SessionsResponse:
    responsesrequired:
      - status
# responses may fall through to errors- results
    properties:
  "200":    status:
      description: Success type: string
        schemadefault: "ok"
      results:
    type: object   type: array
        propertiesitems:
          type: object
  status:        properties:
         type: string  mode:
              defaulttype: "ok"string
              timestampenum: [view, edit]
              typeusername:
integer              type:  string
description: time of response     delete:    sessionId:
  description: Delete a markup comment        #type: usedstring
as the method name of the controller       operationIduserId:
markupcomment_delete       tags:       type: string
-
Commenting  LibrariesResponse:
    parametersrequired:
      - status
- $ref: '#/parameters/fileId'    - results
   - $refproperties:
'#/parameters/sessionId'      status:
      -  $reftype: '#/parameters/markupId'string
        - $refdefault: '#/parameters/commentId'"ok"
      responsesresults:
        type: array
    # responses may fall throughitems:
to errors         "200"type: object
          descriptionproperties:
Success            schemaid:
              type: objectstring
            propertiesname:
              statustype: string
  BlocksResponse:
    required:
      - status
 type: string    - results
    properties:
      defaultstatus:
"ok"        type: string
        timestampdefault: "ok"
      results:
        type: integerarray
        items:
       description   type: timeobject
of response
  /v1/files/{fileId}/markup/{markupId}/comment:         properties:
# binds a127 app logic to a route     x-swagger-router-controller: commentsid:
       post:       descriptiontype: Poststring
 a new markup comment        #name:
used as the method name of the controller       operationIdtype: markupcomment_post string
          tags:  thumbnail:
      - Commenting       parameterstype: string

  ErrorResponse:
   - $refrequired:
'#/parameters/fileId'      - message
   - $refproperties: '#/parameters/sessionId'
      message:
    - $ref: '#/parameters/markupId'  type: string
     - nameerrrorId:
  body      type: string

  inGetUserResponse:
body    required:
      - status
required: true     - results
    schemaproperties:
      status:
      type: object  type: string
        default: "ok"
    properties:  results:
        type: array
  text:      items:
          type$ref: string'#/definitions/UserPreferencesObject'

  UserPreferencesObject:
  responses:  type: object
    properties:
# responses may fall through to errorspreferences:
        "200"type: object
         descriptionproperties: Success
          schemavariables:
            type: object
            properties:
              statuspolarang:
                 type: string
                default: "ok90"
              timestamposmode:
                type: integerstring
                descriptiondefault: time"663"
of response   /v1/files/{fileId}/attachments:     post:       descriptionzoomWheel:
Create a markup attachment       # used as the method name of the controller
      operationId type: post_markupstring
      tags:         - Commenting
      consumes default: "0"
        - multipart/form-data       parameterslwdefault:
        - $ref: '#/parameters/fileId'      type: string
 - $ref: '#/parameters/sessionId'         - in: formData  default: "25"
       name: file      dynasnap:
    required: true           type: filestring
        responses:        default: "20039":
          description: Success   graphicswinmodelbackgrndcolor:
       schema:         type: string
  required:              default: -"White"
status              cursorMode:
- changeId             properties:  type: string
           status:     default: "2"
          preferences_display:
type: string           type: object
    default: "ok"       properties:
       changeId:       graphicswinmodelbackgrndcolor:
         type: string      type: string
 # responses may fall through to errors         default:    "White"
      description: Error       propertieswindowdisplaymode:
   schema:             $ref: "#/definitions/ErrorResponse"
 type: string
  get:       description: Retrieve all attachments    default: "0"
  # used as the method name of the controllerwindow:
      operationId: attachments_get     type: object
tags:         - Commenting  properties:
    parameters:         - $ref: '#/parameters/fileId'edit: 
       - $ref: '#/parameters/sessionId'       responsestype: object
       # responses may fall through to errors   properties:
     "200":             descriptiondockwidgets:
 Success           schema:        type: object
   type: object             properties:   properties:
           status:           layerwindow:
      type: string                 defaulttype: "ok"object
              timestamp:          properties:
      type: integer                 description: time ofvisible:
response   /v1/files/{fileId}/attachments/{attachmentId}:     # binds a127 app logic to a route     x-swagger-router-controller: comments     get:  type: string
   description: Retrieve attachment        # used as the method name of the controller       operationIddefault: attachment_get"1"
      tags:         - Commenting       parameters:   iscollapsed:
     - $ref: '#/parameters/fileId'         - $ref: '#/parameters/sessionId'         - $reftype: '#/parameters/attachmentId'string
      responses:         # responses may fall through to errors        default: "200":false"
                description: Success           schema:
    description: true/false if the layer panel is collapsed or not
        type: object             properties:    h:
          status:                  type: string
                  default: "ok"         description: height of the layerwindow
 timestamp:                 type: integer   propertywindow:
             description: time of response   /swagger:     x-swagger-pipetype: swagger_rawobject
 # complex objects have schema definitions definitions:   SessionsResponse:     required:       - status properties:
     - results     properties:       status:        visible:
 type: string         default: "ok"       results:         type: string
array         items:              type: object    default: "1"
       properties:               mode:    iscollapsed:
            type: string               type: string
enum: [view, edit]               username:           default: "false"
    type: string               sessionId:        description: true/false if the properties panel is collapsed or type:not
string               userId:           h:
     type: string    ErrorResponse:     required:       - message     propertiestype: string
     message:         type: string       errrorId:      description: height of type:property stringpanel