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
  - name: Commenting
    description: API support for commenting panel
  - name: User Sessions
    description: Optional User Session Handling
  - name: Block Library
    description: API 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 comment threadblock
    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 commentuser sessionId
    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     required: falsetrue
    type: string
paths  commentId:
   /files/{fileId}/diffs name: commentId
   parameters in: path
    description: -the comment
$ref: '#/parameters/fileId'   required: true
  - $ref: '#/parameters/optionalSessionId' type: string
  attachmentId:
    #name: bindsattachmentId
a127 app logic to ain: routepath
    x-swagger-router-controller: files
description: the attachment
    required: true
    gettype: string
  optionalSessionId:
   description name: Returnssessionid
file content   in: header
  # used asdescription: the method name of the controller
 user sessionId
    required: false
    type: string
paths:
  /library/blocks:
    operationIdparameters:
diffs_get      - tags:$ref: "#/parameters/optionalSessionId"
      - $ref: "#/parameters/ownerType"

    x- ARES Kudo Required
      responses:swagger-router-controller: blocks

    get:
      description: Returns block libraries

      operationId: libraries_get
      tags:
        - Block Library
      responses:
        "200":
          description: Success
          schema:
            $ref: "#/definitions/LibrariesResponse"
        default:
          description: Error
          schema:
            $ref: "#/definitions/ErrorResponse"

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

    x-swagger-router-controller: blocks

    get:
      description: Returns blocks of a library

      operationId: blocks_get
      tags:
        - Block Library
      responses:
        "200":
          description: Success
          schema:
            $ref: "#/definitions/BlocksResponse"
        default:
          description: Error
          schema:
            $ref: "#/definitions/ErrorResponse"

  /library/blocks/{libId}/items/{itemId}/content:
    parameters:
      - $ref: "#/parameters/libId"
      - $ref: "#/parameters/itemId"
      - $ref: "#/parameters/optionalSessionId"
      - in: query
        name: fileType
        required: false
        default: "dwg"
        type: string

    x-swagger-router-controller: blocks

    get:
      description: Returns block file

      operationId: block_getfile
      tags:
        - Block Library
      produces:
        - application/octet-stream
      responses:
        "200":
          description: Success
        default:
          description: Error
          schema:
            $ref: "#/definitions/ErrorResponse"

  /library/blocks/{libId}/items/{itemId}/thumbnail:
    parameters:
      - $ref: "#/parameters/libId"
      - $ref: "#/parameters/itemId"
      - $ref: "#/parameters/optionalSessionId"
      - in: query
        name: fileType
        required: false
        default: "png"
        type: string

    x-swagger-router-controller: blocks

    get:
      description: Returns block thumbnail

      operationId: block_getthumbnail
      tags:
        - Block Library
      produces:
        - application/octet-stream
      responses:
        "200":
          description: Success
        default:
          description: Error
          schema:
            $ref: "#/definitions/ErrorResponse"

  /files/{fileId}/diffs:
    parameters:
      - $ref: "#/parameters/fileId"
      - $ref: "#/parameters/optionalSessionId"
    # binds a127 app logic to a route
    x-swagger-router-controller: files

    get:
      description: Returns file content
      # used as the method name of the controller
      operationId: diffs_get
      deprecated: true
      tags:
        - ARES Kudo Optional
      responses:
        "200":
          description: Success
          schema:
            required:
              - status
              - baseContent
            properties:
              status:
                type: string
                default: "ok"
              baseContent:
                type: string
                description: Base64 encoded content of file
                # responses may fall through to errors
        "200404":
          description: SuccessError
          schema:
            required$ref: "#/definitions/ErrorResponse"
    put:
      description: Update -file statuscontent
      # used as the method name of the -controller
baseContent      operationId: diffs_put
     properties deprecated: true
      tags:
      status:  - ARES Kudo Optional
      parameters:
     type: string  - name: body
            defaultin: "ok"body
              baseContentrequired: true
          schema:
    type: string       required:
         description: Base64 encoded content of file- baseContent
            properties:
  # responses may fall through to errors         "404":
baseContent:
         description: Error      type: string
   schema:             $refdescription: "#/definitions/ErrorResponse"
    put:Base64 encoded content of file

      descriptionresponses:
Update file content      "200":
# used as the method name of the controller   description: Success
  operationId: diffs_put       tagsschema:
        - ARES Kudo Required required:
     parameters:         - status
name: body           in: body - changeId
        required: true   properties:
       schema:       status:
     required:           type: string
  - baseContent             propertiesdefault: "ok"
             baseContent changeId:
                type: string
        # responses may fall through to errors
 description: Base64 encoded content of file  default:
          description: Error
     responses:     schema:
   "200":         $ref:  description"#/definitions/ErrorResponse"
  /files:
Success    parameters:
      - schema$ref: "#/parameters/optionalSessionId"
    x-swagger-router-controller: files
     requiredpost:
      description: Create/Update a file
    - status # used as the method name of the controller
     - changeId
 operationId: post_file
      tags:
   properties:     - ARES Kudo Required
      statusconsumes:
        - multipart/form-data
       typeparameters:
string        - in: header
      default: "ok"   name: fileId
          changeIddescription: ID of the file (New file will be created if this value is not specified)
 type: string        required: #false
responses may fall through to errors         defaulttype: string
        - descriptionin: ErrorformData
          schemaname: file
           $refrequired: "#/definitions/ErrorResponse"true
  /files:     parameters:   type: file
  - $ref: '#/parameters/optionalSessionId'  responses:
  x-swagger-router-controller: files     post"200":
      description: Create/Update a file description: Success
    # used as the method name ofschema:
the controller       operationId: post_file       tagsrequired:
        -  ARES Kudo Required  - id
   consumes:          - multipart/form-data filename
     parameters:         - in:isNewFile
header           name: fileId  - changeId
       description: ID of the file (Newproperties:
file will be created if this value is not specified)     id:
     required: false           type: string
        -   in: formData  filename:
        name: file       type: string
  required: true           typeisNewFile:
file       responses:         "200"type: boolean
         description: Success    changeId:
      schema:          type: string
 required:       # responses may fall through to errors
 - id      default:
        - filename description: Error
          schema:
 - isNewFile          $ref: "#/definitions/ErrorResponse"
   - changeId/files/{fileId}/data:
    parameters:
      -   properties:$ref: "#/parameters/fileId"
      - $ref: "#/parameters/optionalSessionId"
    # id:binds a127 app logic to a route
    x-swagger-router-controller: files

    typeget:
string      description: Returns file content
     filename: # used as the method name of the controller
       typeoperationId: stringdata_get
      tags:
       isNewFile: - ARES Kudo Required
      produces:
     type: boolean  - application/octet-stream
      responses:
    changeId:    "200":
            typedescription: stringSuccess
        # responses may fall through to errors
        default"404":
          description: Error
          schema:
            $ref: "#/definitions/ErrorResponse"

  /files/{fileId}/data:
    parameters:
      - $ref: '#/parameters/fileId'
      - $ref: '#/parameters/optionalSessionId'xref/search:
    # binds a127 app logic to a route
    x-swagger-router-controller: files
     getpost:
      description: Returns fileXRef contentsearch
      # used as the method name of the controller
      operationId: dataxref_getsearch
      tags:
        - ARES Kudo RequiredOptional
      producesparameters:
        - application/octet-stream$ref: "#/parameters/fileId"
      responses:  - $ref:      "200":"#/parameters/optionalSessionId"
        -  descriptionname: Successbody
        # responses mayin: fallbody
through to errors         "404":required: true
          descriptionschema:
Error            schemarequired:
            $ref: "#/definitions/ErrorResponse"
  - path
    /files/{fileId}/xref/search:     # binds a127 appproperties:
logic to a route     x-swagger-router-controller: files     postpath:
      description:  XRef search       #type: array
used as the method name of the controller       operationId: xref_search description: xrefs paths to search
 tags:         - ARES Kudo Optional   items:
   parameters:         - $ref: '#/parameters/fileId'    type: string
   - $ref: '#/parameters/optionalSessionId'
 responses:
       - name"200": body
          indescription: bodySuccess
          requiredschema:
 true           schematype: array
           required items:
              -type: object
 path             properties:
                path:
                  type: arraystring
                descriptionfiles:
 xrefs      paths to search         type: array
                  items:
                    type: string object
           responses:         "200"properties:
          description: Success           schema"_id":
            type: array           type: string
items:        # responses may fall through to errors
type: object       default:
       properties:   description: Error
          schema:
 path:           $ref: "#/definitions/ErrorResponse"
  /files/{fileId}/preview:
    type:# stringbinds a127 app logic to a route
    x-swagger-router-controller: files
    filespost:
      description: Optionally handle receiving updates previews
      type:# arrayused as the method name of the controller
      operationId: preview_post
   items:   tags:
        - ARES Kudo Optional
     type parameters:
object        - $ref: "#/parameters/fileId"
        -  properties$ref: "#/parameters/optionalSessionId"
        - in: formData
          "_id"name: file
          required:  true
          type: stringfile
        # responses may fall through to errorsresponses:
           default"200":
          description: ErrorSuccess
          schema:
            $reftype: "#/definitions/ErrorResponse"object
  /files/{fileId}/preview:
    # binds a127 app logic to a route     x-swagger-router-controller: files properties:
   post:       description: Optionally handle receiving updatesstatus:
previews       # used as the method name of the controller type: string
    operationId: preview_post       tags:    default: "ok"
   - ARES Kudo Optional  # responses may fall through parameters:to errors
       - $refdefault:
'#/parameters/fileId'         - $refdescription: '#/parameters/optionalSessionId'Error
         - inschema:
formData            name$ref: file"#/definitions/ErrorResponse"

  /files/{fileId}/info:
    # binds required:a127 trueapp logic to a route
      typex-swagger-router-controller: filefiles
      responsesget:
      description: Returns "200":file information
      # used as description:the Successmethod name of the controller
      schemaoperationId: info_get
      tags:
    type: object   - ARES Kudo Required
      propertiesparameters:
        - $ref: "#/parameters/fileId"
   status:     - $ref: "#/parameters/optionalSessionId"
      responses:
   type: string    "200":
            defaultdescription: "ok"Success
        # responses mayschema:
fall through to errors         defaultrequired:
          description: Error   - status
      schema:      type: object
     $ref: "#/definitions/ErrorResponse"      properties:
              status:
      /files/{fileId}/info:     # binds a127 app logic totype: astring
route     x-swagger-router-controller: files     get:       descriptiondefault: Returns"ok"
file information       # used as the method name of the controllerfilename:
      operationId: info_get       tags:  type: string
     - ARES Kudo Required      folderId:
parameters:         - $ref: '#/parameters/fileId'     type: string
  - $ref: '#/parameters/optionalSessionId'       responses:   owner:
     "200":           descriptiontype: Successstring
        # responses schema:may fall through to errors
        required"401":
          description: User is not -autenticated
status             type: objectschema:
            properties$ref: "#/definitions/ErrorResponse"
        "404":
    status:      description: File is not  found
      type: string   schema:
             default$ref: "ok#/definitions/ErrorResponse"
  /files/{fileId}/session:
    # binds a127 app logic to a filename:route
    parameters:
      - $ref: "#/parameters/fileId"
    type: string - $ref: "#/parameters/sessionId"

    x-swagger-router-controller: files_sessions
    folderIdget:
      description: get file sessions
      # type:used stringas the method name of the controller
        owneroperationId: session_get
      tags:
        - type:File stringSessions
        # responses may fall through to errorsresponses:
           "401200":
          description: User is notSuccess
autenticated           schema:
            $ref: "#/definitions/ErrorResponse" a pointer to a definition
   "404":           description$ref: File is not found"#/definitions/SessionsResponse"
        # responses may fall through schema:to errors
           $ref: "#/definitions/ErrorResponse"
  /files/{fileId}/sessiondefault:
    #   binds a127 app logicdescription: toError
a route     parameters:    schema:
  - $ref: '#/parameters/fileId'       - $ref: '"#/parametersdefinitions/sessionId'ErrorResponse"
     x-swagger-router-controller: files_sessionspost:
      getdescription: Create file session. Sessions need  description: get file sessionsto be either of type "view" or "edit"
      # used as the method name of the controller
      operationId: session_getpost
      tags:
        - File Sessions
      responsesparameters:
        - name: body
       "200":   in: body
          descriptionrequired: Successtrue
          schema:
            required:
       #    a pointer to a- definitionmode
            $refproperties:
"#/definitions/SessionsResponse"           # responses may fallmode:
through to errors         default:     type: string
    description: Error           schemadescription: Type of session requested
        $ref: "#/definitions/ErrorResponse"        postenum: [view, edit]
    description:   Create file session. Sessions need to be eitherfileId:
of type "view" or "edit"       # used as the method nametype: ofstring
the controller       operationId: session_post       tagsdescription: fileId for the file for which the session -is Filebeing Sessionsrequested
      parametersresponses:
        - name"200":
body           indescription: bodySuccess
          requiredschema:
true            schemarequired:
              - required:status
              - mode"_id"
            properties:
              modestatus:
                type: string
                descriptiondefault: Type"ok"
of session requested                    enum: [view, edit]"_id":
                fileIdtype: string
        # responses may fall through to errors
type:  string      default:
          description: fileIdError
for the file for which the session is being requested schema:
         responses:   $ref: "#/definitions/ErrorResponse"
    "200"delete:
          description: Successdelete file session
      # used schema:as the method name of the controller
      requiredoperationId: session_delete
      parameters:
      - status - name: 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
                defaultenum:  [view, edit]
      tags:
description: Error       - File Sessions
 schema:     responses:
       $ref: "#/definitions/ErrorResponse"
200":
   delete:       description: deleteSuccess
file session       # used asschema:
the method name of the controller       operationId: session_delete
   # a pointer to a definition
  parameters:         - name$ref: body"#/definitions/SessionsResponse"
        # responses in:may bodyfall through to errors
       required default:
true           schemadescription: Error
           requiredschema:
            $ref: "#/definitions/ErrorResponse"
- mode /auth:
    # binds a127 app logic to a properties:route
    x-swagger-router-controller: auth
        modeget:
      description: validate user session
      type:# stringused as the method name of the controller
      tags:
  description: Type of session requested   - User Sessions
      operationId: auth_get
      enumparameters:
[view,  edit]      - tags$ref: "#/parameters/optionalSessionId"
      responses:
- File Sessions      # responses: may fall through to errors
        "200":
          description: Success
          schema:
            #type: object
a pointer to a definition        properties:
    $ref: "#/definitions/SessionsResponse"          status:
 # responses may fall through to errors         defaulttype: string
          description      default: Error"ok"
        401:
 schema:         description: Authorization information is missing $ref: "#/definitions/ErrorResponse"or invalid.
  /authusers:
    # binds a127 app logic to a route
    x-swagger-router-controller: authusers
    get:
      description: validateReturns user sessionobject
      # used as the method name of the controller
      tagsoperationId: users_get
      tags:
- User Sessions      - operationId: auth_getUser Sessions
      parameters:
        - $ref: '"#/parameters/optionalSessionId'sessionId"
      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.   /users:   type: array
# binds a127 app logic to a route     x-swagger-router-controller: users     getitems:
      description: Returns user object       # used astype: theobject
method name of the controller       operationId: users_get       tagsproperties:
        - User Sessions       parameters:   fname:
     - $ref: '#/parameters/sessionId'       responses:        type: #string
responses may fall through to errors         "200":           description: Successfirst name
         schema:             typesurname:
object             properties:         type: string
    status:                  typedescription: stringlast name of user
             default: "ok"      "_id":
        results:              type: string
  type: array                 itemsemail:
                      type: objectstring
                    propertieslicenseExpirationDate:
                      fnametype: integer
                       typepreferences:
string                         descriptiontype: first nameobject
                      surnameproperties:
                        typepreferences_display:
string                          descriptiontype: lastobject
 name of user                       "_id"properties:
                        type: string   graphicswinmodelbackgrndcolor:
                   email:           type: string
            type: string                 default: White
    licenseExpirationDate:                    view:
    type: integer                     type: object
preferences:                        window:
type: object                         propertiestype: object
                         preferences_displayvariables:
                            type: object
                            properties:
                            dynasnap:
  graphicswinmodelbackgrndcolor:                            type: string
   type: string                          default: "63"
    put:
default: White     description: Returns user object
      # used as the method name of the controller
   view:   operationId: users_put
      tags:
        - User Sessions
      typeparameters:
object        - $ref: "#/parameters/sessionId"
        - name: body
      window:    in: body
          required: true
           typeschema:
object            properties:
              variablespreferences:
                type: object
          type: object     description: user preferences
                properties:
    properties:              window:
                 dynasnap:   type: object
                    properties:
       type: string              edit:
                  default: "63"     puttype: object
     description: Returns user object       # used as the method name of the controller properties:
     operationId: users_put       tags:         - User Sessions  dockwidgets:
    parameters:         - $ref: '#/parameters/sessionId'         - name: body  type: object
       in: body           required: true        properties:
  schema:             properties:               preferenceslayerwindow:
                type: object               type: object
description: user preferences                 properties:             properties:
     window:                     type: object       h:
             properties:                       edittype: string
                        type:   object         description: height o the layerwindow

      responses:
   properties:     # responses may fall through to errors
        "200":
      dockwidgets:    description: Success
          schema:
            type: object
            properties:
               propertiesstatus:
                type: string
            layerwindow:    default: "ok"
  /v1/files/{fileId}/annotations:
    # binds a127 app logic to a route
    x-swagger-router-controller: comments
      typeget:
object      description: Returns annotations for a file
      # used as the method name of the controller
      propertiesoperationId: annotations_get
      tags:
        - Commenting
      parameters:
        - h$ref: "#/parameters/fileId"
        - $ref: "#/parameters/sessionId"
        - name: timestamp
          type: integer
 type: string        in: query
          required: false
          description: timestamp of last request description: height o the layerwindow
to only send new items
      responses:
        # responses may fall through to errors
        "200":
          description: Success
          schema:
            type: object
            properties:
              status: 
                type: string
                default: "ok"
  /v1/files/{fileId}/annotations:     # binds a127 app logic to a routeresults:
    x-swagger-router-controller: comments     get:       descriptiontype: Returnsobject
annotations for a file       # used as the method name ofproperties:
the controller       operationId: annotations_get       tags:  timestamp:
      - Commenting       parameters:         - $reftype: '#/parameters/fileId'integer
        - $ref: '#/parameters/sessionId'         - namedescription: timestamptime of response
        type: integer           incommmentThreads: query
          required: false           descriptiontype: timestamparray
of last request to only send new items       responses:         # responses may fall through to errorsdescription: ""
         "200":           descriptionitems:
Success           schema:             type: object
            properties:      markups:
        status:            type: array
    type: string                 defaultdescription: "ok"
              results:      items:
          type: object           type: object
    properties:                   timestampstatus:
                    type: integerstring
                    descriptiondefault: time"ok"
of response
 /v1/files/{fileId}/markups:
    # binds a127 app logic to a route
     commmentThreadsx-swagger-router-controller: comments
    get:
      description: Returns markups for a file
  type: array   # used as the method name of the controller
      operationId: markups_get
 description: ""    tags:
        - Commenting
      itemsparameters:
        - $ref: "#/parameters/fileId"
        - $ref: "#/parameters/sessionId"
 type: object      - name: timestamp
          markupstype: integer
          in: query
       type: array  required: false
          description: timestamp of last request to only description:send ""new items
      responses:
        # responses may fall items:through to errors
        "200":
           typedescription: objectSuccess
          schema:
       status:     type: object
            properties:
 type: string            status:
        default: "ok"   /v1/files/{fileId}/markups:    type: #string
binds a127 app logic to a route     x-swagger-router-controller: comments     get:default: "ok"
      description: Returns markups for a file   results:
   # used as the method name of the controller     type: object
operationId: markups_get       tags:        properties:
- Commenting       parameters:         - $ref: '#/parameters/fileId'timestamp:
        - $ref: '#/parameters/sessionId'         - nametype: timestampinteger
           type: integer        description: time of in:response
query           required: false      markups:
    description: timestamp of last request to only send new items       responsestype: array
       # responses may fall through to errors       description:  "200":
          description: Success          items:
schema:             type: object        type: object
   properties:               status:
                    type: string
                    default: "ok"
  /v1/files/{fileId}/commentThreads:
    # binds a127 app logic to a route
results:    x-swagger-router-controller: comments
    get:
      typedescription: objectReturns comments for a file
      # used as the method name properties:of the controller
      operationId: commentThreads_get
        timestamptags:
        -     Commenting
      typeparameters:
integer        - $ref: "#/parameters/fileId"
        -  description: time of response$ref: "#/parameters/sessionId"
        - name: timestamp
          markupstype: integer
          in: query
       type: array  required: false
          description: timestamp of last request to only description:send ""new items
      responses:
        # responses may fall items:through to errors
        "200":
           typedescription: objectSuccess
          schema:
       status:     type: object
            properties:
 type: string            status:
        default: "ok"   /v1/files/{fileId}/commentThreads:    type: #string
binds a127 app logic to a route     x-swagger-router-controller: comments     getdefault: "ok"
     description: Returns comments for a file     results:
 # used as the method name of the controller       operationIdtype: commentThreads_getobject
        tags:        properties:
- Commenting       parameters:         - $reftimestamp:
'#/parameters/fileId'         - $ref: '#/parameters/sessionId'         -type: name:integer
timestamp           type: integer        description: time of in:response
query           required: false      commmentThreads:
    description: timestamp of last request to only send new items       responsestype: array
       # responses may fall through to errors       description:  "200":
          description: Success         items:
 schema:             type: object       type: object
    properties:               status:
                    type: string
                    default: "ok"
  /v1/files/{fileId}/commentThread:
    # binds a127 app logic to a results:route
           x-swagger-router-controller: comments
    typepost:
object      description: Add a new commentThread for a file
   properties:   # used as the method name of the controller
       timestampoperationId: commentThread_post
      tags:
        - Commenting
  type: integer   parameters:
        - $ref: "#/parameters/fileId"
      description: time of- response
$ref: "#/parameters/sessionId"
        - name: body
      commmentThreads:    in: body
          required: true
   type: array      schema:
            type: object
description: ""           properties:
         items:     title:
                 type: objectstring
                  status:
 text:
                  type: string
                    defaultstate:
"ok"   /v1/files/{fileId}/commentThread:     # binds a127 app logic to a route     x-swagger-router-controller: commentstype: string
      post:       description: Add a new commentThread for a fileenum: [ACTIVE, RESOLVED]
        # used as the method name ofids:
the controller       operationId: commentThread_post       tagstype: array
       -  Commenting       parametersitems:
        - $ref: '#/parameters/fileId'
            type: string
     - $refresponses:
'#/parameters/sessionId'        # -responses name:may bodyfall through to errors
       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}/commentThread/{threadId}:
    # binds a127 app logic to  enum: [ACTIVE, RESOLVED]a route
    x-swagger-router-controller: comments
    put:
    ids:  description: Update a commentThread
      # used as the method type:name arrayof the controller
      operationId: commentThread_put
      itemstags:
        - Commenting
      parameters:
 type: string      - responses$ref: "#/parameters/fileId"
       # responses- may fall through to errors$ref: "#/parameters/sessionId"
        - $ref:  "200#/parameters/threadId":
        -  descriptionname: Successbody
          schemain: body
           typerequired: objecttrue
            propertiesschema:
              statustype: object
            properties:
   type: string          title:
      default: "ok"         type: string
    timestamp:          text:
      type: integer         type: string
      description: time of response   /v1/files/{fileId}/commentThread/{threadId}  ids:
    # binds a127 app logic to a route     x-swagger-router-controller: commentstype: array
         put:       descriptionitems:
Update  a commentThread        # used as the method name of thetype: controllerstring
      operationIdresponses:
commentThread_put       tags: # responses may fall through to errors
 - Commenting      "200":
parameters:         - $refdescription: '#/parameters/fileId'Success
         - $refschema:
'#/parameters/sessionId'           - $reftype: '#/parameters/threadId'object
           - nameproperties:
body           in: body  status:
        required: true       type: string
  schema:              typedefault: object"ok"
              propertiestimestamp:
              title  type: integer
                typedescription: stringtime of  response
    get:
      textdescription: get a commentThread
      # used as the method name of type:the stringcontroller
      operationId: commentThread_get
      idstags:
        - Commenting
      typeparameters:
array        - $ref: "#/parameters/fileId"
      items:  - $ref: "#/parameters/sessionId"
              type: string- $ref: "#/parameters/threadId"
      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 commentThreadcomment Thread
      # used as the method name of the controller
      operationId: commentThread_getdelete
      tags:
        - Commenting
      parameters:
        - $ref: '"#/parameters/fileId'"
        - $ref: '"#/parameters/sessionId'"
        - $ref: '"#/parameters/threadId'"
      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}/comment/{commentId}:
    # binds a127 app logic to a route
    x-swagger-router-controller: comments
    deleteput:
      description: DeleteUpdate a comment Thread
       # used as the method name of the controller
      operationId: commentThreadcomment_deleteput
      tags:
        - Commenting
      parameters:
        - $ref: '"#/parameters/fileId'"
        - $ref: '"#/parameters/sessionId'"
        - $ref: '"#/parameters/threadId'"
        responses- $ref: "#/parameters/commentId"
       # responses- mayname: fallbody
through to errors         "200":in: body
          descriptionrequired: Successtrue
          schema:
            type: object
            properties:
              statustext:
                 type: string
                defaultresponses:
"ok"        # responses may fall through to errors
timestamp:                 type: integer
                description: time of response 
  /v1/files/{fileId}/commentThread/{threadId}/comment/{commentId}:"200":
        # binds a127 app logic to a route  description: Success
          x-swagger-router-controllerschema:
comments     put:       descriptiontype: Updateobject
   a comment        #properties:
used as the method name of the controller       operationIdstatus:
comment_put                tagstype: string
        - Commenting       parametersdefault: "ok"
       - $ref: '#/parameters/fileId'       timestamp:
           - $ref: '#/parameters/sessionId'   type: integer
    - $ref: '#/parameters/threadId'         - $refdescription: '#/parameters/commentId'
 time of response
    get:
 - name: body   description: Retrieve a comment
     in: body# used as the method name of the controller
  required: true   operationId: comment_get
      schematags:
        -  Commenting
  type: object   parameters:
        - properties$ref: "#/parameters/fileId"
        - $ref: "#/parameters/sessionId"
  text:      - $ref: "#/parameters/threadId"
        - type$ref: string"#/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
  /v1/files/{fileId}/commentThread/{threadId}/comment:
    # binds a127 app logic to a route
   description  x-swagger-router-controller: timecomments
of response     deletepost:
      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:    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: time of response
  /v1/files/{fileId}/commentThread/{threadId}/comment:
 type: object
   # binds a127 app logic to a route     x-swagger-router-controllerproperties:
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 schema:file
      # used as the method name of type:the objectcontroller
      operationId: markup_post
    properties:  tags:
        - 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 the method name of the controller       operationIdtype: markup_postarray
      tags:         - Commenting
items:
     parameters:         - $ref: '#/parameters/fileId'  type: string
     - $refresponses:
 '#/parameters/sessionId'       # responses -may name:fall bodythrough to errors
        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  type: arrayof the controller
      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
            propertiesschema:
            type: object
status:            properties:
     type: string        title:
        default: "ok"       type: string
      timestamp:        text:
        type: integer       type: string
        description: time of response   /v1/files/{fileId}/markup/{markupId}ids:
    # binds a127 app logic to a route     x-swagger-router-controllertype: commentsarray
    put:       description: Update a markup    items:
   # used as the method name of the controller       operationIdtype: markup_putstring
      tagsresponses:
        -# Commentingresponses may fall through to errors
 parameters:       "200":
 - $ref: '#/parameters/fileId'       description: Success
- $ref: '#/parameters/sessionId'        schema:
- $ref: '#/parameters/markupId'         - nametype: bodyobject
          in: body properties:
         required: true    status:
      schema:          type: string
  type: object             propertiesdefault: "ok"
             title timestamp:
                type: integer
 string               text:description: time of response
    get:
      description: get a markup
 type: string    # used as the method name of the controller
  ids:    operationId: markup_get
      tags:
        - type:Commenting
  array    parameters:
        - $ref: "#/parameters/fileId"
 items:       - $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
  /v1/files/{fileId}/markup/{markupId}/comment/{commentId}:
    # binds a127 app logic to a route
    x-swagger-router-controller: comments
   delete put:
      description: deleteUpdate a markupcomment
       # 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"
        #- responsesname: maybody
fall through to errors         "200":in: body
          descriptionrequired: Successtrue
          schema:
            type: object
            properties:
              statustext:
                 type: string
      responses:
        # default: "ok"
   responses may fall through to errors
          timestamp"200":
                typedescription: integerSuccess
          schema:
     description: time of response     /v1/files/{fileId}/markup/{markupId}/comment/{commentId}type: object
   # binds a127 app logic to a route  properties:
  x-swagger-router-controller: comments     put:      status:
description: Update a comment        # used as the method nametype: ofstring
the controller       operationId: markupcomment_put       tagsdefault: "ok"
       - Commenting       parameters:    timestamp:
    - $ref: '#/parameters/fileId'         - $reftype: '#/parameters/sessionId'integer
        - $ref: '#/parameters/markupId'      description: time of -response
$ref: '#/parameters/commentId'   get:
     - namedescription: bodyRetrieve a markup comment
      # in:used bodyas the method name of the controller
    required: true operationId: markupcomment_get
        schematags:
        - Commenting
   type: object  parameters:
        -  properties:$ref: "#/parameters/fileId"
        - $ref: "#/parameters/sessionId"
   text:     - $ref: "#/parameters/markupId"
        - type$ref: string"#/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 markup comment 
      # used as the method name of the controller
      operationId: markupcomment_getdelete
      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:
    delete# binds a127 app logic to a route
    x-swagger-router-controller: comments
    post:
      description: DeletePost a new markup comment
       # used as the method name of the controller
      operationId: markupcomment_deletepost
      tags:
        - Commenting
      parameters:
        - $ref: '"#/parameters/fileId'"
        - $ref: '"#/parameters/sessionId'"
        - $ref: '"#/parameters/markupId'
        - $ref: '#/parameters/commentId'
      responses:
        # responses may fall through to errors
        "200":
        -  descriptionname: Successbody
          schemain: body
           typerequired: objecttrue
            propertiesschema:
            type: object
status:            properties:
     type: string        text:
        default: "ok"       type: string
      timestampresponses:
        # responses may fall through to errors
 type: integer      "200":
          description: timeSuccess
of response   /v1/files/{fileId}/markup/{markupId}/comment:     # bindsschema:
a127 app logic to a route     x-swagger-router-controller: comments type: object
  post:       description: Post a new markupproperties:
comment        # used as the method name ofstatus:
the controller       operationId: markupcomment_post       tagstype: string
        - Commenting       parametersdefault:      "ok"
  - $ref: '#/parameters/fileId'           - $reftimestamp:
'#/parameters/sessionId'          - $ref: '#/parameters/markupId'    type: integer
   - name: body           indescription: bodytime of response
  /v1/files/{fileId}/attachment:
     required: truex-swagger-router-controller: comments
    post:
      schemadescription: Create a markup attachment
      # used as  type: objectthe method name of the controller
      operationId: attachment_post
      propertiestags:
        - Commenting
    text  consumes:
        - multipart/form-data
      typeparameters:
string       responses: - $ref: "#/parameters/fileId"
     # responses may fall- through to errors$ref: "#/parameters/sessionId"
        - "200"in: formData
         description name: Successattachment
          schemarequired: true
           type: objectfile
      responses:
     properties:   "200":
          description: status:Success
          schema:
      type: string     required:
           default: "ok"  - status
           timestamp:   - changeId
            typeproperties:
integer                 descriptionstatus:
time of response   /v1/files/{fileId}/attachment:     x-swagger-router-controller: comments     posttype: string
     description:  Create a markup attachment      default: #"ok"
used as the method name of the controller       operationIdchangeId:
attachment_post       tags:         -type: Commentingstring
      consumes:  # responses may fall through to errors
 - multipart/form-data      default:
parameters:         - $refdescription: '#/parameters/fileId'Error
        - $ref: '#/parameters/sessionId'     schema:
   - in: formData       $ref: "#/definitions/ErrorResponse"
  name/v1/files/{fileId}/attachments:
attachment    x-swagger-router-controller: comments
     requiredget:
true      description: Retrieve all attachments
 type: file    # used as responses:the method name of the controller
   "200":   operationId: attachments_get
      descriptiontags:
Success        - Commenting
 schema:     parameters:
       required: - $ref: "#/parameters/fileId"
        - $ref: "#/parameters/sessionId"
- status     responses:
        # -responses changeIdmay fall through to errors
        properties"200":
          description: Success
  status:        schema:
         type: string  type: object
             defaultproperties:
"ok"               changeIdstatus:
                type: string
           # responses may fall through to errors      default: "ok"
              defaulttimestamp:
          description:  Error    type: integer
     schema:           description: time $ref: "#/definitions/ErrorResponse"of response
  /v1/files/{fileId}/attachments/{attachmentId}:
    # binds a127 app logic to a route
    x-swagger-router-controller: comments
    get:
      description: Retrieve allattachment
attachments        # used as the method name of the controller
      operationId: attachmentsattachment_get
      tags:
        - Commenting
      parameters:
        - $ref: '"#/parameters/fileId'"
        - $ref: '"#/parameters/sessionId'"
        - $ref: "#/parameters/attachmentId"
      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}/attachments/{attachmentId}:swagger:
    x-swagger-pipe: swagger_raw
# binds a127 app logic to a routecomplex objects have schema definitions
definitions:
  SessionsResponse:
    x-swagger-router-controller: commentsrequired:
    get:  - status
   description: Retrieve attachment - results
    properties:
# used as the method name ofstatus:
the controller       operationIdtype: attachment_getstring
        tagsdefault: "ok"
      results:
- Commenting       parameterstype: array
       - $refitems:
'#/parameters/fileId'         - $reftype: '#/parameters/sessionId'object
         - $refproperties:
'#/parameters/attachmentId'        responses:    mode:
    # responses may fall through to errors    type: string
   "200":           description: Successenum: [view, edit]
            schemausername:
              type: objectstring
            propertiessessionId:
              statustype: string
            userId:
              type: string

  LibrariesResponse:
    required:
      - status
      - results
    defaultproperties:
"ok"      status:
        timestamptype: string
        default: "ok"
      typeresults:
integer        type: array
        descriptionitems:
time of response   /swagger:     x-swagger-pipetype: swagger_rawobject
 # complex objects have schema definitions definitions:   SessionsResponseproperties:
    required:       - statusid:
      - results     properties:  type: string
   status:         name:
type: string         default: "ok"   type: string
  resultsBlocksResponse:
    required:
   type: array  - status
     items: - results
    properties:
      typestatus:
object        type: string
   properties:     default: "ok"
      results:
 mode:       type: array
        typeitems:
string          type: object
     enum: [view, edit]   properties:
           username id:
                type: string
              sessionIdname:

               type: string
              userIdthumbnail:
 
              type: string

  ErrorResponse:
    required:
      - message
    properties:
      message:
        type: string
      errrorId:
        type: string