swagger.yaml 8.8 KB
swagger: "2.0"
info:
  title: ""
  description: 字库元数据堡垒
  contact:
    name: ttt
    email: ""
    home: ""
  version: 0.0.1
consumes:
- application/json
- application/xml
produces:
- application/json
- application/xml
paths:
  /files:
    get:
      tags:
      - file
      summary: 返回文件服务列表
      description: 返回文件服务列表
      operationId: file#listFile
      parameters:
      - name: offset
        in: query
        description: 查询偏离量
        required: false
        type: integer
      - name: limit
        in: query
        description: 查询限制
        required: false
        type: integer
      responses:
        "200":
          description: OK response.
          schema:
            $ref: '#/definitions/FileListFileResponseBody'
      schemes:
      - http
    post:
      tags:
      - file
      summary: 创建文件服务
      description: 创建文件服务
      operationId: file#createFile
      parameters:
      - name: CreateFileRequestBody
        in: body
        required: true
        schema:
          $ref: '#/definitions/FileCreateFileRequestBody'
      responses:
        "200":
          description: OK response.
          schema:
            $ref: '#/definitions/FileCreateFileResponseBody'
      schemes:
      - http
  /files/{fileId}:
    get:
      tags:
      - file
      summary: 返回文件服务
      description: 返回文件服务
      operationId: file#getFile
      parameters:
      - name: fileId
        in: path
        description: 文件ID
        required: true
        type: integer
      responses:
        "200":
          description: OK response.
          schema:
            $ref: '#/definitions/FileGetFileResponseBody'
      schemes:
      - http
    put:
      tags:
      - file
      summary: 更新文件服务
      description: 更新文件服务
      operationId: file#updateFile
      parameters:
      - name: fileId
        in: path
        description: 文件ID
        required: true
        type: integer
      responses:
        "200":
          description: OK response.
          schema:
            $ref: '#/definitions/FileUpdateFileResponseBody'
      schemes:
      - http
    delete:
      tags:
      - file
      summary: 移除文件服务
      description: 移除文件服务
      operationId: file#removeFile
      parameters:
      - name: fileId
        in: path
        description: 文件ID
        required: true
        type: integer
      responses:
        "200":
          description: OK response.
          schema:
            $ref: '#/definitions/FileRemoveFileResponseBody'
      schemes:
      - http
  /files/files/edit-data-table:
    post:
      tags:
      - file
      summary: 编辑表格数据
      description: 编辑表格数据
      operationId: file#editDataTable
      parameters:
      - name: EditDataTableRequestBody
        in: body
        required: true
        schema:
          $ref: '#/definitions/FileEditDataTableRequestBody'
      responses:
        "200":
          description: OK response.
          schema:
            $ref: '#/definitions/FileEditDataTableResponseBody'
      schemes:
      - http
  /files/files/flush-data-table:
    post:
      tags:
      - file
      summary: 持久化表格数据
      description: 持久化表格数据
      operationId: file#flushDataTable
      parameters:
      - name: FlushDataTableRequestBody
        in: body
        required: true
        schema:
          $ref: '#/definitions/FileFlushDataTableRequestBody'
      responses:
        "200":
          description: OK response.
          schema:
            $ref: '#/definitions/FileFlushDataTableResponseBody'
      schemes:
      - http
  /files/files/generate-main-table:
    post:
      tags:
      - file
      summary: 生成主表
      description: 生成主表
      operationId: file#generateMainTable
      parameters:
      - name: GenerateMainTableRequestBody
        in: body
        required: true
        schema:
          $ref: '#/definitions/FileGenerateMainTableRequestBody'
      responses:
        "200":
          description: OK response.
          schema:
            $ref: '#/definitions/FileGenerateMainTableResponseBody'
      schemes:
      - http
  /files/files/load-data-table:
    post:
      tags:
      - file
      summary: 加载表格数据
      description: 加载表格数据
      operationId: file#loadDataTable
      parameters:
      - name: LoadDataTableRequestBody
        in: body
        required: true
        schema:
          $ref: '#/definitions/FileLoadDataTableRequestBody'
      responses:
        "200":
          description: OK response.
          schema:
            $ref: '#/definitions/FileLoadDataTableResponseBody'
      schemes:
      - http
definitions:
  FileCreateFileRequestBody:
    title: FileCreateFileRequestBody
    type: object
    properties:
      fileSize:
        type: integer
        description: 文件大小
        required:
        - fileSize
      name:
        type: string
        description: 名称
        required:
        - name
      url:
        type: string
        description: 文件地址
        required:
        - url
  FileCreateFileResponseBody:
    title: 'Mediatype identifier: FileCreateFileResponseBody'
    type: object
    properties:
      file:
        $ref: '#/definitions/fileResponseBody'
  FileEditDataTableRequestBody:
    title: FileEditDataTableRequestBody
    type: object
    properties:
      fileId:
        type: integer
        description: 文件ID
        required:
        - fileId
  FileEditDataTableResponseBody:
    title: 'Mediatype identifier: FileEditDataTableResponseBody'
    type: object
    properties:
      file:
        $ref: '#/definitions/fileResponseBody'
  FileFlushDataTableRequestBody:
    title: FileFlushDataTableRequestBody
    type: object
    properties:
      fileId:
        type: integer
        description: 文件ID
        required:
        - fileId
  FileFlushDataTableResponseBody:
    title: 'Mediatype identifier: FileFlushDataTableResponseBody'
    type: object
    properties:
      file:
        $ref: '#/definitions/fileResponseBody'
  FileGenerateMainTableRequestBody:
    title: FileGenerateMainTableRequestBody
    type: object
    properties:
      fileId:
        type: integer
        description: 文件ID
        required:
        - fileId
  FileGenerateMainTableResponseBody:
    title: 'Mediatype identifier: FileGenerateMainTableResponseBody'
    type: object
    properties:
      file:
        $ref: '#/definitions/fileResponseBody'
  FileGetFileResponseBody:
    title: 'Mediatype identifier: FileGetFileResponseBody'
    type: object
    properties:
      file:
        $ref: '#/definitions/fileResponseBody'
  FileListFileResponseBody:
    title: 'Mediatype identifier: FileListFileResponseBody'
    type: object
    properties:
      count:
        type: integer
        description: 匹配数目
        required:
        - count
      files:
        type: array
        items:
          $ref: '#/definitions/fileResponseBody'
        required:
        - files
  FileLoadDataTableRequestBody:
    title: FileLoadDataTableRequestBody
    type: object
    properties:
      fileId:
        type: integer
        description: 文件ID
        required:
        - fileId
  FileLoadDataTableResponseBody:
    title: 'Mediatype identifier: FileLoadDataTableResponseBody'
    type: object
    properties:
      file:
        $ref: '#/definitions/fileResponseBody'
  FileRemoveFileResponseBody:
    title: 'Mediatype identifier: FileRemoveFileResponseBody'
    type: object
    properties:
      file:
        $ref: '#/definitions/fileResponseBody'
  FileUpdateFileResponseBody:
    title: 'Mediatype identifier: FileUpdateFileResponseBody'
    type: object
    properties:
      file:
        $ref: '#/definitions/fileResponseBody'
  fileResponseBody:
    title: fileResponseBody
    type: object
    properties:
      createdAt:
        type: string
        description: 创建时间
        required:
        - createdAt
      deletedAt:
        type: string
        description: 删除时间
        required:
        - deletedAt
      fileId:
        type: integer
        description: 文件ID
        required:
        - fileId
      fileInfo:
        type: string
        description: 文件信息
        required:
        - fileInfo
      fileType:
        type: string
        description: 文件类型
        required:
        - fileType
      operator:
        type: string
        description: 操作人
        required:
        - operator
      sourceFileId:
        type: string
        description: 源文件Id(FileType为TemporaryFile或VerifiedFile时有值)
        required:
        - sourceFileId
      updatedAt:
        type: string
        description: 更新时间
        required:
        - updatedAt
      version:
        type: integer
        description: 版本
        required:
        - version
    description: 文件