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"
              timestampresults:
                type: integerobject
                descriptionproperties:
time  of response               commmentThreadstimestamp:
                    type: arrayinteger
                description: ""   description: time of response
        markups:          commmentThreads:
      type: array             type: array
  description: ""   /v1/files/{fileId}/markups:     # binds a127 app logic to a route     x-swagger-router-controllerdescription: comments""
    get:       description: Returns markups for a file    items:
  # used as the method name of the controller       operationId: markups_get    type: object
 tags:         - Commenting       parametersstatus:
        - $ref: '#/parameters/fileId'         - $reftype: '#/parameters/sessionId'string
        - name: timestamp           typedefault: integer"ok"
  /v1/files/{fileId}/commentThread:
    # binds a127 in:app querylogic to a route
       required: falsex-swagger-router-controller: comments
    post:
       description: timestamp of last request to only send new items
      responses:
  Add a new commentThread for a file
      # used as the method name of the controller
     # responses may fall through to errorsoperationId: commentThread_post
      tags:
     "200":   - Commenting
      descriptionparameters:
Success        - $ref:  schema:"#/parameters/fileId"
        - $ref: "#/parameters/sessionId"
       type: object- name: body
          propertiesin: body
          required: true
 status:         schema:
        type: string   type: object
            defaultproperties:
"ok"               resultstitle:
                type: objectstring
              text:
 properties:               type: string
  timestamp:            state:
        type: integer       type: string
            description: time of response enum: [ACTIVE, RESOLVED]
               markupsids:
                    type: array
                items:
   description: ""              type: string
      itemsresponses:
        # responses may fall through to errors
        type"200":
object          description:  Success
      status:    schema:
            type:   object
type: string           properties:
         default: "ok"    /v1/files/{fileId}/commentThreadstatus:
    # binds a127 app logic to a route     x-swagger-router-controllertype: commentsstring
     post:       description: Add a new commentThread for a filedefault: "ok"
        # used as the method name oftimestamp:
the controller       operationId: commentThread_post       tagstype: integer
       -  Commenting       parametersdescription: time of response
     - $ref: '#/parameters/fileId'/v1/files/{fileId}/commentThread/{threadId}:
    # binds a127 app logic to -a $ref: '#/parameters/sessionId'route
    x-swagger-router-controller: comments
   - nameput:
body      description: Update a commentThread
 in: body    # used as the method name of required:the truecontroller
      operationId: commentThread_put
  schema:    tags:
        - type:Commenting
object      parameters:
      properties:  - $ref: "#/parameters/fileId"
        -  title:$ref: "#/parameters/sessionId"
        - $ref: "#/parameters/threadId"
     type: string  - name: body
          textin: body
          required: true
   type: string      schema:
        state:    type: object
            properties:
              title:
                type: string
                enum: [ACTIVE, RESOLVED]
text:
                type: string
              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}/commentThread/{threadId}:
    # binds a127 app logic to a route
    x-swagger-router-controller: comments
    put  get:
      description: Updateget a commentThread
       # used as the method name of the controller
      operationId: commentThread_putget
      tags:
        - Commenting
      parameters:
        - $ref: '"#/parameters/fileId'"
        - $ref: '"#/parameters/sessionId'"
        - $ref: '"#/parameters/threadId'"
      responses:
 - name: body     # responses may fall through to errors
  in      "200":
body           requireddescription: trueSuccess
          schema:
             type: object
            properties:
              titlestatus:
                type: string
                textdefault: "ok"
              timestamp:
type: string               idstype: integer
               type description: arraytime of response
    delete:
         itemsdescription: Delete a comment Thread
      # used as the method name of the type:controller
string       responses:operationId: commentThread_delete
      tags:
 # responses may fall through to errors - Commenting
      "200"parameters:
        -  description$ref: Success"#/parameters/fileId"
        -  schema:$ref: "#/parameters/sessionId"
        - $ref: "#/parameters/threadId"
 type: object    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 commentThread        # used as the method name oftimestamp:
the controller       operationId: commentThread_get       tagstype: integer
        - Commenting       parametersdescription: time of response
  /v1/files/{fileId}/commentThread/{threadId}/comment/{commentId}:
  - $ref: '#/parameters/fileId' binds a127 app logic to a   -route
$ref: '#/parameters/sessionId'   x-swagger-router-controller: comments
    - $ref: '#/parameters/threadId'put:
      responsesdescription: Update 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"
        - $ref: "#/parameters/sessionId"
 properties:       - $ref: "#/parameters/threadId"
     status:   - $ref: "#/parameters/commentId"
        - name: body
 type: string        in:  body
      default: "ok"   required: true
          timestampschema:
            type: object
  type: integer          properties:
      description: time of response     /v1/files/{fileId}/commentThread/{threadId}/comment/{commentId}text:
    # binds a127 app logic to a route     x-swagger-router-controller: commentstype: string
      putresponses:
      description: Update a comment 
   # responses may fall through to errors
    # used as the method"200":
name of the controller       operationIddescription: comment_putSuccess
      tags:    schema:
    - Commenting       parameterstype: object
       - $ref: '#/parameters/fileId'   properties:
     - $ref: '#/parameters/sessionId'         - $ref: '#/parameters/threadId'status:
          - $ref: '#/parameters/commentId'    type: string
   - name: body           indefault: body"ok"
          required: true   timestamp:
       schema:         type:  integer
  type: object             propertiesdescription: time of response
    get:
      textdescription: Retrieve a comment
      # used as the method   type: stringname of the controller
      operationId: comment_get
      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
    getdelete:
      description: RetrieveDelete a comment
       # used as the method name of the controller
      operationId: comment_getdelete
      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
    delete/v1/files/{fileId}/commentThread/{threadId}/comment:
    # binds a127 app logic to a route
    x-swagger-router-controller: comments
    post:
      description: DeletePost a new comment
       # used as the method name of the controller
      operationId: comment_deletepost
      tags:
        - Commenting
      parameters:
        - $ref: '"#/parameters/fileId'"
        - $ref: '"#/parameters/sessionId'"
        - $ref: '"#/parameters/threadId'"
        - $refname: '#/parameters/commentId'
 body
    responses:         # responses may fall through to errorsin: body
             "200":
          description: Successrequired: true
          schema:
            type: object
            properties:
              statustext:
                 type: string
      responses:
        # default: "ok"
   responses may fall through to errors
          timestamp"200":
          description: Success
    type: integer     schema:
           description: time of response
  /v1/files/{fileId}/commentThread/{threadId}/comment:
 type: object
   # binds a127 app logic to a route  properties:
  x-swagger-router-controller: comments     post:       descriptionstatus:
Post a new comment        # used as the method nametype: ofstring
the controller       operationId: comment_post       tagsdefault: "ok"
       - Commenting       parameterstimestamp:
        - $ref: '#/parameters/fileId'      type: integer
 - $ref: '#/parameters/sessionId'         - $ref: '#/parameters/threadId'  description: time of response
   - name: body
          in: body
 /v1/files/{fileId}/markup:
    # binds a127 app logic to a route
    x-swagger-router-controller: comments
    post:
   required: true  description: Add a new markup for a file
 schema:     # used as the method name of the controller
type: object     operationId: markup_post
      propertiestags:
        - Commenting
    text:  parameters:
        - $ref: "#/parameters/fileId"
   type: string    -   responses$ref: "#/parameters/sessionId"
       # responses- mayname: fallbody
through to errors         "200":in: body
          descriptionrequired: Successtrue
          schema:
            type: object
            properties:
              statustitle: 
                type: string
              text:
 default: "ok"               timestamptype: string
               typestate:
integer                 descriptiontype: timestring
of response   /v1/files/{fileId}/markup:     # binds a127 app logic to a routeenum: [ACTIVE, RESOLVED]
  x-swagger-router-controller: comments     post:       descriptionids:
Add a new markup for a file       # used as thetype: methodarray
name of the controller       operationId: markup_post     items:
 tags:         - Commenting       parameterstype: string
       - $ref: '#/parameters/fileId'
 responses:
      - $ref: '#/parameters/sessionId' responses may fall through to    - name: bodyerrors
            in"200":
body           requireddescription: trueSuccess
          schema: 
            type: object
            properties:
              titlestatus:
                type: string
              text  default: "ok"
              timestamp:
type: string               statetype: integer
               type description: stringtime of response
  /v1/files/{fileId}/markup/{markupId}:
    # binds a127 app logic to a route
enum: [ACTIVE, RESOLVED]  x-swagger-router-controller: comments
    put:
      idsdescription: Update a markup
      # used as the method name of type:the arraycontroller
      operationId: markup_put
        itemstags:
        - Commenting
      parameters:
 type: string      - responses$ref: "#/parameters/fileId"
       # responses- may fall through to errors$ref: "#/parameters/sessionId"
        - $ref: "200#/parameters/markupId":
        -  descriptionname: Successbody
          schemain: body
           typerequired: objecttrue
          schema:
 properties:           type: object
  status:          properties:
       type       title:
string                 defaulttype: "ok"string
              timestamptext:
                type: integerstring
                descriptionids:
time of response   /v1/files/{fileId}/markup/{markupId}:
    # binds a127 app logic to a routetype: array
   x-swagger-router-controller: comments     put:       descriptionitems:
Update  a markup        # used as the method name of thetype: controllerstring
      operationIdresponses:
markup_put
      tags:  # responses may fall through to errors
- Commenting       parameters"200":
        -  $refdescription: '#/parameters/fileId' Success
         - $refschema:
'#/parameters/sessionId'         - $ref: '#/parameters/markupId'
  type: object
      - name: body    properties:
      in:  body      status:
    required: true           schematype: string
            type: object   default: "ok"
        properties:      timestamp:
        title:        type: integer
       type: string        description: time of response
   text get:
      description: get a markup
      type:# stringused as the method name of the controller
       idsoperationId: markup_get
      tags:
        type:- arrayCommenting
      parameters:
        - items:$ref: "#/parameters/fileId"
        - $ref: "#/parameters/sessionId"
        - type$ref: string"#/parameters/markupId"
      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
    getdelete:
      description: getdelete a markup
       # used as the method name of the controller
      operationId: markup_getdelete
      tags:
        - Commenting
      parameters:
        - $ref: '"#/parameters/fileId'"
        - $ref: '"#/parameters/sessionId'"
        - $ref: '"#/parameters/markupId'"
      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
      delete:
 /v1/files/{fileId}/markup/{markupId}/comment/{commentId}:
    # binds a127 app logic to a route
    x-swagger-router-controller: comments
    put:
      description: deleteUpdate a markup comment
      # used as the method name of the controller
      operationId: markupmarkupcomment_deleteput
      tags:
        - Commenting
      parameters:
        - $ref: '"#/parameters/fileId'"
        - $ref: '"#/parameters/sessionId'"
        - $ref: '"#/parameters/markupId'"
        - responses$ref: "#/parameters/commentId"
       # responses- may fall through to errorsname: body
          "200"in: body
          descriptionrequired: Successtrue
          schema:
            type: object
            properties:
              statustext: 
                type: string
      responses:
        # default: "ok"
   responses may fall through to errors
          timestamp:"200":
          description: Success
     type: integer    schema:
            description: time of response  
  /v1/files/{fileId}/markup/{markupId}/comment/{commentId}:
    # binds a127 app logic to a routetype: object
            properties:
              status:
                type: string
                default: "ok"
              timestamp:
                type: integer
                description: time of response
    get:
      description: Retrieve a markup comment
      # used as the method name of the controller
      operationId: markupcomment_get
      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
    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