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 markuplibrary (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 attachmentcomment thread
    required: true
    type: string
  optionalSessionIdmarkupId:
    name: sessionIdmarkupId
    in: headerpath
    description: the user sessionId (optional; sent only if sessionId query parameter was passed to editor url)markup
      required: falsetrue
    type: string
  fileSessionIdcommentId:
    name: xSessionIdcommentId
    in: headerpath
    description: the file sessionIdcomment
    required: true
    type: string
paths  attachmentId:
    /files/{fileId}/diffsname: attachmentId
    parametersin: path
    description: the attachment
   - $refrequired: '#/parameters/fileId'true
    type: string
- $ref: '#/parameters/optionalSessionId':
    #name: bindssessionid
a127 app logic to ain: routeheader
    x-swagger-router-controllerdescription: filesthe user sessionId
    getrequired: false
    type: string
paths:
  description: Returns file content/library/blocks:
    parameters:
      - $ref: "#/parameters/optionalSessionId"
used as the method name of the- controller
$ref: "#/parameters/ownerType"

    operationId: diffs_getx-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:
    parameters:
      - $ref: "#/parameters/optionalSessionId"
    x-swagger-router-controller: files
    post:
      description: Create/Update a file
      # used as the method name of the controller
      operationId: post_file
      tags:
        - ARES Kudo Required
      consumes:
        - multipart/form-data
      parameters:
        - in: header
          name: fileId
          description: ID of the file (New file will be created if this value is not specified)
          required: false
          type: string
        - in: formData
          name: file
          required: true
          type: file
      responses:
        "200":
          description: Success
          schema:
            required:
              - id
              - filename
              - isNewFile
              - changeId
            properties:
              id:
                type: string
              filename:
                type: string
              isNewFile:
                type: boolean
              changeId:
             tags:   type: string
    - ARES Kudo Required # responses may fall through to responses:errors
        "200"default:
          description: SuccessError
          schema:
            required$ref: "#/definitions/ErrorResponse"
  /files/{fileId}/data:
    parameters:
      - status
$ref: "#/parameters/fileId"
      - $ref: "#/parameters/optionalSessionId"
    -# baseContentbinds a127 app logic to a route
      propertiesx-swagger-router-controller: files

    get:
       statusdescription: Returns file content
      # used as the method name of the type:controller
string      operationId: data_get
      tags:
  default: "ok"     - ARES Kudo Required
      baseContentproduces:
        - application/octet-stream
      type: string
      responses:
         description"200":
Base64 encoded content of file      description: Success
         # responses may fall through to errors
        "404":
          description: Error
          schema:
            $ref: "#/definitions/ErrorResponse"

   put/files/{fileId}/xref/search:
    # binds a127 app logic to a route
    x-swagger-router-controller: files
    post:
      description: UpdateXRef file contentsearch
      # used as the method name of the controller
      operationId: diffsxref_putsearch
      tags:
        - ARES Kudo Required Optional
      parameters:
        - $ref: "#/parameters/fileId"
        - $ref: "#/parameters/optionalSessionId"
        - name: body
          in: body
          required: true
          schema:
            required:
              - baseContentpath
            properties:
              path:
              baseContent  type: array
                typedescription: string xrefs paths to search
                descriptionitems:
Base64 encoded content of file              type: string
      responses:
        "200":
          description: Success
          schema:
            requiredtype: array
            items:
- status             type: object
- changeId             properties:
                statuspath:
                  type: string
                defaultfiles:
"ok"                  changeIdtype: array
               type   items:
 string            # responses may fall through to errors type: object
      default:           description: Error  properties:
        schema:             $ref: "#/definitions/ErrorResponse"_id":
   /files:     post:       description: Create a new file     type: string
# used as the method name of the controller# responses may fall through to errors
operationId: post_file       tagsdefault:
        - ARES Kudodescription: Optional
Error
     consumes:     schema:
    - multipart/form-data       parameters$ref: "#/definitions/ErrorResponse"
  /files/{fileId}/preview:
    -# in:binds headera127 app logic to a route
     namex-swagger-router-controller: folderIdfiles
    post:
      requireddescription: trueOptionally handle receiving updates previews
      type:# stringused as the method name of the controller
 - in: formData   operationId: preview_post
      nametags:
file        - ARES Kudo required:Optional
true      parameters:
    type: file   - $ref: "#/parameters/fileId"
 responses:       - $ref: "200#/parameters/optionalSessionId":
        -  descriptionin: SuccessformData
          schemaname: file
           required: true
          type: file
 - status    responses:
        "200":
 - changeId        description: Success
   properties:       schema:
       status:       type: object
         type: string  properties:
              defaultstatus:
"ok"                changeIdtype: string
                typedefault: string"ok"
        # responses may fall through to errors
        default:
          description: Error
          schema:
            $ref: "#/definitions/ErrorResponse"

  /files/{fileId}/xref/searchinfo:
    # binds a127 app logic to a route
    x-swagger-router-controller: files
    postget:
      description: XRefReturns searchfile       # used as the method name of the controller
      operationId: xref_search
      tags:
        - ARES Kudo Optional
      parameters:
        - $ref: '#/parameters/fileId'
        - $ref: '#/parameters/optionalSessionId'information
      # used as the -method name: bodyof the controller
      operationId: info_get
in: body     tags:
     required:  true - ARES Kudo Required
      schemaparameters:
        - $ref: "#/parameters/fileId"
   required:     - $ref: "#/parameters/optionalSessionId"
      responses:
  - path     "200":
       properties:   description: Success
          pathschema:
            required:
   type: array          - status
     description: xrefs paths to search   type: object
            properties:
           items:   status:
                type: string
        responses:        default: "200ok":
          description: Success   filename:
       schema:         type: string
  type: array           folderId:
 items:               type: objectstring
              propertiesowner:
                pathtype: string
        # responses may fall through to errors
   type: string     "401":
           filesdescription: User is not autenticated
          schema:
   type: array        $ref: "#/definitions/ErrorResponse"
         items"404":
          description: File is not found
     type: object    schema:
            $ref: "#/definitions/ErrorResponse"
  properties/files/{fileId}/session:
    # binds a127 app logic to a route
    parameters:
     "_id": - $ref: "#/parameters/fileId"
      - $ref: "#/parameters/sessionId"

    x-swagger-router-controller: files_sessions
     typeget:
string      description: get file #sessions
responses may fall through to errors # used as the method name of the default:controller
          description: ErroroperationId: session_get
      tags:
    schema:    - File Sessions
      $refresponses:
"#/definitions/ErrorResponse"   /files/{fileId}/preview:     # binds a127 app logic to a route"200":
          x-swagger-router-controllerdescription: filesSuccess
    post:      schema:
description: Optionally handle receiving updates previews       # useda aspointer theto methoda namedefinition
of the controller       operationId: preview_post  $ref: "#/definitions/SessionsResponse"
    tags:    # responses may fall through -to ARESerrors
Kudo Optional       parametersdefault:
        -  $refdescription: '#/parameters/fileId' Error
         - $refschema:
'#/parameters/optionalSessionId'         responses:   $ref: "#/definitions/ErrorResponse"
    "200"post:
      description: Create file session. description:Sessions Successneed to be either of type "view" or "edit"
  schema:    # used as the method name of the controller
type: object     operationId: session_post
      propertiestags:
        - File Sessions
   status:   parameters:
        - name: body
    type: string     in: body
          defaultrequired: "ok"true
        # responses mayschema:
fall through to errors         defaultrequired:
          description: Error   - mode
      schema:      properties:
      $ref: "#/definitions/ErrorResponse"       mode:
                 
  /files/{fileId}/info:type: string
    # binds a127 app logic to a route     x-swagger-router-controllerdescription: filesType of session  requested
get:       description: Returns file information      enum: # used as the method name of the controller[view, edit]
            operationId: info_get fileId:
     tags:         - ARES Kudotype: Requiredstring
      parameters:         - $refdescription: '#/parameters/fileId' for the file for which the session is -being $ref: '#/parameters/optionalSessionId'
requested
      responses:
        "200":
          description: Success
          schema:
            required:
              - status
              type: object- "_id"
            properties:
              status: 
                type: string
                default: "ok"
              filename"_id": 
                type: string
        # responses may fall through to folderId:errors
        default:
          typedescription: Error
   string       schema:
       owner:     $ref: "#/definitions/ErrorResponse"
    delete:
      typedescription: stringdelete file session
      # responsesused mayas fallthe throughmethod toname errorsof the controller
      "401"operationId: session_delete
      tags:
  description: User is not autenticated  - File Sessions
      schemaresponses:
        "200":
    $ref: "#/definitions/ErrorResponse"     description: Success
  "404":        schema:
  description: File is not found      # a pointer to a schema:definition
            $ref: "#/definitions/ErrorResponseSessionsResponse"
  /files/{fileId}/session:      # bindsresponses a127may appfall logicthrough to aerrors
route     parameters:   default:
   - $ref: '#/parameters/fileId'       - $refdescription: '#/parameters/optionalSessionId'
Error
    x-swagger-router-controller: files     getschema:
      description: get file sessions   $ref:    # used as the method name of the controller
      operationId: session_get
      tags:"#/definitions/ErrorResponse"
  /auth:
    # binds a127 app logic to a route
    x-swagger-router-controller: auth
  - File Sessionsget:
      responsesdescription: validate user session
     "200": # used as the method name of the controller
 description: Success     tags:
     schema:   - User Sessions
      operationId: #auth_get
a pointer to a definition  parameters:
         - $ref: "#/definitionsparameters/SessionsResponseoptionalSessionId"
      responses:
        # responses may fall through to errors
        default"200":
          description: ErrorSuccess
          schema:
            $reftype: "#/definitions/ErrorResponse"object
     post:       description: Create file session. Sessions need to be either of type "view" or "edit"properties:
             # used as the method name of the controller status:
        operationId: session_post       tagstype: string
       - File Sessions       parametersdefault: "ok"
       - name401:
body           indescription: bodyAuthorization information is missing or invalid.
  /users:
  required: true # binds a127 app logic to a route
  schema  x-swagger-router-controller: users
    get:
      requireddescription: Get user data and preferences
      # used as -the modemethod name of the controller
      operationId: users_get
properties:      tags:
        - mode:Users
      parameters:
        - type$ref: string"#/parameters/sessionId"
      responses:
         description200:
Type of session requested       description: Success
           enumschema:
[view, edit]           $ref: '#/definitions/GetUserResponse'
  fileId:      400:
          typedescription: stringSomething went wrong while getting the userdata from json file.
        descriptiondefault:
fileId  for the file for which the session is beingdescription: requestedError
          responsesschema:
        "200":    $ref: "#/definitions/ErrorResponse"
     descriptionput:
Success           schemadescription: Update user data and preferences
      # required:used as the method name of the controller
      operationId: -users_put
status      tags:
        - "_id"Users
      parameters:
     properties:   - $ref: "#/parameters/sessionId"
        - statusname: body
          in: body
    type: string     required: true
          defaultschema:
"ok"            $ref: '#/definitions/UserPreferencesObject'

"_id":      responses:
        200:
 type: string        description: #Success
responses may fall through to errors     schema:
   default:         type: object
description: Error           schemaproperties:
            $ref: "#/definitions/ErrorResponse"
 status:
   delete:       description: delete file session   type: string
  # used as the method name of the controller       operationIddefault: session_delete"ok"
      tags:  400:
      - File Sessions  description: Something went wrong while parameters:saving the userdata into the json file.
  - $ref: '#/parameters/fileSessionId'    default:
  responses:         "200":description: Error
          descriptionschema:
 Success           schema:$ref: "#/definitions/ErrorResponse"

  /v1/files/{fileId}/annotations:
    # binds a127 app logic #to a pointerroute
  to a definition
 x-swagger-router-controller: comments
    get:
      $refdescription: "#/definitions/SessionsResponse"
 Returns annotations for a file
      # responsesused mayas fallthe throughmethod toname errorsof the controller
      defaultoperationId: annotations_get
      tags:
  description: Error     - Commenting
    schema:  parameters:
        -  $ref: "#/definitionsparameters/ErrorResponsefileId"
  /auth:     # binds- a127 app logic to a route$ref: "#/parameters/sessionId"
        x-swagger-router-controller- name: authtimestamp
    get:       descriptiontype: validateinteger
user session       # used asin: thequery
method name of the controller       tagsrequired: false
       - User Sessions
      operationId description: auth_gettimestamp of last request to only send parameters:
        - $ref: '#/parameters/sessionId'new items
      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: object
                properties:
    #   binds a127 app logic to a route     x-swagger-router-controller: userstimestamp:
                    gettype: integer
     description:  Returns user object       # used as the methoddescription: nametime of response
 the  controller       operationId: users_get       tagscommmentThreads:
        -    User Sessions       parameterstype: array
       -   $ref: '#/parameters/sessionId'       responses:  description: ""
     # responses may fall through to errors         "200"items:
          description: Success           schematype: object
           type: object      markups:
      properties:               statustype: array
                type: string   description: ""
            default: "ok"         items:
     results:                 type: arrayobject
                  itemsstatus:
                     type: objectstring
                    propertiesdefault: "ok"
  /v1/files/{fileId}/markups:
    # binds a127 app logic to a route
    x-swagger-router-controller: comments
 fname   get:
      description: Returns markups for a file
      # used as the method name of the type:controller
string      operationId: markups_get
      tags:
        - Commenting
description: first name    parameters:
        - $ref: "#/parameters/fileId"
       surname: - $ref: "#/parameters/sessionId"
        - name: timestamp
          type: stringinteger
           in: query
           descriptionrequired: lastfalse
name of user        description: timestamp of last request to only send new items
     "_id" responses:
        # responses may fall through to errors
         type"200":
string          description: Success
           emailschema:
            type: object
          type: string properties:
              status:
      licenseExpirationDate:          type: string
             type: integer  default: "ok"
              results:
    preferences:            type: object
           type: object    properties:
                  timestamp:
 properties:                   type: integer
      preferences_display:              description: time of response
           type: object      markups:
                    type: array
properties:                    description: ""
          graphicswinmodelbackgrndcolor:          items:
                      type: stringobject
                  status:
              default: White     type: string
                    windowdefault: "ok"
  /v1/files/{fileId}/commentThreads:
    #   binds a127 app logic to a route
    x-swagger-router-controller: comments
    typeget:
object      description: Returns comments for a file
      # used as the method name of the controller
  properties:    operationId: commentThreads_get
      tags:
        - Commenting
      parameters:
 edit:       - $ref: "#/parameters/fileId"
        - $ref: "#/parameters/sessionId"
        - name: timestamp
 type: object        type: integer
          in: query
          viewrequired: false
          description: timestamp of last request to only send new items
      responses:
    type: object   # responses may fall through to errors
        "200":
        variables:  description: Success
          schema:
              type: object
            properties:
               propertiesstatus:
                type: string
             dynasnap:   default: "ok"
                    results:
       type: string        type: object
                properties:
      default: "63"     put:       descriptiontimestamp:
Returns user object       # used as the method name of the controller   type: integer
  operationId: users_put       tags:         - Userdescription: Sessionstime of response
    parameters:         - $ref: '#/parameters/sessionId'   commmentThreads:
     - name: body           in: body type: array
        required: true           schemadescription: ""
           properties:         items:
     preferences:                 type: object
                description  status:
  user preferences                 propertiestype: string
                 window:   default: "ok"
  /v1/files/{fileId}/commentThread:
    # binds a127 app logic to a route
 type: object  x-swagger-router-controller: comments
    post:
      description: Add a new commentThread for properties:a file
      # used as the method name of the controller
      editoperationId: commentThread_post
      tags:
        - Commenting
      typeparameters:
object        - $ref: "#/parameters/fileId"
        - $ref: "#/parameters/sessionId"
   properties:     - name: body
          in: body
       dockwidgets:   required: true
          schema:
             type: object
            properties:
              title:
 properties:               type: string
              layerwindowtext:
                type: string
              typestate:
object                type: string
                propertiesenum: [ACTIVE, RESOLVED]
              ids:
                 htype: array
                items:
                  type: string
      responses:
        # responses may fall through to errors
        "200":
          description: heightSuccess
o the layerwindow        responsesschema:
        # responses may fall through to errors    type: object
            "200"properties:
          description:  Success  status:
        schema:        type: string
   type: object             properties:default: "ok"
              statustimestamp: 
                type: stringinteger
                defaultdescription: "ok"time of response
  /v1/files/{fileId}/annotationscommentThread/{threadId}:
    # binds a127 app logic to a route
    x-swagger-router-controller: comments
    getput:
      description: ReturnsUpdate annotations for a filecommentThread
      # used as the method name of the controller
      operationId: annotationscommentThread_getput
      tags:
        - Commenting
      parameters:
        - $ref: '#/parameters/fileId'
        - $ref: '#/parameters/sessionId'
        - name: timestamp
          type: integer
          in: query Commenting
      parameters:
   required: false    - $ref: "#/parameters/fileId"
    description: timestamp of last request- to only send new items$ref: "#/parameters/sessionId"
        - responses$ref: "#/parameters/threadId"
       # responses- mayname: fallbody
through to errors         "200":in: body
          descriptionrequired: Successtrue
          schema:
            type: object
            properties:
              statustitle:
                 type: string
              text:
 default: "ok"               resultstype: string
               typeids: object
                propertiestype: array
                 timestampitems:
                    type: integerstring
      responses:
        # responses may fall through description:to timeerrors
of response       "200":
           commmentThreadsdescription: Success
             schema:
     type: array      type: object
             description: ""
     properties:
              itemsstatus:
                type: string
    type: object           default: "ok"
      markups:        timestamp:
            type: array   type: integer
                description: ""time of response
    get:
      description: get a commentThread
   items:   # used as the method name of the controller
      operationId: commentThread_get
   type: object  tags:
        - Commenting
      statusparameters:
        - $ref: "#/parameters/fileId"
        - type$ref: string"#/parameters/sessionId"
        - $ref: "#/parameters/threadId"
         defaultresponses:
"ok"   /v1/files/{fileId}/markups:     # bindsresponses a127may appfall logicthrough to errors
a route     x-swagger-router-controller: comments "200":
   get:       description: ReturnsSuccess
markups for a file       # used asschema:
the method name of the controller       operationIdtype: markups_getobject
      tags:      properties:
  - Commenting       parameters:    status:
    - $ref: '#/parameters/fileId'         - $reftype: '#/parameters/sessionId'string
        - name: timestamp      default: "ok"
   type: integer          timestamp:
in: query           required: false   type: integer
      description: timestamp of last request to only send new items description: time of response
  responses:  delete:
      #description: responsesDelete maya fallcomment throughThread
to errors     # used as the "200":method name of the controller
      descriptionoperationId: SuccesscommentThread_delete
      tags:
   schema:     - Commenting
      typeparameters:
object        -     properties:$ref: "#/parameters/fileId"
        - $ref: "#/parameters/sessionId"
    status:    - $ref: "#/parameters/threadId"
      responses:
    type: string   # responses may fall through to errors
       default: "ok200":
          description: Success
  results:        schema:
        type: object   type: object
            properties:
              status:
   timestamp:             type: string
      type: integer         default: "ok"
          description: time of response timestamp:
                 markupstype: integer
                description: time of type:response
array  /v1/files/{fileId}/commentThread/{threadId}/comment/{commentId}:
    # binds a127 app logic to a route
      description: ""x-swagger-router-controller: comments
    put:
      description: Update a comment
      items:# used as the method name of the controller
      operationId: comment_put
      typetags:
object        - Commenting
         statusparameters:
        - $ref: "#/parameters/fileId"
        - type$ref: string"#/parameters/sessionId"
        - $ref: "#/parameters/threadId"
        - default$ref: "ok#/parameters/commentId"
   /v1/files/{fileId}/commentThread:     - #name: bindsbody
a127 app logic to a route     x-swagger-router-controller: commentsin: body
     post:     required: true
description: Add a new commentThread for a file   schema:
   # used as the method name of the controller type: object
    operationId: commentThread_post       tagsproperties:
        - Commenting     text:
 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
                description: time of response
    typeget:
  string    description: Retrieve a comment
      # used as the method name enum: [ACTIVE, RESOLVED]of the controller
      operationId: comment_get
      idstags:
        - Commenting
      typeparameters:
 array       - $ref: "#/parameters/fileId"
        - items:$ref: "#/parameters/sessionId"
        - $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
  /v1/files/{fileId}/commentThread/{threadId}:
    # binds a127 app logic to a route
    x-swagger-router-controller: comments
    put  delete:
      description: UpdateDelete a commentThreadcomment
       # used as the method name of the controller
      operationId: commentThreadcomment_putdelete
      tags:
        - Commenting
      parameters:
        - $ref: '"#/parameters/fileId'"
        - $ref: '"#/parameters/sessionId'"
        - $ref: '"#/parameters/threadId'"
        - name: body $ref: "#/parameters/commentId"
      responses:
        # responses may fall through to errors
        "200":
          indescription: bodySuccess
          requiredschema:
 true           schematype: object
            typeproperties:
object              propertiesstatus:
                titletype: string
               type default: string"ok"
              texttimestamp:
                type: stringinteger
                description: time of  idsresponse
  /v1/files/{fileId}/commentThread/{threadId}/comment:
    # binds a127 app logic to a route
    typex-swagger-router-controller: arraycomments
    post:
      description: Post a new comment
  items:    # used as the method name of the controller
      typeoperationId: stringcomment_post
      responsestags:
        - #Commenting
   responses may fall throughparameters:
to errors       - $ref: "200#/parameters/fileId":
        -  description$ref: Success"#/parameters/sessionId"
        -  schema$ref: "#/parameters/threadId"
        - name: body
type: object         in: body
  properties:        required: true
     status:     schema:
            type: stringobject
            properties:
     default:  "ok"       text:
       timestamp:         type: string
      typeresponses:
  integer      # responses may fall through to errors
    description: time of response "200":
   get:       description: getSuccess
a commentThread        # used asschema:
the method name of the controller       operationIdtype: commentThread_getobject
      tags:      properties:
  - Commenting       parameters:    status:
    - $ref: '#/parameters/fileId'         - $reftype: '#/parameters/sessionId'
string
       - $ref: '#/parameters/threadId'       responsesdefault:   "ok"
     # responses may fall through to errors   timestamp:
     "200":           descriptiontype: Successinteger
          schema:      description: time of response
   type/v1/files/{fileId}/markup:
object    # binds a127 app logic to a route
  properties:  x-swagger-router-controller: comments
    post:
      statusdescription: Add a new markup for a file
      # used as the method type:name stringof the controller
      operationId: markup_post
      defaulttags:
"ok"        - Commenting
      timestampparameters:
        - $ref: "#/parameters/fileId"
     type: integer  - $ref: "#/parameters/sessionId"
        - name: body
 description: time of response     /v1/files/{fileId}/commentThread/{threadId}/comment/{commentId}:
  in: body
   #  binds a127 app logic to arequired: routetrue
    x-swagger-router-controller: comments     putschema:
      description: Update a comment   type: object
   #  used as the method name of the controllerproperties:
      operationId: comment_put       tagstitle:
        - Commenting       parameterstype: string
          -    $reftext:
'#/parameters/fileId'         - $ref: '#/parameters/sessionId'     type: string
  - $ref: '#/parameters/threadId'         - $refstate:
'#/parameters/commentId'         - name: body     type: string
    in: body           requiredenum: true[ACTIVE, RESOLVED]
         schema:      ids:
       type: object        type: array
   properties:             items:
 text:                 type: string
      responses:
        # responses may fall through to errors
        "200":
          description: Success
          schema:
            type: object
            properties:
              status:
                 type: string
                default: "ok"
              timestamp:
                type: integer
                description: time of response
    get/v1/files/{fileId}/markup/{markupId}:
    # binds a127 app logic to a route
    x-swagger-router-controller: comments
    put:
      description: RetrieveUpdate a comment markup
      # used as the method name of the controller
      operationId: commentmarkup_getput
      tags:
        - Commenting
      parameters:
        - $ref: "#/parameters/fileId"
        - $ref: "#/parameters/sessionId"
        - $ref: "#/parameters/markupId"
   - Commenting    - name: body
parameters:         - $refin: '#/parameters/fileId'body
         - $refrequired: '#/parameters/sessionId'true
         - $refschema:
'#/parameters/threadId'         - $ref: '#/parameters/commentId'
  type: object
    responses:        properties:
# responses may fall through to errors         "200"title:
          description: Success     type: string
    schema:          text:
  type: object             propertiestype: string
             status ids: 
                type: stringarray
                defaultitems:
"ok"                  timestamptype: string
      responses:
        type:# integerresponses may fall through to errors
        "200":
  description: time of response     deletedescription: Success
      description:   Delete aschema:
comment        # used as the methodtype: nameobject
of the controller       operationId: comment_delete  properties:
    tags:         - Commentingstatus:
      parameters:         - $reftype: '#/parameters/fileId'string
         - $ref: '#/parameters/sessionId'     default: "ok"
  - $ref: '#/parameters/threadId'         - $reftimestamp:
'#/parameters/commentId'       responses:         #type: responsesinteger
may fall through to errors         "200":   description: time of response
    descriptionget:
 Success     description: get a markup
  schema:    # used as the method name of the controller
type: object     operationId: markup_get
      propertiestags:
        - Commenting
    status  parameters:
        - $ref: "#/parameters/fileId"
      type: string - $ref: "#/parameters/sessionId"
        -     default$ref: "ok#/parameters/markupId"
      responses:
       timestamp: # responses may fall through to errors
         type"200":
integer          description: Success
      description: time of response schema:
 /v1/files/{fileId}/commentThread/{threadId}/comment:     # binds a127 app logic to atype: routeobject
    x-swagger-router-controller: comments     post:  properties:
    description: Post a new comment      status:
 # used as the method name of the controller       operationIdtype: comment_poststring
       tags:         - Commentingdefault: "ok"
      parameters:        timestamp:
- $ref: '#/parameters/fileId'         - $ref: '#/parameters/sessionId'   type: integer
    - $ref: '#/parameters/threadId'         - namedescription: bodytime of response
    delete:
   in: body  description: delete a markup
     required: true# used as the method name of the controller
  schema:    operationId: markup_delete
      tags:
  type: object     - Commenting
      propertiesparameters:
        - $ref: "#/parameters/fileId"
   text:     - $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
  /v1/files/{fileId}/markup/{markupId}/comment/{commentId}:
    # binds a127 app logic to a route
    x-swagger-router-controller: comments
    postput:
      description: AddUpdate a new markup for a file
 comment
      # used as the method name of the controller
      operationId: markupcomment_put
     # usedtags:
as the method name of the controller  - Commenting
   operationId: markup_post  parameters:
    tags:    - $ref: "#/parameters/fileId"
  - Commenting     - $ref: parameters:"#/parameters/sessionId"
        - $ref: '"#/parameters/fileId'markupId"
        - $ref: '"#/parameters/sessionId'commentId"
        - name: body
          in: body
          required: true
          schema: 
            type: object
            properties:
              titletext:
                type: string
      responses:
       text:
     # responses may fall through to errors
        "200":
  type: string       description: Success
      state:    schema:
            type: string object
            properties:
           enum   status:
[ACTIVE, RESOLVED]               idstype: string
                type: arraydefault: "ok"
              timestamp:
                itemstype: integer
                description: time of response
    typeget:
string      description: Retrieve responses:a markup comment
      # responsesused mayas fallthe throughmethod toname errorsof the controller
      "200"operationId: markupcomment_get
      tags:
   description: Success    - Commenting
     schema parameters:
        - $ref: "#/parameters/fileId"
 type: object      - $ref: "#/parameters/sessionId"
    properties:    - $ref: "#/parameters/markupId"
        - status$ref: "#/parameters/commentId"
      responses:
        # type:responses stringmay fall through to errors
         "200":
  default: "ok"       description: Success
      timestamp:    schema:
            type: integerobject
             properties:
  description: time of response   /v1/files/{fileId}/markup/{markupId}:     # bindsstatus:
a127 app logic to a route     x-swagger-router-controller: comments     puttype: string
     description:  Update a markup       default: #"ok"
used as the method name of the controller       operationIdtimestamp:
markup_put       tags:         -type: Commentinginteger
      parameters:         - $refdescription: '#/parameters/fileId'time of response
    delete:
   -   $ref: '#/parameters/sessionId'description: Delete a markup comment
      # used as -the $ref: '#/parameters/markupId'
  method name of the controller
     - nameoperationId: markupcomment_delete
body      tags:
    in: body   - Commenting
      requiredparameters:
true        - $ref: "#/parameters/fileId"
   schema:     - $ref: "#/parameters/sessionId"
      type: object - $ref: "#/parameters/markupId"
        - properties$ref: "#/parameters/commentId"
      responses:
      title:  # responses may fall through to errors
        type"200":
string          description: Success
      text:    schema:
            type: stringobject
              idsproperties:
                typestatus:
array                 itemstype: string
                 type: stringdefault: "ok"
       responses:       timestamp:
 # responses may fall through to errors         "200"type: integer
          description: Success     description: time of response
  schema/v1/files/{fileId}/markup/{markupId}/comment:
    # binds a127 app logic to a route
type: object       x-swagger-router-controller: comments
     propertiespost:
      description: Post a new markup comment
  status:    # used as the method name of the controller
     type: string operationId: markupcomment_post
      tags:
        - Commenting
default: "ok"     parameters:
        - timestamp$ref: "#/parameters/fileId"
        - $ref: "#/parameters/sessionId"
    type: integer   - $ref: "#/parameters/markupId"
        -   descriptionname: timebody
of response     get:    in: body
 description: get a markup      required: true
# used as the method name of the controller  schema:
    operationId: markup_get       tagstype:   object
     - Commenting       parametersproperties:
        - $ref: '#/parameters/fileId'      text:
  - $ref: '#/parameters/sessionId'            - $reftype: '#/parameters/markupId'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:
    deletex-swagger-router-controller: comments
    post:
      description: deleteCreate a markup attachment
      # used as the method name of the controller
      operationId: markupattachment_deletepost
      tags:
        - Commenting
      consumes:
        - multipart/form-data
      parameters:
        - $ref: '"#/parameters/fileId'
 "
        - $ref: "#/parameters/sessionId"
        - in: formData
          name: attachment
          required: true
      - $ref: '#/parameters/sessionId'  type: file
     - $refresponses:
 '#/parameters/markupId'       responses"200":
         # responsesdescription: maySuccess
fall through to errors       schema:
 "200":           descriptionrequired:
Success              - status
 schema:             type:- objectchangeId
            properties:
              status: 
                type: string
                default: "ok"
              timestampchangeId:
                type: integerstring
        # responses may fall through to errors
        default:
          description: Error
   time of response     /v1/files/{fileId}/markup/{markupId}/comment/{commentId}:schema:
        #  binds a127 app logic to a route$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