---
openapi: 3.1.0
info:
  title: Flexmodel API
  version: 0.0.1
  description: FlexModel服务器API，提供模型管理和系统监控功能
paths:
  /api/f/ai/chat/completions:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ChatRequest"
        required: true
      responses:
        "200":
          description: OK
        "400":
          $ref: "#/components/responses/BadRequest"
        "500":
          $ref: "#/components/responses/InternalError"
      summary: Chat Completions
      tags:
      - Ai Chat Resource
      parameters:
      - name: X-Tenant-Id
        in: header
      security:
      - BearerAuth: []
  /api/f/ai/chat/conversations:
    get:
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/AiChatConversation"
        "500":
          $ref: "#/components/responses/InternalError"
        "400":
          $ref: "#/components/responses/BadRequest"
      summary: List Conversations
      tags:
      - Ai Chat Resource
      parameters:
      - name: X-Tenant-Id
        in: header
      security:
      - BearerAuth: []
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateConversationRequest"
        required: true
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AiChatConversation"
        "400":
          $ref: "#/components/responses/BadRequest"
        "500":
          $ref: "#/components/responses/InternalError"
      summary: Create Conversation
      tags:
      - Ai Chat Resource
      parameters:
      - name: X-Tenant-Id
        in: header
      security:
      - BearerAuth: []
  /api/f/ai/chat/conversations/{id}:
    get:
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      - name: X-Tenant-Id
        in: header
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AiChatConversation"
        "500":
          $ref: "#/components/responses/InternalError"
        "400":
          $ref: "#/components/responses/BadRequest"
      summary: Get Conversation
      tags:
      - Ai Chat Resource
      security:
      - BearerAuth: []
    delete:
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      - name: X-Tenant-Id
        in: header
      responses:
        "204":
          description: No Content
        "500":
          $ref: "#/components/responses/InternalError"
        "400":
          $ref: "#/components/responses/BadRequest"
      summary: Delete Conversation
      tags:
      - Ai Chat Resource
      security:
      - BearerAuth: []
  /api/f/ai/chat/conversations/{id}/messages:
    post:
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      - name: X-Tenant-Id
        in: header
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SendMessageRequest"
        required: true
      responses:
        "200":
          description: OK
        "400":
          $ref: "#/components/responses/BadRequest"
        "500":
          $ref: "#/components/responses/InternalError"
      summary: Send Message
      tags:
      - Ai Chat Resource
      security:
      - BearerAuth: []
    get:
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      - name: X-Tenant-Id
        in: header
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/AiChatMessage"
        "500":
          $ref: "#/components/responses/InternalError"
        "400":
          $ref: "#/components/responses/BadRequest"
      summary: List Messages
      tags:
      - Ai Chat Resource
      security:
      - BearerAuth: []
  /api/f/apis:
    get:
      summary: 获取接口定义列表
      tags:
      - 【Flexmodel】接口定义
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiDefinitionTreeSchema"
        "500":
          $ref: "#/components/responses/InternalError"
        "400":
          $ref: "#/components/responses/BadRequest"
      parameters:
      - name: X-Tenant-Id
        in: header
      security:
      - BearerAuth: []
    post:
      summary: 创建接口定义
      tags:
      - 【Flexmodel】接口定义
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ApiDefinitionSchema"
        required: true
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiDefinitionSchema"
        "400":
          $ref: "#/components/responses/BadRequest"
        "500":
          $ref: "#/components/responses/InternalError"
      parameters:
      - name: X-Tenant-Id
        in: header
      security:
      - BearerAuth: []
  /api/f/apis/generate:
    post:
      summary: 根据模型生成接口定义
      tags:
      - 【Flexmodel】接口定义
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/GenerateAPIsDTO"
        required: true
      responses:
        "201":
          description: Created
        "400":
          $ref: "#/components/responses/BadRequest"
        "500":
          $ref: "#/components/responses/InternalError"
      parameters:
      - name: X-Tenant-Id
        in: header
      security:
      - BearerAuth: []
  /api/f/apis/{apiDefinitionId}/histories:
    get:
      tags:
      - 【Flexmodel】接口定义
      parameters:
      - name: apiDefinitionId
        in: path
        required: true
        schema:
          type: string
      - name: X-Tenant-Id
        in: header
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/ApiDefinitionHistory"
        "500":
          $ref: "#/components/responses/InternalError"
        "400":
          $ref: "#/components/responses/BadRequest"
      summary: Find Api Definition Histories
      security:
      - BearerAuth: []
  /api/f/apis/{apiDefinitionId}/histories/{historyId}/restore:
    post:
      summary: 恢复接口定义
      tags:
      - 【Flexmodel】接口定义
      parameters:
      - name: apiDefinitionId
        in: path
        required: true
        schema:
          type: string
      - name: historyId
        in: path
        required: true
        schema:
          type: string
      - name: X-Tenant-Id
        in: header
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiDefinitionHistory"
        "500":
          $ref: "#/components/responses/InternalError"
        "400":
          $ref: "#/components/responses/BadRequest"
      security:
      - BearerAuth: []
  /api/f/apis/{id}:
    patch:
      summary: 更新接口定义(局部更新)
      tags:
      - 【Flexmodel】接口定义
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      - name: X-Tenant-Id
        in: header
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ApiDefinitionSchema"
        required: true
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiDefinitionSchema"
        "500":
          $ref: "#/components/responses/InternalError"
        "400":
          $ref: "#/components/responses/BadRequest"
      security:
      - BearerAuth: []
    put:
      summary: 更新接口定义
      tags:
      - 【Flexmodel】接口定义
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      - name: X-Tenant-Id
        in: header
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ApiDefinitionSchema"
        required: true
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiDefinitionSchema"
        "400":
          $ref: "#/components/responses/BadRequest"
        "500":
          $ref: "#/components/responses/InternalError"
      security:
      - BearerAuth: []
    delete:
      summary: 删除接口定义
      tags:
      - 【Flexmodel】接口定义
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      - name: X-Tenant-Id
        in: header
      responses:
        "204":
          description: No Content
        "500":
          $ref: "#/components/responses/InternalError"
        "400":
          $ref: "#/components/responses/BadRequest"
      security:
      - BearerAuth: []
  /api/f/auth/login:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/LoginRequest"
        required: true
      responses:
        "200":
          description: OK
        "400":
          $ref: "#/components/responses/BadRequest"
        "500":
          $ref: "#/components/responses/InternalError"
      summary: Login
      tags:
      - Auth Resource
      parameters:
      - name: X-Tenant-Id
        in: header
      security:
      - BearerAuth: []
  /api/f/auth/refresh:
    post:
      parameters:
      - name: refreshToken
        in: cookie
        schema:
          type: string
      - name: X-Tenant-Id
        in: header
      responses:
        "200":
          description: OK
        "500":
          $ref: "#/components/responses/InternalError"
        "400":
          $ref: "#/components/responses/BadRequest"
      summary: Refresh
      tags:
      - Auth Resource
      security:
      - BearerAuth: []
  /api/f/auth/whoami:
    get:
      responses:
        "200":
          description: OK
        "500":
          $ref: "#/components/responses/InternalError"
        "400":
          $ref: "#/components/responses/BadRequest"
      summary: Get User Info
      tags:
      - Auth Resource
      parameters:
      - name: X-Tenant-Id
        in: header
      security:
      - BearerAuth: []
  /api/f/codegen/templates:
    get:
      tags:
      - 【Flexmodel】生成器
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/TemplateInfo"
        "500":
          $ref: "#/components/responses/InternalError"
        "400":
          $ref: "#/components/responses/BadRequest"
      summary: Get Templates
      parameters:
      - name: X-Tenant-Id
        in: header
      security:
      - BearerAuth: []
  /api/f/codegen/{template}.zip:
    get:
      tags:
      - 【Flexmodel】生成器
      parameters:
      - name: template
        in: path
        required: true
        schema:
          type: string
      - name: datasource
        in: query
        schema:
          type: string
      - name: variables
        in: query
        schema:
          type: string
      - name: X-Tenant-Id
        in: header
      responses:
        "200":
          description: OK
        "500":
          $ref: "#/components/responses/InternalError"
        "400":
          $ref: "#/components/responses/BadRequest"
      summary: Generate
      security:
      - BearerAuth: []
  /api/f/datasources:
    get:
      summary: 获取所有数据源
      tags:
      - 【Flexmodel】数据源
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/DatasourceSchema"
        "500":
          $ref: "#/components/responses/InternalError"
        "400":
          $ref: "#/components/responses/BadRequest"
      parameters:
      - name: X-Tenant-Id
        in: header
      security:
      - BearerAuth: []
    post:
      summary: 创建数据源
      tags:
      - 【Flexmodel】数据源
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/DatasourceSchema"
        required: true
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DatasourceSchema"
        "400":
          $ref: "#/components/responses/BadRequest"
        "500":
          $ref: "#/components/responses/InternalError"
      parameters:
      - name: X-Tenant-Id
        in: header
      security:
      - BearerAuth: []
  /api/f/datasources/physics/names:
    post:
      summary: 获取物理数据库表名称
      tags:
      - 【Flexmodel】数据源
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/DatasourceSchema"
        required: true
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  type: string
        "400":
          $ref: "#/components/responses/BadRequest"
        "500":
          $ref: "#/components/responses/InternalError"
      parameters:
      - name: X-Tenant-Id
        in: header
      security:
      - BearerAuth: []
  /api/f/datasources/validate:
    post:
      summary: 验证数据源连接
      tags:
      - 【Flexmodel】数据源
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/DatasourceSchema"
        required: true
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                properties:
                  success:
                    description: 是否成功
                  errorMsg:
                    description: 错误消息
                  time:
                    description: 耗时
        "400":
          $ref: "#/components/responses/BadRequest"
        "500":
          $ref: "#/components/responses/InternalError"
      parameters:
      - name: X-Tenant-Id
        in: header
      security:
      - BearerAuth: []
  /api/f/datasources/{datasourceName}:
    put:
      summary: 更新数据源
      tags:
      - 【Flexmodel】数据源
      parameters:
      - description: 数据源名称
        in: path
        name: datasourceName
        required: true
        schema:
          type: string
      - name: X-Tenant-Id
        in: header
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/DatasourceSchema"
        required: true
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DatasourceSchema"
        "400":
          $ref: "#/components/responses/BadRequest"
        "500":
          $ref: "#/components/responses/InternalError"
      security:
      - BearerAuth: []
    delete:
      summary: 删除数据源
      tags:
      - 【Flexmodel】数据源
      parameters:
      - description: 数据源名称
        in: path
        name: datasourceName
        required: true
        schema:
          type: string
      - name: X-Tenant-Id
        in: header
      responses:
        "204":
          description: No Content
        "500":
          $ref: "#/components/responses/InternalError"
        "400":
          $ref: "#/components/responses/BadRequest"
      security:
      - BearerAuth: []
  /api/f/datasources/{datasourceName}/import:
    post:
      summary: 导入模型到数据源
      tags:
      - 【Flexmodel】数据源
      parameters:
      - description: 数据源名称
        in: path
        name: datasourceName
        required: true
        schema:
          type: string
      - name: X-Tenant-Id
        in: header
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ImportScriptRequest"
        required: true
      responses:
        "201":
          description: Created
        "400":
          $ref: "#/components/responses/BadRequest"
        "500":
          $ref: "#/components/responses/InternalError"
      security:
      - BearerAuth: []
  /api/f/datasources/{datasourceName}/models:
    parameters:
    - description: 数据源名称
      in: path
      name: datasourceName
      required: true
      schema:
        type: string
    get:
      summary: 获取模型列表
      tags:
      - 【Flexmodel】模型
      responses:
        "200":
          description: OK
          content:
            application/json:
              examples:
                实体:
                  value:
                  - type: entity
                    name: Student
                    fields:
                    - name: id
                      type: Long
                      identity: true
                      modelName: Student
                      unique: false
                      nullable: true
                    - name: studentName
                      type: String
                      modelName: Student
                      unique: false
                      nullable: true
                      length: 255
                    - name: gender
                      type: EnumRef
                      from: UserGender
                      multiple: false
                      modelName: Student
                      unique: false
                      nullable: true
                    - name: interest
                      type: EnumRef
                      from: user_interest
                      multiple: true
                      modelName: Student
                      unique: false
                      nullable: true
                    - name: age
                      type: Int
                      modelName: Student
                      unique: false
                      nullable: true
                    - name: classId
                      type: Long
                      modelName: Student
                      unique: false
                      nullable: true
                    - name: studentDetail
                      type: Relation
                      modelName: Student
                      unique: false
                      nullable: true
                      multiple: false
                      from: StudentDetail
                      localField: id
                      foreignField: studentId
                      cascadeDelete: true
                    indexes:
                    - modelName: Student
                      name: IDX_studentName
                      fields:
                      - fieldName: studentName
                        direction: ASC
                      unique: false
                枚举:
                  value:
                  - name: UserGender
                    type: enum
                    elements:
                    - UNKNOWN
                    - MALE
                    - FEMALE
                    comment: 性别
                本地查询:
                  value:
                  - name: 分组查询
                    type: native_query
                    statement: "select count(id) as total, gender, max(age) as ageSum\
                      \ from Student group by gender"
              schema:
                anyOf:
                - $ref: "#/components/schemas/EnumSchema"
                - $ref: "#/components/schemas/NativeQuerySchema"
                - $ref: "#/components/schemas/EntitySchema"
        "500":
          $ref: "#/components/responses/InternalError"
        "400":
          $ref: "#/components/responses/BadRequest"
      parameters:
      - name: X-Tenant-Id
        in: header
      security:
      - BearerAuth: []
    post:
      summary: 创建模型
      tags:
      - 【Flexmodel】模型
      requestBody:
        content:
          application/json:
            examples:
              实体:
                value:
                  type: entity
                  name: Student
                  fields:
                  - name: id
                    type: Long
                    identity: true
                    modelName: Student
                    unique: false
                    nullable: true
                  - name: studentName
                    type: String
                    modelName: Student
                    unique: false
                    nullable: true
                    length: 255
                  - name: gender
                    type: EnumRef
                    from: UserGender
                    multiple: false
                    modelName: Student
                    unique: false
                    nullable: true
                  - name: interest
                    type: EnumRef
                    from: user_interest
                    multiple: true
                    modelName: Student
                    unique: false
                    nullable: true
                  - name: age
                    type: Int
                    modelName: Student
                    unique: false
                    nullable: true
                  - name: classId
                    type: Long
                    modelName: Student
                    unique: false
                    nullable: true
                  - name: studentDetail
                    type: Relation
                    modelName: Student
                    unique: false
                    nullable: true
                    multiple: false
                    from: StudentDetail
                    localField: id
                    foreignField: studentId
                    cascadeDelete: true
                  indexes:
                  - modelName: Student
                    name: IDX_studentName
                    fields:
                    - fieldName: studentName
                      direction: ASC
                    unique: false
              枚举:
                value:
                  name: UserGender
                  type: enum
                  elements:
                  - UNKNOWN
                  - MALE
                  - FEMALE
                  comment: 性别
              本地查询:
                value:
                  name: 分组查询
                  type: native_query
                  statement: "select count(id) as total, gender, max(age) as ageSum\
                    \ from Student group by gender"
            schema:
              anyOf:
              - $ref: "#/components/schemas/EnumSchema"
              - $ref: "#/components/schemas/NativeQuerySchema"
              - $ref: "#/components/schemas/EntitySchema"
        required: true
      responses:
        "200":
          description: OK
          content:
            application/json:
              examples:
                实体:
                  value:
                    type: entity
                    name: Student
                    fields:
                    - name: id
                      type: Long
                      identity: true
                      modelName: Student
                      unique: false
                      nullable: true
                    - name: studentName
                      type: String
                      modelName: Student
                      unique: false
                      nullable: true
                      length: 255
                    - name: gender
                      type: EnumRef
                      from: UserGender
                      multiple: false
                      modelName: Student
                      unique: false
                      nullable: true
                    - name: interest
                      type: EnumRef
                      from: user_interest
                      multiple: true
                      modelName: Student
                      unique: false
                      nullable: true
                    - name: age
                      type: Int
                      modelName: Student
                      unique: false
                      nullable: true
                    - name: classId
                      type: Long
                      modelName: Student
                      unique: false
                      nullable: true
                    - name: studentDetail
                      type: Relation
                      modelName: Student
                      unique: false
                      nullable: true
                      multiple: false
                      from: StudentDetail
                      localField: id
                      foreignField: studentId
                      cascadeDelete: true
                    indexes:
                    - modelName: Student
                      name: IDX_studentName
                      fields:
                      - fieldName: studentName
                        direction: ASC
                      unique: false
                枚举:
                  value:
                    name: UserGender
                    type: enum
                    elements:
                    - UNKNOWN
                    - MALE
                    - FEMALE
                    comment: 性别
                本地查询:
                  value:
                    name: 分组查询
                    type: native_query
                    statement: "select count(id) as total, gender, max(age) as ageSum\
                      \ from Student group by gender"
              schema:
                anyOf:
                - $ref: "#/components/schemas/EnumSchema"
                - $ref: "#/components/schemas/NativeQuerySchema"
                - $ref: "#/components/schemas/EntitySchema"
        "400":
          $ref: "#/components/responses/BadRequest"
        "500":
          $ref: "#/components/responses/InternalError"
      parameters:
      - name: X-Tenant-Id
        in: header
      security:
      - BearerAuth: []
  /api/f/datasources/{datasourceName}/models/idl/execute:
    parameters:
    - description: 数据源名称
      in: path
      name: datasourceName
      required: true
      schema:
        type: string
    post:
      tags:
      - 【Flexmodel】模型
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/IdlRequest"
        required: true
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/SchemaObject"
        "400":
          $ref: "#/components/responses/BadRequest"
        "500":
          $ref: "#/components/responses/InternalError"
      summary: Execute Idl
      parameters:
      - name: X-Tenant-Id
        in: header
      security:
      - BearerAuth: []
  /api/f/datasources/{datasourceName}/models/{modelName}:
    parameters:
    - description: 数据源名称
      in: path
      name: datasourceName
      required: true
      schema:
        type: string
    put:
      summary: 更新模型
      tags:
      - 【Flexmodel】模型
      parameters:
      - description: 模型名称
        in: path
        name: modelName
        required: true
        schema:
          type: string
      - name: X-Tenant-Id
        in: header
      requestBody:
        content:
          application/json:
            examples:
              实体:
                value:
                  type: entity
                  name: Student
                  fields:
                  - name: id
                    type: Long
                    identity: true
                    modelName: Student
                    unique: false
                    nullable: true
                  - name: studentName
                    type: String
                    modelName: Student
                    unique: false
                    nullable: true
                    length: 255
                  - name: gender
                    type: EnumRef
                    from: UserGender
                    multiple: false
                    modelName: Student
                    unique: false
                    nullable: true
                  - name: interest
                    type: EnumRef
                    from: user_interest
                    multiple: true
                    modelName: Student
                    unique: false
                    nullable: true
                  - name: age
                    type: Int
                    modelName: Student
                    unique: false
                    nullable: true
                  - name: classId
                    type: Long
                    modelName: Student
                    unique: false
                    nullable: true
                  - name: studentDetail
                    type: Relation
                    modelName: Student
                    unique: false
                    nullable: true
                    multiple: false
                    from: StudentDetail
                    localField: id
                    foreignField: studentId
                    cascadeDelete: true
                  indexes:
                  - modelName: Student
                    name: IDX_studentName
                    fields:
                    - fieldName: studentName
                      direction: ASC
                    unique: false
              枚举:
                value:
                  name: UserGender
                  type: enum
                  elements:
                  - UNKNOWN
                  - MALE
                  - FEMALE
                  comment: 性别
              本地查询:
                value:
                  name: 分组查询
                  type: native_query
                  statement: "select count(id) as total, gender, max(age) as ageSum\
                    \ from Student group by gender"
            schema:
              anyOf:
              - $ref: "#/components/schemas/EnumSchema"
              - $ref: "#/components/schemas/NativeQuerySchema"
              - $ref: "#/components/schemas/EntitySchema"
        required: true
      responses:
        "200":
          description: OK
          content:
            application/json:
              examples:
                实体:
                  value:
                    type: entity
                    name: Student
                    fields:
                    - name: id
                      type: Long
                      identity: true
                      modelName: Student
                      unique: false
                      nullable: true
                    - name: studentName
                      type: String
                      modelName: Student
                      unique: false
                      nullable: true
                      length: 255
                    - name: gender
                      type: EnumRef
                      from: UserGender
                      multiple: false
                      modelName: Student
                      unique: false
                      nullable: true
                    - name: interest
                      type: EnumRef
                      from: user_interest
                      multiple: true
                      modelName: Student
                      unique: false
                      nullable: true
                    - name: age
                      type: Int
                      modelName: Student
                      unique: false
                      nullable: true
                    - name: classId
                      type: Long
                      modelName: Student
                      unique: false
                      nullable: true
                    - name: studentDetail
                      type: Relation
                      modelName: Student
                      unique: false
                      nullable: true
                      multiple: false
                      from: StudentDetail
                      localField: id
                      foreignField: studentId
                      cascadeDelete: true
                    indexes:
                    - modelName: Student
                      name: IDX_studentName
                      fields:
                      - fieldName: studentName
                        direction: ASC
                      unique: false
                枚举:
                  value:
                    name: UserGender
                    type: enum
                    elements:
                    - UNKNOWN
                    - MALE
                    - FEMALE
                    comment: 性别
                本地查询:
                  value:
                    name: 分组查询
                    type: native_query
                    statement: "select count(id) as total, gender, max(age) as ageSum\
                      \ from Student group by gender"
              schema:
                anyOf:
                - $ref: "#/components/schemas/EnumSchema"
                - $ref: "#/components/schemas/NativeQuerySchema"
                - $ref: "#/components/schemas/EntitySchema"
        "400":
          $ref: "#/components/responses/BadRequest"
        "500":
          $ref: "#/components/responses/InternalError"
      security:
      - BearerAuth: []
    get:
      summary: 获取单个模型
      tags:
      - 【Flexmodel】模型
      parameters:
      - name: modelName
        in: path
        required: true
        schema:
          type: string
      - name: X-Tenant-Id
        in: header
      responses:
        "200":
          description: OK
          content:
            application/json:
              examples:
                实体:
                  value:
                    type: entity
                    name: Student
                    fields:
                    - name: id
                      type: Long
                      identity: true
                      modelName: Student
                      unique: false
                      nullable: true
                    - name: studentName
                      type: String
                      modelName: Student
                      unique: false
                      nullable: true
                      length: 255
                    - name: gender
                      type: EnumRef
                      from: UserGender
                      multiple: false
                      modelName: Student
                      unique: false
                      nullable: true
                    - name: interest
                      type: EnumRef
                      from: user_interest
                      multiple: true
                      modelName: Student
                      unique: false
                      nullable: true
                    - name: age
                      type: Int
                      modelName: Student
                      unique: false
                      nullable: true
                    - name: classId
                      type: Long
                      modelName: Student
                      unique: false
                      nullable: true
                    - name: studentDetail
                      type: Relation
                      modelName: Student
                      unique: false
                      nullable: true
                      multiple: false
                      from: StudentDetail
                      localField: id
                      foreignField: studentId
                      cascadeDelete: true
                    indexes:
                    - modelName: Student
                      name: IDX_studentName
                      fields:
                      - fieldName: studentName
                        direction: ASC
                      unique: false
                枚举:
                  value:
                    name: UserGender
                    type: enum
                    elements:
                    - UNKNOWN
                    - MALE
                    - FEMALE
                    comment: 性别
                本地查询:
                  value:
                    name: 分组查询
                    type: native_query
                    statement: "select count(id) as total, gender, max(age) as ageSum\
                      \ from Student group by gender"
              schema:
                anyOf:
                - $ref: "#/components/schemas/EnumSchema"
                - $ref: "#/components/schemas/NativeQuerySchema"
                - $ref: "#/components/schemas/EntitySchema"
        "500":
          $ref: "#/components/responses/InternalError"
        "400":
          $ref: "#/components/responses/BadRequest"
      security:
      - BearerAuth: []
    delete:
      summary: 删除模型
      tags:
      - 【Flexmodel】模型
      parameters:
      - description: 模型名称
        in: path
        name: modelName
        required: true
        schema:
          type: string
      - name: X-Tenant-Id
        in: header
      responses:
        "204":
          description: No Content
        "500":
          $ref: "#/components/responses/InternalError"
        "400":
          $ref: "#/components/responses/BadRequest"
      security:
      - BearerAuth: []
  /api/f/datasources/{datasourceName}/models/{modelName}/fields:
    parameters:
    - description: 数据源名称
      in: path
      name: datasourceName
      required: true
      schema:
        type: string
    post:
      summary: 创建字段
      tags:
      - 【Flexmodel】模型
      parameters:
      - description: 模型名称
        in: path
        name: modelName
        required: true
        schema:
          type: string
      - name: X-Tenant-Id
        in: header
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/TypedFieldSchema"
        required: true
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TypedFieldSchema"
        "400":
          $ref: "#/components/responses/BadRequest"
        "500":
          $ref: "#/components/responses/InternalError"
      security:
      - BearerAuth: []
  /api/f/datasources/{datasourceName}/models/{modelName}/fields/{fieldName}:
    parameters:
    - description: 数据源名称
      in: path
      name: datasourceName
      required: true
      schema:
        type: string
    put:
      summary: 更新字段
      tags:
      - 【Flexmodel】模型
      parameters:
      - description: 模型名称
        in: path
        name: modelName
        required: true
        schema:
          type: string
      - description: 字段名称
        in: path
        name: fieldName
        required: true
        schema:
          type: string
      - name: X-Tenant-Id
        in: header
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/TypedFieldSchema"
        required: true
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TypedFieldSchema"
        "400":
          $ref: "#/components/responses/BadRequest"
        "500":
          $ref: "#/components/responses/InternalError"
      security:
      - BearerAuth: []
    delete:
      summary: 删除字段
      tags:
      - 【Flexmodel】模型
      parameters:
      - description: 模型名称
        in: path
        name: modelName
        required: true
        schema:
          type: string
      - description: 字段名称
        in: path
        name: fieldName
        required: true
        schema:
          type: string
      - name: X-Tenant-Id
        in: header
      responses:
        "204":
          description: No Content
        "500":
          $ref: "#/components/responses/InternalError"
        "400":
          $ref: "#/components/responses/BadRequest"
      security:
      - BearerAuth: []
  /api/f/datasources/{datasourceName}/models/{modelName}/indexes:
    parameters:
    - description: 数据源名称
      in: path
      name: datasourceName
      required: true
      schema:
        type: string
    post:
      summary: 创建索引
      tags:
      - 【Flexmodel】模型
      parameters:
      - description: 模型名称
        in: path
        name: modelName
        required: true
        schema:
          type: string
      - name: X-Tenant-Id
        in: header
      requestBody:
        content:
          application/json:
            examples: {}
            schema:
              $ref: "#/components/schemas/IndexSchema"
        required: true
      responses:
        "200":
          description: OK
          content:
            application/json:
              examples: {}
              schema:
                $ref: "#/components/schemas/IndexSchema"
        "400":
          $ref: "#/components/responses/BadRequest"
        "500":
          $ref: "#/components/responses/InternalError"
      security:
      - BearerAuth: []
  /api/f/datasources/{datasourceName}/models/{modelName}/indexes/{indexName}:
    parameters:
    - description: 数据源名称
      in: path
      name: datasourceName
      required: true
      schema:
        type: string
    put:
      summary: 更新索引
      tags:
      - 【Flexmodel】模型
      parameters:
      - description: 模型名称
        in: path
        name: modelName
        required: true
        schema:
          type: string
      - description: 索引名称
        in: path
        name: indexName
        required: true
        schema:
          type: string
      - name: X-Tenant-Id
        in: header
      requestBody:
        content:
          application/json:
            examples: {}
            schema:
              $ref: "#/components/schemas/IndexSchema"
        required: true
      responses:
        "200":
          description: OK
          content:
            application/json:
              examples: {}
              schema:
                $ref: "#/components/schemas/IndexSchema"
        "400":
          $ref: "#/components/responses/BadRequest"
        "500":
          $ref: "#/components/responses/InternalError"
      security:
      - BearerAuth: []
    delete:
      summary: 删除索引
      tags:
      - 【Flexmodel】模型
      parameters:
      - description: 模型名称
        in: path
        name: modelName
        required: true
        schema:
          type: string
      - description: 索引名称
        in: path
        name: indexName
        required: true
        schema:
          type: string
      - name: X-Tenant-Id
        in: header
      responses:
        "204":
          description: No Content
        "500":
          $ref: "#/components/responses/InternalError"
        "400":
          $ref: "#/components/responses/BadRequest"
      security:
      - BearerAuth: []
  /api/f/datasources/{datasourceName}/models/{modelName}/records:
    parameters:
    - description: 模型名称
      in: path
      name: datasourceName
      required: true
      schema:
        type: string
    - name: modelName
      in: path
      required: true
      schema:
        type: string
    get:
      summary: 获取模型数据记录列表
      tags:
      - 【Flexmodel】记录
      parameters:
      - description: 当前页，默认值：1
        examples: {}
        in: query
        name: page
        schema:
          type: integer
          format: int32
          default: 1
      - description: 第几页，默认值：15
        examples: {}
        in: query
        name: size
        schema:
          type: integer
          format: int32
          default: 15
      - description: 查询条件，更多信息见查询条件文档
        examples: {}
        in: query
        name: filter
        schema:
          type: string
      - description: 是否开启嵌套子查询，开启则查询关联数据，只查询5层，默认值false
        examples: {}
        in: query
        name: nestedQuery
        schema:
          type: boolean
          default: false
      - description: 排序
        examples: {}
        in: query
        name: sort
        schema:
          type: string
      - name: X-Tenant-Id
        in: header
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                properties:
                  total:
                    description: 总数
                  list:
                    type: array
                    items:
                      type: object
                    description: 日志列表
        "500":
          $ref: "#/components/responses/InternalError"
        "400":
          $ref: "#/components/responses/BadRequest"
      security:
      - BearerAuth: []
    post:
      summary: 创建模型数据记录
      tags:
      - 【Flexmodel】记录
      requestBody:
        content:
          application/json:
            examples:
              请求示例，可包含关联数据，关联数据有Id字段则更新这条关联记录:
                value:
                  studentName: 张三
                  gender: MALE
                  interest:
                  - chang
                  - tiao
                  - rap
                  - daLanQiu
                  age: 10
                  classId: 1
                  studentDetail:
                    description: 张三的描述
                  courses:
                  - courseNo: Math
                    courseName: 数学
                  - courseNo: YuWen
                    courseName: 语文
                  - courseNo: Eng
                    courseName: 英语
            schema:
              type: object
              additionalProperties: {}
        required: true
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
        "400":
          $ref: "#/components/responses/BadRequest"
        "500":
          $ref: "#/components/responses/InternalError"
      parameters:
      - name: X-Tenant-Id
        in: header
      security:
      - BearerAuth: []
  /api/f/datasources/{datasourceName}/models/{modelName}/records/{id}:
    parameters:
    - description: 模型名称
      in: path
      name: datasourceName
      required: true
      schema:
        type: string
    - name: modelName
      in: path
      required: true
      schema:
        type: string
    patch:
      summary: 更新模型数据记录(局部更新)
      tags:
      - 【Flexmodel】记录
      parameters:
      - description: ID
        examples: {}
        in: path
        name: id
        required: true
        schema:
          type: string
      - name: X-Tenant-Id
        in: header
      requestBody:
        content:
          application/json:
            examples:
              请求示例，可包含关联数据，关联数据有Id字段则更新这条关联记录:
                value:
                  studentName: 张三
                  gender: MALE
                  interest:
                  - chang
                  - tiao
                  - rap
                  - daLanQiu
                  age: 10
                  classId: 1
                  studentDetail:
                    description: 张三的描述
                  courses:
                  - courseNo: Math
                    courseName: 数学
                  - courseNo: YuWen
                    courseName: 语文
                  - courseNo: Eng
                    courseName: 英语
            schema:
              type: object
              additionalProperties: {}
        required: true
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
        "500":
          $ref: "#/components/responses/InternalError"
        "400":
          $ref: "#/components/responses/BadRequest"
      security:
      - BearerAuth: []
    put:
      summary: 更新模型数据记录
      tags:
      - 【Flexmodel】记录
      parameters:
      - description: ID
        examples: {}
        in: path
        name: id
        required: true
        schema:
          type: string
      - name: X-Tenant-Id
        in: header
      requestBody:
        content:
          application/json:
            examples:
              请求示例，可包含关联数据，关联数据有Id字段则更新这条关联记录:
                value:
                  id: 1
                  studentName: 张三
                  gender: MALE
                  interest:
                  - chang
                  - tiao
                  - rap
                  - daLanQiu
                  age: 10
                  classId: 1
                  studentDetail:
                    description: 张三的描述
                  courses:
                  - courseNo: Math
                    courseName: 数学
                  - courseNo: YuWen
                    courseName: 语文
                  - courseNo: Eng
                    courseName: 英语
            schema:
              type: object
              additionalProperties: {}
        required: true
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
        "400":
          $ref: "#/components/responses/BadRequest"
        "500":
          $ref: "#/components/responses/InternalError"
      security:
      - BearerAuth: []
    get:
      summary: 获取单条模型数据记录
      tags:
      - 【Flexmodel】记录
      parameters:
      - description: ID
        examples: {}
        in: path
        name: id
        required: true
        schema:
          type: string
      - name: nestedQuery
        in: query
        schema:
          type: boolean
          default: false
      - name: X-Tenant-Id
        in: header
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
        "500":
          $ref: "#/components/responses/InternalError"
        "400":
          $ref: "#/components/responses/BadRequest"
      security:
      - BearerAuth: []
    delete:
      summary: 删除模型数据记录
      tags:
      - 【Flexmodel】记录
      parameters:
      - description: ID
        examples: {}
        in: path
        name: id
        required: true
        schema:
          type: string
      - name: X-Tenant-Id
        in: header
      responses:
        "204":
          description: No Content
        "500":
          $ref: "#/components/responses/InternalError"
        "400":
          $ref: "#/components/responses/BadRequest"
      security:
      - BearerAuth: []
  /api/f/datasources/{datasourceName}/native-query:
    post:
      summary: 执行原生查询
      tags:
      - 【Flexmodel】数据源
      parameters:
      - description: 数据源名称
        in: path
        name: datasourceName
        required: true
        schema:
          type: string
      - name: X-Tenant-Id
        in: header
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ExecuteNativeQueryRequest"
        required: true
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                properties:
                  time:
                    description: 执行耗时
                  result:
                    description: 返回结果
        "400":
          $ref: "#/components/responses/BadRequest"
        "500":
          $ref: "#/components/responses/InternalError"
      security:
      - BearerAuth: []
  /api/f/datasources/{datasourceName}/sync:
    post:
      summary: 从数据源同步物理表到建模
      tags:
      - 【Flexmodel】数据源
      parameters:
      - description: 数据源名称
        in: path
        name: datasourceName
        required: true
        schema:
          type: string
      - name: X-Tenant-Id
        in: header
      requestBody:
        content:
          application/json:
            schema:
              type: array
              uniqueItems: true
              items:
                type: string
        required: true
      responses:
        "200":
          description: OK
          content:
            application/json:
              examples:
                实体:
                  value:
                  - type: entity
                    name: Student
                    fields:
                    - name: id
                      type: Long
                      identity: true
                      modelName: Student
                      unique: false
                      nullable: true
                    - name: studentName
                      type: String
                      modelName: Student
                      unique: false
                      nullable: true
                      length: 255
                    - name: gender
                      type: EnumRef
                      from: UserGender
                      multiple: false
                      modelName: Student
                      unique: false
                      nullable: true
                    - name: interest
                      type: EnumRef
                      from: user_interest
                      multiple: true
                      modelName: Student
                      unique: false
                      nullable: true
                    - name: age
                      type: Int
                      modelName: Student
                      unique: false
                      nullable: true
                    - name: classId
                      type: Long
                      modelName: Student
                      unique: false
                      nullable: true
                    - name: studentDetail
                      type: Relation
                      modelName: Student
                      unique: false
                      nullable: true
                      multiple: false
                      from: StudentDetail
                      localField: id
                      foreignField: studentId
                      cascadeDelete: true
                    indexes:
                    - modelName: Student
                      name: IDX_studentName
                      fields:
                      - fieldName: studentName
                        direction: ASC
                      unique: false
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/EntitySchema"
        "400":
          $ref: "#/components/responses/BadRequest"
        "500":
          $ref: "#/components/responses/InternalError"
      security:
      - BearerAuth: []
  /api/f/docs/{tenantId}/openapi.json:
    get:
      summary: 获取接口文档
      tags:
      - 【Flexmodel】接口文档
      parameters:
      - name: tenantId
        in: path
        required: true
        schema:
          type: string
      - name: X-Tenant-Id
        in: header
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
        "500":
          $ref: "#/components/responses/InternalError"
        "400":
          $ref: "#/components/responses/BadRequest"
      security:
      - BearerAuth: []
  /api/f/flows:
    get:
      summary: 获取流程列表
      tags:
      - 【Flexmodel】服务编排
      parameters:
      - description: 流程模块ID
        in: query
        name: flowKey
        schema:
          type: string
      - description: 流程名称
        in: query
        name: flowName
        schema:
          type: string
      - description: 页码
        in: query
        name: page
        schema:
          type: integer
          format: int32
          default: "1"
      - description: 每页大小
        in: query
        name: size
        schema:
          type: integer
          format: int32
          default: "20"
      - name: X-Tenant-Id
        in: header
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/FlowModuleListResponseSchema"
        "500":
          $ref: "#/components/responses/InternalError"
        "400":
          $ref: "#/components/responses/BadRequest"
      security:
      - BearerAuth: []
    post:
      summary: 创建流程
      tags:
      - 【Flexmodel】服务编排
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateFlowParamSchema"
        required: true
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CreateFlowResultSchema"
        "400":
          $ref: "#/components/responses/BadRequest"
        "500":
          $ref: "#/components/responses/InternalError"
      parameters:
      - name: X-Tenant-Id
        in: header
      security:
      - BearerAuth: []
  /api/f/flows/instances:
    get:
      summary: 获取流程实例列表
      tags:
      - 【Flexmodel】服务编排
      parameters:
      - description: 调用者
        in: query
        name: caller
        schema:
          type: string
      - description: 流程部署ID
        in: query
        name: flowDeployId
        schema:
          type: string
      - description: 流程实例ID
        in: query
        name: flowInstanceId
        schema:
          type: string
      - description: 流程模块ID
        in: query
        name: flowModuleId
        schema:
          type: string
      - description: 页码
        in: query
        name: page
        schema:
          type: integer
          format: int32
          default: "1"
      - description: 每页大小
        in: query
        name: size
        schema:
          type: integer
          format: int32
          default: "20"
      - description: 流程实例状态
        in: query
        name: status
        schema:
          type: integer
          format: int32
      - name: X-Tenant-Id
        in: header
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/FlowInstanceListResponseSchema"
        "500":
          $ref: "#/components/responses/InternalError"
        "400":
          $ref: "#/components/responses/BadRequest"
      security:
      - BearerAuth: []
  /api/f/flows/instances/start:
    post:
      summary: 启动流程实例
      tags:
      - 【Flexmodel】服务编排
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/StartProcessParamSchema"
        required: true
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StartProcessResultSchema"
        "400":
          $ref: "#/components/responses/BadRequest"
        "500":
          $ref: "#/components/responses/InternalError"
      parameters:
      - name: X-Tenant-Id
        in: header
      security:
      - BearerAuth: []
  /api/f/flows/instances/{flowInstanceId}:
    get:
      summary: 获取流程实例信息
      tags:
      - 【Flexmodel】服务编排
      parameters:
      - description: 流程实例ID
        in: path
        name: flowInstanceId
        required: true
        schema:
          type: string
      - name: X-Tenant-Id
        in: header
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/FlowInstanceSchema"
        "500":
          $ref: "#/components/responses/InternalError"
        "400":
          $ref: "#/components/responses/BadRequest"
      security:
      - BearerAuth: []
  /api/f/flows/instances/{flowInstanceId}/commit:
    post:
      summary: 提交任务
      tags:
      - 【Flexmodel】服务编排
      parameters:
      - description: 流程实例ID
        in: path
        name: flowInstanceId
        required: true
        schema:
          type: string
      - name: X-Tenant-Id
        in: header
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CommitTaskParamSchema"
        required: true
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CommitTaskResultSchema"
        "400":
          $ref: "#/components/responses/BadRequest"
        "500":
          $ref: "#/components/responses/InternalError"
      security:
      - BearerAuth: []
  /api/f/flows/instances/{flowInstanceId}/elements:
    get:
      summary: 获取流程实例历史元素列表
      description: 获取指定流程实例的历史元素列表，主要用于显示流程快照视图。包含流程中已执行的所有节点信息。
      tags:
      - 【Flexmodel】服务编排
      parameters:
      - description: 流程实例ID
        example: flow_inst_001
        in: path
        name: flowInstanceId
        required: true
        schema:
          type: string
      - name: X-Tenant-Id
        in: header
      responses:
        "200":
          description: 成功返回历史元素列表
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/ElementInstanceSchema"
        "500":
          $ref: "#/components/responses/InternalError"
        "400":
          $ref: "#/components/responses/BadRequest"
      security:
      - BearerAuth: []
  /api/f/flows/instances/{flowInstanceId}/rollback:
    post:
      summary: 回滚任务
      tags:
      - 【Flexmodel】服务编排
      parameters:
      - description: 流程实例ID
        in: path
        name: flowInstanceId
        required: true
        schema:
          type: string
      - name: X-Tenant-Id
        in: header
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/RollbackTaskParamSchema"
        required: true
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RollbackTaskResultSchema"
        "400":
          $ref: "#/components/responses/BadRequest"
        "500":
          $ref: "#/components/responses/InternalError"
      security:
      - BearerAuth: []
  /api/f/flows/instances/{flowInstanceId}/terminate:
    post:
      summary: 终止流程实例
      tags:
      - 【Flexmodel】服务编排
      parameters:
      - description: 流程实例ID
        in: path
        name: flowInstanceId
        required: true
        schema:
          type: string
      - description: 是否对子流程实例生效
        in: query
        name: effectiveForSubFlowInstance
        schema:
          type: boolean
          default: true
      - name: X-Tenant-Id
        in: header
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TerminateResultSchema"
        "500":
          $ref: "#/components/responses/InternalError"
        "400":
          $ref: "#/components/responses/BadRequest"
      security:
      - BearerAuth: []
  /api/f/flows/instances/{flowInstanceId}/user-tasks:
    get:
      summary: 获取流程实例历史用户任务列表
      description: 获取指定流程实例的历史用户任务列表，按处理时间倒序排列。包含活跃和已完成的任务，不包含已禁用的任务。
      tags:
      - 【Flexmodel】服务编排
      parameters:
      - description: 流程实例ID
        example: flow_inst_001
        in: path
        name: flowInstanceId
        required: true
        schema:
          type: string
      - description: 是否对子流程实例生效
        example: true
        in: query
        name: effectiveForSubFlowInstance
        schema:
          type: boolean
          default: true
      - name: X-Tenant-Id
        in: header
      responses:
        "200":
          description: 成功返回历史用户任务列表
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/NodeInstanceSchema"
        "500":
          $ref: "#/components/responses/InternalError"
        "400":
          $ref: "#/components/responses/BadRequest"
      security:
      - BearerAuth: []
  /api/f/flows/{flowModuleId}:
    put:
      summary: 更新流程
      tags:
      - 【Flexmodel】服务编排
      parameters:
      - description: 流程模块ID
        in: path
        name: flowModuleId
        required: true
        schema:
          type: string
      - name: X-Tenant-Id
        in: header
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateFlowParamSchema"
        required: true
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UpdateFlowResultSchema"
        "400":
          $ref: "#/components/responses/BadRequest"
        "500":
          $ref: "#/components/responses/InternalError"
      security:
      - BearerAuth: []
    get:
      summary: 获取流程模块信息
      tags:
      - 【Flexmodel】服务编排
      parameters:
      - description: 流程模块ID
        in: path
        name: flowModuleId
        required: true
        schema:
          type: string
      - description: 流程部署ID
        in: query
        name: flowDeployId
        schema:
          type: string
      - name: X-Tenant-Id
        in: header
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/FlowModuleResultSchema"
        "500":
          $ref: "#/components/responses/InternalError"
        "400":
          $ref: "#/components/responses/BadRequest"
      security:
      - BearerAuth: []
    delete:
      tags:
      - 【Flexmodel】服务编排
      parameters:
      - description: 流程模块ID
        in: path
        name: flowModuleId
        required: true
        schema:
          type: string
      - name: X-Tenant-Id
        in: header
      responses:
        "204":
          description: No Content
        "500":
          $ref: "#/components/responses/InternalError"
        "400":
          $ref: "#/components/responses/BadRequest"
      summary: Delete Flow
      security:
      - BearerAuth: []
  /api/f/flows/{flowModuleId}/deploy:
    post:
      summary: 部署流程
      tags:
      - 【Flexmodel】服务编排
      parameters:
      - description: 流程模块ID
        in: path
        name: flowModuleId
        required: true
        schema:
          type: string
      - name: X-Tenant-Id
        in: header
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/DeployFlowParamSchema"
        required: true
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DeployFlowResultSchema"
        "400":
          $ref: "#/components/responses/BadRequest"
        "500":
          $ref: "#/components/responses/InternalError"
      security:
      - BearerAuth: []
  /api/f/global/profile:
    get:
      summary: 获取系统配置
      tags:
      - 【Flexmodel】系统
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                properties:
                  env:
                    description: 环境变量
                  properties:
                    description: 配置属性
                  application:
                    description: 应用程序配置
                  settings:
                    description: 系统设置
        "500":
          $ref: "#/components/responses/InternalError"
        "400":
          $ref: "#/components/responses/BadRequest"
      parameters:
      - name: X-Tenant-Id
        in: header
      security:
      - BearerAuth: []
  /api/f/graphql:
    post:
      summary: 执行GraphQL查询
      tags:
      - 【Flexmodel】GraphQL
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/GraphQLRequest"
        required: true
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ExecutionResult"
        "400":
          $ref: "#/components/responses/BadRequest"
        "500":
          $ref: "#/components/responses/InternalError"
      parameters:
      - name: X-Tenant-Id
        in: header
      security:
      - BearerAuth: []
  /api/f/identity-providers:
    get:
      summary: 获取身份源列表
      tags:
      - 【Flexmodel】身份源
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/IdentityProviderSchema"
        "500":
          $ref: "#/components/responses/InternalError"
        "400":
          $ref: "#/components/responses/BadRequest"
      parameters:
      - name: X-Tenant-Id
        in: header
      security:
      - BearerAuth: []
    post:
      summary: 创建身份源
      tags:
      - 【Flexmodel】身份源
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/IdentityProviderSchema"
        required: true
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/IdentityProviderSchema"
        "400":
          $ref: "#/components/responses/BadRequest"
        "500":
          $ref: "#/components/responses/InternalError"
      parameters:
      - name: X-Tenant-Id
        in: header
      security:
      - BearerAuth: []
  /api/f/identity-providers/{name}:
    put:
      summary: 更新身份源
      tags:
      - 【Flexmodel】身份源
      parameters:
      - description: 名称
        in: path
        name: name
        required: true
        schema:
          type: string
      - name: X-Tenant-Id
        in: header
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/IdentityProviderSchema"
        required: true
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/IdentityProviderSchema"
        "400":
          $ref: "#/components/responses/BadRequest"
        "500":
          $ref: "#/components/responses/InternalError"
      security:
      - BearerAuth: []
    delete:
      summary: 删除身份源
      tags:
      - 【Flexmodel】身份源
      parameters:
      - description: 名称
        in: path
        name: name
        required: true
        schema:
          type: string
      - name: X-Tenant-Id
        in: header
      responses:
        "204":
          description: No Content
        "500":
          $ref: "#/components/responses/InternalError"
        "400":
          $ref: "#/components/responses/BadRequest"
      security:
      - BearerAuth: []
  /api/f/jobs/logs:
    get:
      tags:
      - 【Flexmodel】任务
      parameters:
      - name: endTime
        in: query
        schema:
          $ref: "#/components/schemas/LocalDateTime"
      - name: isSuccess
        in: query
        schema:
          type: boolean
      - name: jobId
        in: query
        schema:
          type: string
      - name: page
        in: query
        schema:
          type: integer
          format: int32
          default: "1"
      - name: size
        in: query
        schema:
          type: integer
          format: int32
          default: "20"
      - name: startTime
        in: query
        schema:
          $ref: "#/components/schemas/LocalDateTime"
      - name: status
        in: query
        schema:
          type: string
      - name: triggerId
        in: query
        schema:
          type: string
      - name: X-Tenant-Id
        in: header
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PageDTOJobExecutionLog"
        "500":
          $ref: "#/components/responses/InternalError"
        "400":
          $ref: "#/components/responses/BadRequest"
      summary: Find Log Page
      security:
      - BearerAuth: []
  /api/f/logs:
    get:
      summary: 获取接口日志列表
      tags:
      - 【Flexmodel】接口日志
      parameters:
      - description: 当前页，默认值：1
        examples: {}
        in: query
        name: current
      - description: 第几页，默认值：15
        examples: {}
        in: query
        name: pageSize
      - description: 关键字
        in: query
        name: keyword
        schema:
          type: string
      - description: 日期范围
        examples: {}
        in: query
        name: dateRange
        schema:
          type: string
      - description: 日志等级
        examples: {}
        in: query
        name: level
      - name: isSuccess
        in: query
        schema:
          type: boolean
      - name: page
        in: query
        schema:
          type: integer
          format: int32
          default: 1
      - name: size
        in: query
        schema:
          type: integer
          format: int32
          default: 50
      - name: X-Tenant-Id
        in: header
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                properties:
                  total:
                    description: 总数
                  list:
                    type: array
                    items:
                      $ref: "#/components/schemas/ApiLogSchema"
                    description: 日志列表
        "500":
          $ref: "#/components/responses/InternalError"
        "400":
          $ref: "#/components/responses/BadRequest"
      security:
      - BearerAuth: []
  /api/f/logs/stat:
    get:
      summary: 统计接口日志
      tags:
      - 【Flexmodel】接口日志
      parameters:
      - description: 关键字
        in: query
        name: keyword
        schema:
          type: string
      - description: 日期范围
        examples: {}
        in: query
        name: dateRange
        schema:
          type: string
      - description: "日志等级，支持传多个通过\",\"分隔"
        examples: {}
        in: query
        name: level
      - name: isSuccess
        in: query
        schema:
          type: boolean
      - name: X-Tenant-Id
        in: header
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/ApiLogStatSchema"
        "500":
          $ref: "#/components/responses/InternalError"
        "400":
          $ref: "#/components/responses/BadRequest"
      security:
      - BearerAuth: []
  /api/f/metrics/all:
    get:
      summary: 获取所有监控指标
      description: 获取JVM、CPU、内存、线程、磁盘、网络等所有监控信息，提供系统完整状态
      tags:
      - 【Flexmodel】系统监控
      responses:
        "200":
          description: 成功获取所有监控指标
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AllMetricsResponse"
        "500":
          $ref: "#/components/responses/InternalError"
        "400":
          $ref: "#/components/responses/BadRequest"
      security:
      - BearerAuth: []
      - BearerAuth: []
      parameters:
      - name: X-Tenant-Id
        in: header
  /api/f/metrics/cpu:
    get:
      summary: 获取CPU监控信息
      description: 返回CPU使用率、系统负载、物理内存等系统资源信息
      tags:
      - 【Flexmodel】系统监控
      responses:
        "200":
          description: 成功获取CPU信息
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CpuMetricsResponse"
        "500":
          $ref: "#/components/responses/InternalError"
        "400":
          $ref: "#/components/responses/BadRequest"
      security:
      - BearerAuth: []
      - BearerAuth: []
      parameters:
      - name: X-Tenant-Id
        in: header
  /api/f/metrics/disk:
    get:
      summary: 获取磁盘监控信息
      description: 返回磁盘使用情况、文件系统信息、磁盘I/O统计等存储设备监控数据
      tags:
      - 【Flexmodel】系统监控
      responses:
        "200":
          description: 成功获取磁盘信息
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DiskMetricsResponse"
        "500":
          $ref: "#/components/responses/InternalError"
        "400":
          $ref: "#/components/responses/BadRequest"
      security:
      - BearerAuth: []
      - BearerAuth: []
      parameters:
      - name: X-Tenant-Id
        in: header
  /api/f/metrics/fm:
    get:
      tags:
      - 【Flexmodel】系统监控
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/FmMetricsResponse"
        "500":
          $ref: "#/components/responses/InternalError"
        "400":
          $ref: "#/components/responses/BadRequest"
      security:
      - BearerAuth: []
      - BearerAuth: []
      summary: Get Fm Metrics
      parameters:
      - name: X-Tenant-Id
        in: header
  /api/f/metrics/jvm:
    get:
      summary: 获取JVM监控信息
      description: 返回JVM运行时的详细信息，包括类加载、垃圾回收、系统属性等
      tags:
      - 【Flexmodel】系统监控
      responses:
        "200":
          description: 成功获取JVM信息
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/JvmMetricsResponse"
        "500":
          $ref: "#/components/responses/InternalError"
        "400":
          $ref: "#/components/responses/BadRequest"
      security:
      - BearerAuth: []
      - BearerAuth: []
      parameters:
      - name: X-Tenant-Id
        in: header
  /api/f/metrics/memory:
    get:
      summary: 获取内存监控信息
      description: 返回堆内存、非堆内存、内存池等详细内存使用情况
      tags:
      - 【Flexmodel】系统监控
      responses:
        "200":
          description: 成功获取内存信息
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MemoryMetricsResponse"
        "500":
          $ref: "#/components/responses/InternalError"
        "400":
          $ref: "#/components/responses/BadRequest"
      security:
      - BearerAuth: []
      - BearerAuth: []
      parameters:
      - name: X-Tenant-Id
        in: header
  /api/f/metrics/network:
    get:
      summary: 获取网络监控信息
      description: 返回网络接口信息、连接状态、IP地址等网络监控数据
      tags:
      - 【Flexmodel】系统监控
      responses:
        "200":
          description: 成功获取网络信息
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/NetworkMetricsResponse"
        "500":
          $ref: "#/components/responses/InternalError"
        "400":
          $ref: "#/components/responses/BadRequest"
      security:
      - BearerAuth: []
      - BearerAuth: []
      parameters:
      - name: X-Tenant-Id
        in: header
  /api/f/metrics/prometheus:
    get:
      summary: 获取Prometheus格式指标
      description: 返回Prometheus格式的监控指标数据，可用于Prometheus服务器采集
      tags:
      - 【Flexmodel】系统监控
      responses:
        "200":
          description: 成功获取Prometheus指标
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PrometheusMetricsResponse"
        "500":
          $ref: "#/components/responses/InternalError"
        "400":
          $ref: "#/components/responses/BadRequest"
      security:
      - BearerAuth: []
      - BearerAuth: []
      parameters:
      - name: X-Tenant-Id
        in: header
  /api/f/metrics/summary:
    get:
      summary: 获取系统摘要信息
      description: 返回系统运行状态的综合摘要，包括JVM、CPU、内存、线程等关键指标
      tags:
      - 【Flexmodel】系统监控
      responses:
        "200":
          description: 成功获取系统摘要
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SystemSummaryResponse"
        "500":
          $ref: "#/components/responses/InternalError"
        "400":
          $ref: "#/components/responses/BadRequest"
      security:
      - BearerAuth: []
      - BearerAuth: []
      parameters:
      - name: X-Tenant-Id
        in: header
  /api/f/metrics/threads:
    get:
      summary: 获取线程监控信息
      description: 返回线程数量、状态统计、线程详细信息等
      tags:
      - 【Flexmodel】系统监控
      responses:
        "200":
          description: 成功获取线程信息
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ThreadMetricsResponse"
        "500":
          $ref: "#/components/responses/InternalError"
        "400":
          $ref: "#/components/responses/BadRequest"
      security:
      - BearerAuth: []
      - BearerAuth: []
      parameters:
      - name: X-Tenant-Id
        in: header
  /api/f/settings:
    patch:
      summary: 保存设置
      tags:
      - 【Flexmodel】设置
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Settings"
        required: true
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Settings"
        "500":
          $ref: "#/components/responses/InternalError"
        "400":
          $ref: "#/components/responses/BadRequest"
      parameters:
      - name: X-Tenant-Id
        in: header
      security:
      - BearerAuth: []
    get:
      summary: 获取设置
      tags:
      - 【Flexmodel】设置
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Settings"
        "500":
          $ref: "#/components/responses/InternalError"
        "400":
          $ref: "#/components/responses/BadRequest"
      parameters:
      - name: X-Tenant-Id
        in: header
      security:
      - BearerAuth: []
  /api/f/tenants:
    get:
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/Tenant"
        "500":
          $ref: "#/components/responses/InternalError"
        "400":
          $ref: "#/components/responses/BadRequest"
      summary: Find Tenants
      tags:
      - Tenant Resource
      parameters:
      - name: X-Tenant-Id
        in: header
      security:
      - BearerAuth: []
  /api/f/triggers:
    get:
      summary: 获取触发器列表
      tags:
      - 【Flexmodel】触发器
      parameters:
      - name: jobGroup
        in: query
        schema:
          type: string
      - name: jobId
        in: query
        schema:
          type: string
      - name: jobType
        in: query
        schema:
          type: string
      - name: name
        in: query
        schema:
          type: string
      - name: page
        in: query
        schema:
          type: integer
          format: int32
          default: "1"
      - name: size
        in: query
        schema:
          type: integer
          format: int32
          default: "15"
      - name: X-Tenant-Id
        in: header
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PageDTOTriggerDTO"
        "500":
          $ref: "#/components/responses/InternalError"
        "400":
          $ref: "#/components/responses/BadRequest"
      security:
      - BearerAuth: []
    post:
      summary: 创建触发器
      tags:
      - 【Flexmodel】触发器
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Trigger"
        required: true
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Trigger"
        "400":
          $ref: "#/components/responses/BadRequest"
        "500":
          $ref: "#/components/responses/InternalError"
      parameters:
      - name: X-Tenant-Id
        in: header
      security:
      - BearerAuth: []
  /api/f/triggers/{id}:
    put:
      summary: 更新触发器
      tags:
      - 【Flexmodel】触发器
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      - name: X-Tenant-Id
        in: header
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Trigger"
        required: true
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Trigger"
        "400":
          $ref: "#/components/responses/BadRequest"
        "500":
          $ref: "#/components/responses/InternalError"
      security:
      - BearerAuth: []
    patch:
      summary: 部分更新触发器
      tags:
      - 【Flexmodel】触发器
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      - name: X-Tenant-Id
        in: header
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Trigger"
        required: true
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Trigger"
        "500":
          $ref: "#/components/responses/InternalError"
        "400":
          $ref: "#/components/responses/BadRequest"
      security:
      - BearerAuth: []
    get:
      summary: 获取单个触发器
      tags:
      - 【Flexmodel】触发器
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      - name: X-Tenant-Id
        in: header
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TriggerDTO"
        "500":
          $ref: "#/components/responses/InternalError"
        "400":
          $ref: "#/components/responses/BadRequest"
      security:
      - BearerAuth: []
    delete:
      summary: 删除触发器
      tags:
      - 【Flexmodel】触发器
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      - name: X-Tenant-Id
        in: header
      responses:
        "204":
          description: No Content
        "500":
          $ref: "#/components/responses/InternalError"
        "400":
          $ref: "#/components/responses/BadRequest"
      security:
      - BearerAuth: []
  /api/f/triggers/{id}/execute:
    post:
      summary: 立即执行触发器
      tags:
      - 【Flexmodel】触发器
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      - name: X-Tenant-Id
        in: header
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Trigger"
        "500":
          $ref: "#/components/responses/InternalError"
        "400":
          $ref: "#/components/responses/BadRequest"
      security:
      - BearerAuth: []
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: "JWT Bearer Token认证 - 在Authorization header中使用 'Bearer {token}'\
        \ 格式"
  responses:
    InternalError:
      description: Internal Error
      content:
        application/json:
          schema:
            type: object
            properties:
              code:
                type: integer
                example: -1
              message:
                type: string
                example: 失败
              success:
                type: boolean
                example: false
          examples:
            fail:
              value:
                code: -1
                message: 失败
                success: false
    BadRequest:
      description: Bad Request
      content:
        application/json:
          schema:
            type: object
            properties:
              code:
                type: integer
                example: 400
              message:
                type: string
                example: 参数验证异常
              success:
                type: boolean
                example: false
              errors:
                type: array
                items:
                  type: object
          examples:
            参数验证异常:
              value:
                code: 1001
                message: 参数验证异常
                success: false
                errors:
                - field: name
                  message: 不能为空
  schemas:
    AddressInfo:
      type: object
      properties:
        address:
          type: string
        hostName:
          type: string
        networkPrefixLength:
          type: integer
          format: int16
        broadcast:
          type: string
    AiChatConversation:
      type: object
      properties:
        id:
          type: string
        title:
          type: string
        messages:
          type: array
          items:
            $ref: "#/components/schemas/AiChatMessage"
        tenantId:
          type: string
        createdBy:
          type: string
        updatedBy:
          type: string
        createdAt:
          $ref: "#/components/schemas/LocalDateTime"
        updatedAt:
          $ref: "#/components/schemas/LocalDateTime"
    AiChatMessage:
      type: object
      properties:
        id:
          type: string
        conversationId:
          type: string
        role:
          type: string
        content:
          type: string
        tenantId:
          type: string
        createdBy:
          type: string
        updatedBy:
          type: string
        createdAt:
          $ref: "#/components/schemas/LocalDateTime"
        updatedAt:
          $ref: "#/components/schemas/LocalDateTime"
    AllMetricsResponse:
      type: object
      properties:
        jvm:
          $ref: "#/components/schemas/JvmMetricsResponse"
        cpu:
          $ref: "#/components/schemas/CpuMetricsResponse"
        memory:
          $ref: "#/components/schemas/MemoryMetricsResponse"
        threads:
          $ref: "#/components/schemas/ThreadMetricsResponse"
        disk:
          $ref: "#/components/schemas/DiskMetricsResponse"
        network:
          $ref: "#/components/schemas/NetworkMetricsResponse"
        summary:
          $ref: "#/components/schemas/SystemSummaryResponse"
        prometheus:
          $ref: "#/components/schemas/PrometheusMetricsResponse"
        fm:
          $ref: "#/components/schemas/FmMetricsResponse"
        timestamp:
          type: integer
          format: int64
        processingTimeMs:
          type: integer
          format: int64
        error:
          type: string
    ApiDefinitionHistory:
      type: object
      properties:
        id:
          type: string
        apiDefinitionId:
          type: string
        name:
          type: string
        parentId:
          type: string
        type:
          $ref: "#/components/schemas/ApiType"
        method:
          type: string
        path:
          type: string
        meta: {}
        enabled:
          type: boolean
        tenantId:
          type: string
        createdBy:
          type: string
        updatedBy:
          type: string
        createdAt:
          $ref: "#/components/schemas/LocalDateTime"
        updatedAt:
          $ref: "#/components/schemas/LocalDateTime"
    ApiDefinitionSchema:
      type: object
      properties:
        id:
          type: string
          examples:
          - -1
          description: 唯一标识
        type:
          $ref: "#/components/schemas/ApiType"
          type: string
          description: "类型, FOLDER: 文件夹；API: 接口"
        path:
          type: string
          description: 路径
        meta:
          description: 元数据，存放接口定义，例如graphql定义
        name:
          type: string
          description: 名称
        createdAt:
          $ref: "#/components/schemas/LocalDateTime"
          type: string
          readOnly: true
          description: 创建时间
        updatedAt:
          $ref: "#/components/schemas/LocalDateTime"
          type: string
          readOnly: true
          description: 更新时间
        parentId:
          type: string
          description: 上级ID
        enabled:
          type: boolean
          description: 是否开启
          default: true
        method:
          type: string
          examples:
          - GET
          description: HTTP请求方法
        tenantId:
          type: string
        createdBy:
          type: string
        updatedBy:
          type: string
    ApiDefinitionTreeDTO:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        parentId:
          type: string
        type:
          $ref: "#/components/schemas/ApiType"
        method:
          type: string
        path:
          type: string
        meta: {}
        enabled:
          type: boolean
        tenantId:
          type: string
        createdBy:
          type: string
        updatedBy:
          type: string
        createdAt:
          $ref: "#/components/schemas/LocalDateTime"
        updatedAt:
          $ref: "#/components/schemas/LocalDateTime"
        children:
          type: array
          items:
            $ref: "#/components/schemas/ApiDefinitionTreeDTO"
    ApiDefinitionTreeSchema:
      type: object
      properties:
        id:
          type: string
          examples:
          - -1
          description: 唯一标识
        type:
          $ref: "#/components/schemas/ApiType"
          type: string
          description: "类型, FOLDER: 文件夹；API: 接口"
        path:
          type: string
          description: 路径
        meta:
          description: 元数据，存放接口定义，例如graphql定义
        name:
          type: string
          description: 名称
        createdAt:
          $ref: "#/components/schemas/LocalDateTime"
          type: string
          readOnly: true
          description: 创建时间
        updatedAt:
          $ref: "#/components/schemas/LocalDateTime"
          type: string
          readOnly: true
          description: 更新时间
        parentId:
          type: string
          description: 上级ID
        enabled:
          type: boolean
          description: 是否开启
          default: true
        method:
          type: string
          examples:
          - GET
          description: HTTP请求方法
        children:
          type: array
          items:
            $ref: "#/components/schemas/ApiDefinitionTreeDTO"
          description: 子节点
        tenantId:
          type: string
        createdBy:
          type: string
        updatedBy:
          type: string
    ApiLogSchema:
      type: object
      description: 接口日志
      properties:
        id:
          type: string
          description: ID
        uri:
          description: 请求标识
        level:
          description: 等级
        createdAt:
          $ref: "#/components/schemas/LocalDateTime"
          type: string
          readOnly: true
          description: 创建日期
        data:
          description: 数据
        url:
          type: string
        httpMethod:
          type: string
        path:
          type: string
        requestBody: {}
        requestHeaders: {}
        statusCode:
          type: integer
          format: int32
        responseTime:
          type: integer
          format: int32
        clientIp:
          type: string
        isSuccess:
          type: boolean
        errorMessage: {}
        tenantId:
          type: string
    ApiLogStatSchema:
      type: object
      description: 日志统计
      properties:
        date:
          type: string
          description: 日期
        total:
          type: integer
          format: int64
          description: 总数
    ApiType:
      type: string
      enum:
      - FOLDER
      - API
    ChatMessage:
      type: object
      properties:
        role:
          type: string
        content:
          type: string
    ChatRequest:
      type: object
      properties:
        conversationId:
          type: string
        model:
          type: string
        messages:
          type: array
          items:
            $ref: "#/components/schemas/ChatMessage"
        temperature:
          type: number
          format: double
        maxTokens:
          type: integer
          format: int32
    CommitTaskParamSchema:
      type: object
      properties:
        flowInstanceId:
          type: string
          examples:
          - flow_inst_001
          description: 流程实例ID
        nodeInstanceId:
          examples:
          - node_inst_001
          description: 节点实例ID
        variables:
          type:
          - object
          - array
          additionalProperties: {}
          description: 流程变量
        tenant:
          examples:
          - default
          description: 租户
        caller:
          examples:
          - admin
          description: 调用者
        operator:
          examples:
          - admin
          description: 操作者
        taskInstanceId:
          type: string
        runtimeContext:
          $ref: "#/components/schemas/RuntimeContext"
        extendProperties:
          type: object
          additionalProperties: {}
        callActivityFlowModuleId:
          type: string
    CommitTaskResultSchema:
      type: object
      properties:
        errCode:
          type: integer
          format: int32
          examples:
          - 0
          description: 错误码
        errMsg:
          type: string
          examples:
          - success
          description: 错误信息
        flowInstanceId:
          type: string
          examples:
          - flow_inst_001
          description: 流程实例ID
        status:
          type: integer
          format: int32
          examples:
          - 1
          description: 状态
        nodeExecuteResults:
          type: array
          items:
            $ref: "#/components/schemas/NodeExecuteResult"
        extendProperties:
          type: object
          additionalProperties: {}
        activeTaskInstance:
          $ref: "#/components/schemas/NodeInstance"
        variables:
          type: object
          additionalProperties: {}
    CpuMetricsResponse:
      type: object
      properties:
        availableProcessors:
          type: integer
          format: int32
        architecture:
          type: string
        name:
          type: string
        version:
          type: string
        systemCpuLoad:
          type: number
          format: double
        processCpuLoad:
          type: number
          format: double
        systemLoadAverage:
          type: number
          format: double
        totalPhysicalMemorySize:
          type: integer
          format: int64
        freePhysicalMemorySize:
          type: integer
          format: int64
        totalSwapSpaceSize:
          type: integer
          format: int64
        freeSwapSpaceSize:
          type: integer
          format: int64
        committedVirtualMemorySize:
          type: integer
          format: int64
        maxMemory:
          type: integer
          format: int64
        totalMemory:
          type: integer
          format: int64
        freeMemory:
          type: integer
          format: int64
        usedMemory:
          type: integer
          format: int64
    CreateConversationRequest:
      type: object
      properties:
        title:
          type: string
    CreateFlowParamSchema:
      type: object
      properties:
        flowKey:
          type: string
          examples:
          - order_process
          description: 流程键
        flowName:
          type: string
          examples:
          - 订单处理流程
          description: 流程名称
        remark:
          type: string
          examples:
          - 处理订单的完整业务流程
          description: 备注
        tenant:
          type: string
          examples:
          - default
          description: 租户
        caller:
          type: string
          examples:
          - admin
          description: 调用者
        operator:
          type: string
          examples:
          - admin
          description: 操作者
    CreateFlowResultSchema:
      type: object
      properties:
        errCode:
          type: integer
          format: int32
          examples:
          - 0
          description: 错误码
        errMsg:
          type: string
          examples:
          - success
          description: 错误信息
        flowModuleId:
          type: string
          examples:
          - flow_module_001
          description: 流程模块ID
    DatasourceSchema:
      type: object
      description: 接口日志
      properties:
        name:
          type: string
          description: 名称，需要唯一
        type:
          $ref: "#/components/schemas/DatasourceType"
          type: string
          description: 数据源类型
        config:
          type: object
          description: 数据源配置
        enabled:
          type: boolean
          description: 是否启用
        createdAt:
          $ref: "#/components/schemas/LocalDateTime"
          type: string
          readOnly: true
          description: 创建日期
        updatedAt:
          $ref: "#/components/schemas/LocalDateTime"
          type: string
          readOnly: true
          description: 更新日期
        tenantId:
          type: string
        createdBy:
          type: string
        updatedBy:
          type: string
    DatasourceType:
      type: string
      enum:
      - SYSTEM
      - USER
    DefaultValue:
      type: object
      properties:
        type:
          type: string
        value: {}
        name:
          type: string
        fixed:
          type: boolean
        generated:
          type: boolean
    DeployFlowParamSchema:
      type: object
      properties:
        flowModuleId:
          type: string
          examples:
          - flow_module_001
          description: 流程模块ID
        tenant:
          type: string
          examples:
          - default
          description: 租户
        caller:
          type: string
          examples:
          - admin
          description: 调用者
        operator:
          type: string
          examples:
          - admin
          description: 操作者
    DeployFlowResultSchema:
      type: object
      properties:
        errCode:
          type: integer
          format: int32
          examples:
          - 0
          description: 错误码
        errMsg:
          type: string
          examples:
          - success
          description: 错误信息
        flowDeployId:
          type: string
          examples:
          - flow_deploy_001
          description: 流程部署ID
        flowModuleId:
          type: string
          examples:
          - flow_module_001
          description: 流程模块ID
    Direction:
      type: string
      enum:
      - ASC
      - DESC
    DiskIoInfo:
      type: object
      properties:
        committedVirtualMemorySize:
          type: integer
          format: int64
        processIo:
          $ref: "#/components/schemas/ProcessIoInfo"
        fileSystemStats:
          $ref: "#/components/schemas/FileSystemStatsInfo"
        jvmIo:
          $ref: "#/components/schemas/JvmIoInfo"
        error:
          type: string
        fileSystemError:
          type: string
    DiskMetricsResponse:
      type: object
      properties:
        fileSystems:
          type: object
          additionalProperties:
            $ref: "#/components/schemas/FileSystemInfo"
        rootDirectory:
          $ref: "#/components/schemas/FileSystemInfo"
        totalFileSystems:
          type: integer
          format: int32
        totalSpace:
          type: integer
          format: int64
        totalUsableSpace:
          type: integer
          format: int64
        totalFreeSpace:
          type: integer
          format: int64
        diskIo:
          $ref: "#/components/schemas/DiskIoInfo"
    ElementInstance:
      type: object
      properties:
        key:
          type: string
        name:
          type: string
        properties:
          type: object
          additionalProperties: {}
        status:
          type: integer
          format: int32
        nodeInstanceId:
          type: string
        subFlowInstanceIdList:
          type: array
          items:
            type: string
        subElementInstanceList:
          type: array
          items:
            $ref: "#/components/schemas/ElementInstance"
        instanceDataId:
          type: string
    ElementInstanceSchema:
      type: object
      properties:
        Key:
          examples:
          - start_event_001
          description: 键
        name:
          type: string
          examples:
          - 开始事件
          description: 名称
        status:
          type: integer
          format: int32
          examples:
          - 2
          description: 元素状态：1-待处理，2-已完成，3-已跳过，4-已禁用
        properties:
          type: object
          additionalProperties: {}
          description: 元素属性
        nodeInstanceId:
          type: string
          examples:
          - node_inst_001
          description: 节点实例ID
        subFlowInstanceIdList:
          type: array
          items:
            type: string
          description: 子流程实例ID列表
        subElementInstanceList:
          type: array
          items:
            $ref: "#/components/schemas/ElementInstance"
          description: 子元素实例列表
        instanceDataId:
          type: string
          examples:
          - data_001
          description: 实例数据ID
        key:
          type: string
    EntitySchema:
      type: object
      description: 实体
      properties:
        name:
          type: string
          description: 名称
        type:
          type: string
          description: "类型, entity: 实体；native_query: 本地查询；enum: 枚举"
        fields:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
              type:
                type: string
              modelName:
                type: string
              comment:
                type: string
              unique:
                type: boolean
              nullable:
                type: boolean
              defaultValue:
                $ref: "#/components/schemas/DefaultValue"
              additionalProperties:
                type: object
                additionalProperties: {}
              identity:
                type: boolean
              concreteType:
                type: string
          description: 字段列表
        indexes:
          type: array
          items:
            $ref: "#/components/schemas/IndexDefinition"
          description: 索引列表
        comment:
          type: string
          description: 注释
        additionalProperties:
          type: object
          additionalProperties: {}
          description: 用户自定义扩展属性
        idl:
          type: string
    EnumSchema:
      type: object
      description: 枚举
      properties:
        name:
          type: string
          description: 名称
        comment:
          type: string
          description: 注释
        elements:
          type: array
          items:
            type: string
          description: 元素列表
        additionalProperties:
          type: object
          additionalProperties: {}
          description: 用户自定义扩展属性
        idl:
          type: string
        type:
          type: string
    ErrorClassification:
      type: object
    ExecuteNativeQueryRequest:
      type: object
      properties:
        statement:
          type: string
          description: 语句
        parameters:
          type: object
          additionalProperties: {}
          description: 参数
    ExecutionResult:
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: "#/components/schemas/GraphQLError"
        data: {}
        dataPresent:
          type: boolean
        extensions:
          type: object
          additionalProperties: {}
    ExtendRuntimeContext:
      type: object
      properties:
        branchExecuteDataMap:
          type: object
          additionalProperties: {}
        branchSuspendNodeInstance:
          $ref: "#/components/schemas/NodeInstanceBO"
        currentNodeModel:
          $ref: "#/components/schemas/FlowElement"
        exception:
          $ref: "#/components/schemas/TurboException"
    Field:
      type: object
      properties:
        fieldName:
          type: string
        direction:
          $ref: "#/components/schemas/Direction"
    FileSystemInfo:
      type: object
      properties:
        name:
          type: string
        type:
          type: string
        totalSpace:
          type: integer
          format: int64
        usedSpace:
          type: integer
          format: int64
        usableSpace:
          type: integer
          format: int64
        freeSpace:
          type: integer
          format: int64
        usagePercentage:
          type: number
          format: double
        isReadOnly:
          type: boolean
        totalSpaceGB:
          type: number
          format: double
        usedSpaceGB:
          type: number
          format: double
        usableSpaceGB:
          type: number
          format: double
        freeSpaceGB:
          type: number
          format: double
        lastModified:
          type: integer
          format: int64
        readOnly:
          type: boolean
    FileSystemStatsInfo:
      type: object
      properties:
        totalSpace:
          type: integer
          format: int64
        freeSpace:
          type: integer
          format: int64
        usableSpace:
          type: integer
          format: int64
        lastModified:
          type: integer
          format: int64
        spaceUtilization:
          type: number
          format: double
    FlowElement:
      type: object
      properties:
        key:
          type: string
        type:
          type: integer
          format: int32
        outgoing:
          type: array
          items:
            type: string
        properties:
          type: object
          additionalProperties: {}
        incoming:
          type: array
          items:
            type: string
    FlowInstanceListResponseSchema:
      type: object
      properties:
        list:
          type: array
          items:
            $ref: "#/components/schemas/FlowInstanceSchema"
          description: 流程实例列表
        total:
          type: integer
          format: int64
          examples:
          - 100
          description: 总记录数
    FlowInstanceSchema:
      type: object
      properties:
        flowInstanceId:
          type: string
          examples:
          - flow_inst_001
          description: 流程实例ID
        flowModuleId:
          type: string
          examples:
          - flow_module_001
          description: 流程模块ID
        flowDeployId:
          type: string
          examples:
          - flow_deploy_001
          description: 流程部署ID
        status:
          type: integer
          format: int32
          examples:
          - 1
          description: 流程实例状态：1-运行中，2-已完成，3-已终止，4-已暂停
        parentFlowInstanceId:
          type: string
          examples:
          - parent_inst_001
          description: 父流程实例ID
        tenant:
          type: string
          examples:
          - default
          description: 租户
        caller:
          type: string
          examples:
          - admin
          description: 调用者
        operator:
          examples:
          - admin
          description: 操作者
        createTime:
          $ref: "#/components/schemas/LocalDateTime"
          type: string
          readOnly: true
          description: 创建时间
        modifyTime:
          $ref: "#/components/schemas/LocalDateTime"
          type: string
          readOnly: true
          description: 修改时间
    FlowModuleListResponseSchema:
      type: object
      properties:
        list:
          type: array
          items:
            $ref: "#/components/schemas/FlowModuleResponseSchema"
          description: 流程模块列表
        total:
          type: integer
          format: int64
          examples:
          - 100
          description: 总记录数
    FlowModuleResponseSchema:
      type: object
      properties:
        flowModuleId:
          type: string
          examples:
          - flow_module_001
          description: 流程模块ID
        flowName:
          type: string
          examples:
          - 订单处理流程
          description: 流程名称
        flowKey:
          type: string
          examples:
          - order_process
          description: 流程键
        status:
          type: integer
          format: int32
          examples:
          - 4
          description: 状态：1-草稿，2-设计，3-测试，4-已发布
        remark:
          type: string
          examples:
          - 处理订单的完整业务流程
          description: 备注
        tenant:
          type: string
          examples:
          - default
          description: 租户
        caller:
          type: string
          examples:
          - admin
          description: 调用者
        operator:
          type: string
          examples:
          - admin
          description: 操作者
        modifyTime:
          $ref: "#/components/schemas/LocalDateTime"
          type: string
          readOnly: true
          description: 修改时间
    FlowModuleResultSchema:
      type: object
      properties:
        errCode:
          type: integer
          format: int32
          examples:
          - 0
          description: 错误码
        errMsg:
          type: string
          examples:
          - success
          description: 错误信息
        flowModuleId:
          type: string
          examples:
          - flow_module_001
          description: 流程模块ID
        flowDeployId:
          examples:
          - flow_deploy_001
          description: 流程部署ID
        flowName:
          type: string
        flowKey:
          type: string
        flowModel:
          type: string
        status:
          type: integer
          format: int32
        remark:
          type: string
        tenant:
          type: string
        caller:
          type: string
        operator:
          type: string
        modifyTime:
          $ref: "#/components/schemas/LocalDateTime"
    FmMetricsResponse:
      type: object
      properties:
        customApiCount:
          type: integer
          format: int32
        requestCount:
          type: integer
          format: int32
        queryCount:
          type: integer
          format: int32
        mutationCount:
          type: integer
          format: int32
        subscribeCount:
          type: integer
          format: int32
        dataSourceCount:
          type: integer
          format: int32
        modelCount:
          type: integer
          format: int32
        flowDefCount:
          type: integer
          format: int32
        flowExecCount:
          type: integer
          format: int32
        triggerTotalCount:
          type: integer
          format: int32
        jobSuccessCount:
          type: integer
          format: int32
        jobFailureCount:
          type: integer
          format: int32
    GarbageCollectorInfo:
      type: object
      properties:
        collectionCount:
          type: integer
          format: int64
        collectionTime:
          type: integer
          format: int64
    GenerateAPIsDTO:
      type: object
      required:
      - datasourceName
      - modelName
      - apiFolder
      - idFieldOfPath
      - generateAPIs
      properties:
        datasourceName:
          type: string
          pattern: \S
        modelName:
          type: string
          pattern: \S
        apiFolder:
          type: string
          pattern: \S
        idFieldOfPath:
          type: string
          pattern: \S
        generateAPIs:
          type: array
          minItems: 1
          items:
            type: string
    GraphQLError:
      type: object
      properties:
        message:
          type: string
        locations:
          type: array
          items:
            $ref: "#/components/schemas/SourceLocation"
        errorType:
          $ref: "#/components/schemas/ErrorClassification"
        path:
          type: array
          items: {}
        extensions:
          type: object
          additionalProperties: {}
    GraphQLRequest:
      type: object
      properties:
        operationName:
          type: string
          description: 操作名称
        query:
          type: string
          description: 查询
        variables:
          type: object
          additionalProperties: {}
          description: 变量
    IdentityProviderSchema:
      type: object
      description: 身份源
      properties:
        name:
          type: string
          description: 名称，需要唯一
        provider:
          type: object
          description: 身份源配置
        createdAt:
          $ref: "#/components/schemas/LocalDateTime"
          type: string
          readOnly: true
          description: 创建日期
        updatedAt:
          $ref: "#/components/schemas/LocalDateTime"
          type: string
          readOnly: true
          description: 更新日期
        tenantId:
          type: string
        createdBy:
          type: string
        updatedBy:
          type: string
    IdlRequest:
      type: object
      properties:
        idl:
          type: string
    ImportScriptRequest:
      type: object
      required:
      - script
      properties:
        script:
          type: string
          pattern: \S
          description: 脚本
        type:
          $ref: "#/components/schemas/ImportScriptType"
          type: string
          description: 脚本类型
    ImportScriptType:
      type: string
      enum:
      - JSON
      - IDL
    IndexDefinition:
      type: object
      properties:
        name:
          type: string
        modelName:
          type: string
        fields:
          type: array
          items:
            $ref: "#/components/schemas/Field"
        unique:
          type: boolean
    IndexSchema:
      type: object
      description: 索引，更多信息见Schema定义文档
      properties:
        name:
          type: string
          description: 名称
        fields:
          type: array
          items:
            $ref: "#/components/schemas/Field"
          description: 字段列表
        unique:
          type: boolean
          description: 是否唯一
        modelName:
          type: string
    JobExecutionLog:
      type: object
      properties:
        id:
          type: string
        triggerId:
          type: string
        jobId:
          type: string
        jobGroup:
          type: string
        jobType:
          type: string
        jobName:
          type: string
        executionStatus:
          type: string
        startTime:
          $ref: "#/components/schemas/LocalDateTime"
        endTime:
          $ref: "#/components/schemas/LocalDateTime"
        executionDuration:
          type: integer
          format: int64
        isSuccess:
          type: boolean
        errorMessage:
          type: string
        errorStackTrace: {}
        inputData: {}
        outputData: {}
        retryCount:
          type: integer
          format: int32
        maxRetryCount:
          type: integer
          format: int32
        schedulerName:
          type: string
        instanceName:
          type: string
        firedTime:
          type: integer
          format: int64
        scheduledTime:
          type: integer
          format: int64
        tenantId:
          type: string
        createdBy:
          type: string
        updatedBy:
          type: string
        createdAt:
          $ref: "#/components/schemas/LocalDateTime"
        updatedAt:
          $ref: "#/components/schemas/LocalDateTime"
    JvmIoInfo:
      type: object
      properties:
        maxMemory:
          type: integer
          format: int64
        totalMemory:
          type: integer
          format: int64
        freeMemory:
          type: integer
          format: int64
        usedMemory:
          type: integer
          format: int64
    JvmMetricsResponse:
      type: object
      properties:
        name:
          type: string
        version:
          type: string
        vendor:
          type: string
        uptime:
          type: integer
          format: int64
        startTime:
          type: integer
          format: int64
        loadedClassCount:
          type: integer
          format: int32
        totalLoadedClassCount:
          type: integer
          format: int64
        unloadedClassCount:
          type: integer
          format: int64
        garbageCollectors:
          type: object
          additionalProperties:
            $ref: "#/components/schemas/GarbageCollectorInfo"
        systemProperties:
          type: object
          additionalProperties:
            type: string
    LocalDateTime:
      type: string
      format: date-time
      examples:
      - 2022-03-10T12:15:50
    LocalhostInfo:
      type: object
      properties:
        hostName:
          type: string
        hostAddress:
          type: string
        canonicalHostName:
          type: string
        isLoopbackAddress:
          type: boolean
        isLinkLocalAddress:
          type: boolean
        isSiteLocalAddress:
          type: boolean
        isMulticastAddress:
          type: boolean
        loopbackAddress:
          type: boolean
        linkLocalAddress:
          type: boolean
        siteLocalAddress:
          type: boolean
        multicastAddress:
          type: boolean
    Log:
      type: object
      properties:
        maxDays:
          type: integer
          format: int32
        consoleLoggingEnabled:
          type: boolean
    LoginRequest:
      type: object
      properties:
        username:
          type: string
        password:
          type: string
    MemoryInfo:
      type: object
      properties:
        init:
          type: integer
          format: int64
        used:
          type: integer
          format: int64
        committed:
          type: integer
          format: int64
        max:
          type: integer
          format: int64
        usagePercentage:
          type: number
          format: double
    MemoryMetricsResponse:
      type: object
      properties:
        heap:
          $ref: "#/components/schemas/MemoryInfo"
        nonHeap:
          $ref: "#/components/schemas/MemoryInfo"
        memoryPools:
          type: object
          additionalProperties:
            $ref: "#/components/schemas/MemoryPoolInfo"
    MemoryPoolInfo:
      type: object
      properties:
        init:
          type: integer
          format: int64
        used:
          type: integer
          format: int64
        committed:
          type: integer
          format: int64
        max:
          type: integer
          format: int64
        usagePercentage:
          type: number
          format: double
        type:
          type: string
        memoryManagerNames:
          type: string
    NativeQuerySchema:
      type: object
      description: 本地查询
      properties:
        name:
          type: string
          description: 名称
        type:
          type: string
          description: "类型, entity: 实体；native_query: 本地查询；enum: 枚举"
        statement:
          type: string
          description: 语句
        comment:
          description: 注释
        additionalProperties:
          type: object
          additionalProperties: {}
          description: 用户自定义扩展属性
        idl:
          type: string
        parameters:
          type: array
          uniqueItems: true
          items:
            type: string
        fields:
          type: array
          items:
            $ref: "#/components/schemas/QueryField"
    NetworkInterfaceInfo:
      type: object
      properties:
        name:
          type: string
        displayName:
          type: string
        isUp:
          type: boolean
        isLoopback:
          type: boolean
        isVirtual:
          type: boolean
        isPointToPoint:
          type: boolean
        supportsMulticast:
          type: boolean
        macAddress:
          type: string
        mtu:
          type: integer
          format: int32
        addresses:
          type: object
          additionalProperties:
            $ref: "#/components/schemas/AddressInfo"
        parent:
          type: string
        subInterfaces:
          type: object
          additionalProperties:
            type: string
        up:
          type: boolean
        loopback:
          type: boolean
        virtual:
          type: boolean
        pointToPoint:
          type: boolean
    NetworkMetricsResponse:
      type: object
      properties:
        interfaces:
          type: object
          additionalProperties:
            $ref: "#/components/schemas/NetworkInterfaceInfo"
        totalInterfaces:
          type: integer
          format: int32
        localhost:
          $ref: "#/components/schemas/LocalhostInfo"
        stats:
          $ref: "#/components/schemas/NetworkStatsInfo"
        localhostError:
          type: string
    NetworkStatsInfo:
      type: object
      properties:
        activeInterfaces:
          type: integer
          format: int32
        timestamp:
          type: integer
          format: int64
    NodeExecuteResult:
      type: object
      properties:
        errCode:
          type: integer
          format: int32
        errMsg:
          type: string
        activeTaskInstance:
          $ref: "#/components/schemas/NodeInstance"
        variables:
          type: object
          additionalProperties: {}
    NodeExecuteResultSchema:
      type: object
      properties:
        errCode:
          type: integer
          format: int32
          examples:
          - 0
          description: 错误码
        errMsg:
          type: string
          examples:
          - success
          description: 错误信息
        activeTaskInstance:
          $ref: "#/components/schemas/NodeInstance"
          type: object
          description: 活跃任务实例
        variables:
          type:
          - object
          - array
          additionalProperties: {}
          description: 流程变量列表
    NodeInstance:
      type: object
      properties:
        key:
          type: string
        name:
          type: string
        status:
          type: integer
          format: int32
        subFlowInstanceIdList:
          type: array
          items:
            type: string
        subElementInstanceList:
          type: array
          items:
            $ref: "#/components/schemas/ElementInstance"
        instanceDataId:
          type: string
        nodeInstanceId:
          type: string
        flowElementType:
          type: integer
          format: int32
        subNodeResultList:
          type: array
          items:
            $ref: "#/components/schemas/RuntimeResult"
        createTime:
          $ref: "#/components/schemas/LocalDateTime"
        modifyTime:
          $ref: "#/components/schemas/LocalDateTime"
        properties:
          type: object
          additionalProperties: {}
    NodeInstanceBO:
      type: object
      properties:
        id:
          type: integer
          format: int64
        nodeInstanceId:
          type: string
        nodeKey:
          type: string
        sourceNodeInstanceId:
          type: string
        sourceNodeKey:
          type: string
        instanceDataId:
          type: string
        status:
          type: integer
          format: int32
        nodeType:
          type: integer
          format: int32
        properties:
          type: object
          additionalProperties: {}
    NodeInstanceSchema:
      type: object
      properties:
        nodeInstanceId:
          type: string
          examples:
          - node_inst_001
          description: 节点实例ID
        Key:
          examples:
          - user_task_001
          description: 模型键
        modelName:
          examples:
          - 用户审批任务
          description: 模型名称
        status:
          type: integer
          format: int32
          examples:
          - 2
          description: 节点状态：1-待处理，2-已完成，3-已跳过，4-已禁用
        flowElementType:
          type: integer
          format: int32
          examples:
          - 1
          description: 流程元素类型：1-用户任务，2-服务任务，3-网关，4-事件
        properties:
          type: object
          additionalProperties: {}
          description: 节点属性
        subNodeResultList:
          type: array
          items:
            $ref: "#/components/schemas/RuntimeResult"
          description: 子节点执行结果列表
        subFlowInstanceIdList:
          type: array
          items:
            type: string
          description: 子流程实例ID列表
        subElementInstanceList:
          type: array
          items:
            $ref: "#/components/schemas/ElementInstance"
          description: 子元素实例列表
        instanceDataId:
          type: string
          examples:
          - data_001
          description: 实例数据ID
        createTime:
          $ref: "#/components/schemas/LocalDateTime"
          type: string
          readOnly: true
          description: 创建时间
        modifyTime:
          $ref: "#/components/schemas/LocalDateTime"
          type: string
          readOnly: true
          description: 修改时间
        key:
          type: string
        name:
          type: string
    PageDTOJobExecutionLog:
      type: object
      properties:
        list:
          type: array
          items:
            $ref: "#/components/schemas/JobExecutionLog"
        total:
          type: integer
          format: int64
    PageDTOTriggerDTO:
      type: object
      properties:
        list:
          type: array
          items:
            $ref: "#/components/schemas/TriggerDTO"
        total:
          type: integer
          format: int64
    ProcessIoInfo:
      type: object
      properties:
        committedVirtualMemoryMB:
          type: integer
          format: int64
    PrometheusMetricsResponse:
      type: object
      properties:
        metrics:
          type: string
        error:
          type: string
    Proxy:
      type: object
      properties:
        routesEnabled:
          type: boolean
        routes:
          type: array
          items:
            $ref: "#/components/schemas/Route"
    QueryField:
      type: object
      properties:
        name:
          type: string
        aliasName:
          type: string
        fieldName:
          type: string
    RollbackTaskParamSchema:
      type: object
      properties:
        flowInstanceId:
          type: string
          examples:
          - flow_inst_001
          description: 流程实例ID
        nodeInstanceId:
          examples:
          - node_inst_001
          description: 节点实例ID
        tenant:
          examples:
          - default
          description: 租户
        caller:
          examples:
          - admin
          description: 调用者
        operator:
          examples:
          - admin
          description: 操作者
        taskInstanceId:
          type: string
        runtimeContext:
          $ref: "#/components/schemas/RuntimeContext"
        extendProperties:
          type: object
          additionalProperties: {}
    RollbackTaskResultSchema:
      type: object
      properties:
        errCode:
          type: integer
          format: int32
          examples:
          - 0
          description: 错误码
        errMsg:
          type: string
          examples:
          - success
          description: 错误信息
        flowInstanceId:
          type: string
          examples:
          - flow_inst_001
          description: 流程实例ID
        status:
          type: integer
          format: int32
          examples:
          - 1
          description: 状态
        nodeExecuteResults:
          type: array
          items:
            $ref: "#/components/schemas/NodeExecuteResult"
        extendProperties:
          type: object
          additionalProperties: {}
        activeTaskInstance:
          $ref: "#/components/schemas/NodeInstance"
        variables:
          type: object
          additionalProperties: {}
    Route:
      type: object
      properties:
        path:
          type: string
        to:
          type: string
    RuntimeContext:
      type: object
      properties:
        parentRuntimeContext:
          $ref: "#/components/schemas/RuntimeContext"
        flowDeployId:
          type: string
        flowModuleId:
          type: string
        tenantId:
          type: string
        caller:
          type: string
        flowElementMap:
          type: object
          additionalProperties:
            $ref: "#/components/schemas/FlowElement"
        flowInstanceId:
          type: string
        flowInstanceStatus:
          type: integer
          format: int32
        suspendNodeInstance:
          $ref: "#/components/schemas/NodeInstanceBO"
        nodeInstanceList:
          type: array
          items:
            $ref: "#/components/schemas/NodeInstanceBO"
        suspendNodeInstanceStack:
          type: array
          items:
            type: string
        currentNodeModel:
          $ref: "#/components/schemas/FlowElement"
        currentNodeInstance:
          $ref: "#/components/schemas/NodeInstanceBO"
        instanceDataId:
          type: string
        instanceDataMap:
          type: object
          additionalProperties: {}
        processStatus:
          type: integer
          format: int32
        callActivityFlowModuleId:
          type: string
        callActivityRuntimeResultList:
          type: array
          items:
            $ref: "#/components/schemas/RuntimeResult"
        extendProperties:
          type: object
          additionalProperties: {}
        extendRuntimeContextList:
          type: array
          items:
            $ref: "#/components/schemas/ExtendRuntimeContext"
    RuntimeResult:
      type: object
      properties:
        errCode:
          type: integer
          format: int32
        errMsg:
          type: string
        flowInstanceId:
          type: string
        status:
          type: integer
          format: int32
        nodeExecuteResults:
          type: array
          items:
            $ref: "#/components/schemas/NodeExecuteResult"
        extendProperties:
          type: object
          additionalProperties: {}
        activeTaskInstance:
          $ref: "#/components/schemas/NodeInstance"
        variables:
          type: object
          additionalProperties: {}
    RuntimeResultSchema:
      type: object
      properties:
        errCode:
          type: integer
          format: int32
          examples:
          - 0
          description: 错误码
        errMsg:
          type: string
          examples:
          - success
          description: 错误信息
        flowInstanceId:
          type: string
          examples:
          - flow_inst_001
          description: 流程实例ID
        status:
          type: integer
          format: int32
          examples:
          - 2
          description: 流程状态：1-运行中，2-已完成，3-已终止，4-已暂停
        nodeExecuteResults:
          type: array
          items:
            $ref: "#/components/schemas/NodeExecuteResult"
          description: 节点执行结果列表
        extendProperties:
          type: object
          additionalProperties: {}
          description: 扩展属性
        activeTaskInstance:
          $ref: "#/components/schemas/NodeInstance"
        variables:
          type: object
          additionalProperties: {}
    SchemaObject:
      type: object
      properties:
        name:
          type: string
        type:
          type: string
        idl:
          type: string
    Security:
      type: object
      properties:
        rateLimitingEnabled:
          type: boolean
        maxRequestCount:
          type: integer
          format: int32
        intervalInSeconds:
          type: integer
          format: int32
        graphqlEndpointPath:
          type: string
        graphqlEndpointIdentityProvider:
          type: string
        systemIdentityProvider:
          type: string
    SendMessageRequest:
      type: object
      properties:
        content:
          type: string
        model:
          type: string
    Settings:
      type: object
      properties:
        appName:
          type: string
        log:
          $ref: "#/components/schemas/Log"
        security:
          $ref: "#/components/schemas/Security"
        proxy:
          $ref: "#/components/schemas/Proxy"
    SourceLocation:
      type: object
      properties:
        line:
          type: integer
          format: int32
        column:
          type: integer
          format: int32
        sourceName:
          type: string
    StartProcessParamSchema:
      type: object
      properties:
        flowModuleId:
          type: string
          examples:
          - flow_module_001
          description: 流程模块ID
        flowDeployId:
          type: string
          examples:
          - flow_deploy_001
          description: 流程部署ID
        variables:
          type:
          - object
          - array
          additionalProperties: {}
          description: 流程变量
        runtimeContext:
          $ref: "#/components/schemas/RuntimeContext"
    StartProcessResultSchema:
      type: object
      properties:
        errCode:
          type: integer
          format: int32
          examples:
          - 0
          description: 错误码
        errMsg:
          type: string
          examples:
          - success
          description: 错误信息
        flowInstanceId:
          type: string
          examples:
          - flow_inst_001
          description: 流程实例ID
        status:
          type: integer
          format: int32
          examples:
          - 1
          description: 状态
        flowDeployId:
          type: string
          examples:
          - flow_deploy_001
          description: 流程部署ID
        flowModuleId:
          type: string
          examples:
          - flow_module_001
          description: 流程模块ID
        nodeExecuteResults:
          type: array
          items:
            $ref: "#/components/schemas/NodeExecuteResult"
        extendProperties:
          type: object
          additionalProperties: {}
        activeTaskInstance:
          $ref: "#/components/schemas/NodeInstance"
        variables:
          type: object
          additionalProperties: {}
    SystemSummaryResponse:
      type: object
      properties:
        systemTime:
          type: integer
          format: int64
        uptime:
          type: integer
          format: int64
        availableProcessors:
          type: integer
          format: int32
        osName:
          type: string
        osVersion:
          type: string
        osArch:
          type: string
        heapUsedMB:
          type: integer
          format: int64
        heapMaxMB:
          type: integer
          format: int64
        heapUsagePercentage:
          type: number
          format: double
        threadCount:
          type: integer
          format: int32
        peakThreadCount:
          type: integer
          format: int32
        daemonThreadCount:
          type: integer
          format: int32
        diskTotalSpaceGB:
          type: number
          format: double
        diskUsableSpaceGB:
          type: number
          format: double
        diskFreeSpaceGB:
          type: number
          format: double
        diskUsagePercentage:
          type: number
          format: double
        totalNetworkInterfaces:
          type: integer
          format: int32
        upNetworkInterfaces:
          type: integer
          format: int32
        hostName:
          type: string
        hostAddress:
          type: string
        networkError:
          type: string
        jvmName:
          type: string
        jvmVersion:
          type: string
        jvmVendor:
          type: string
        loadedClassCount:
          type: integer
          format: int32
        totalLoadedClassCount:
          type: integer
          format: int64
        totalGcCount:
          type: integer
          format: int64
        totalGcTime:
          type: integer
          format: int64
        systemCpuLoad:
          type: number
          format: double
        processCpuLoad:
          type: number
          format: double
    TemplateInfo:
      type: object
      properties:
        name:
          type: string
        variables:
          type: object
          additionalProperties: {}
    Tenant:
      type: object
      properties:
        id:
          type: string
        enabled:
          type: boolean
        createdAt:
          $ref: "#/components/schemas/LocalDateTime"
        updatedAt:
          $ref: "#/components/schemas/LocalDateTime"
    TerminateResultSchema:
      type: object
      properties:
        errCode:
          type: integer
          format: int32
          examples:
          - 0
          description: 错误码
        errMsg:
          type: string
          examples:
          - success
          description: 错误信息
        flowInstanceId:
          type: string
          examples:
          - flow_inst_001
          description: 流程实例ID
        status:
          type: integer
          format: int32
          examples:
          - 1
          description: 状态
        nodeExecuteResults:
          type: array
          items:
            $ref: "#/components/schemas/NodeExecuteResult"
        extendProperties:
          type: object
          additionalProperties: {}
        activeTaskInstance:
          $ref: "#/components/schemas/NodeInstance"
        variables:
          type: object
          additionalProperties: {}
    ThreadDetailInfo:
      type: object
      properties:
        name:
          type: string
        state:
          type: string
        blockedTime:
          type: integer
          format: int64
        blockedCount:
          type: integer
          format: int64
        waitedTime:
          type: integer
          format: int64
        waitedCount:
          type: integer
          format: int64
        cpuTime:
          type: integer
          format: int64
        userTime:
          type: integer
          format: int64
        lockName:
          type: string
        lockOwnerName:
          type: string
    ThreadMetricsResponse:
      type: object
      properties:
        threadCount:
          type: integer
          format: int32
        peakThreadCount:
          type: integer
          format: int32
        daemonThreadCount:
          type: integer
          format: int32
        totalStartedThreadCount:
          type: integer
          format: int64
        currentThreadCpuTime:
          type: integer
          format: int64
        currentThreadUserTime:
          type: integer
          format: int64
        threadStates:
          type: object
          additionalProperties:
            type: integer
            format: int32
        threadDetails:
          type: object
          additionalProperties:
            $ref: "#/components/schemas/ThreadDetailInfo"
    Trigger:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        description:
          type: string
        type:
          $ref: "#/components/schemas/TriggerType"
        config: {}
        jobType:
          type: string
        jobGroup:
          type: string
        jobId:
          type: string
        state:
          type: boolean
        createdAt:
          $ref: "#/components/schemas/LocalDateTime"
        updatedAt:
          $ref: "#/components/schemas/LocalDateTime"
        createdBy:
          type: string
        updatedBy:
          type: string
        tenantId:
          type: string
    TriggerDTO:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        description:
          type: string
        type:
          $ref: "#/components/schemas/TriggerType"
        config: {}
        jobType:
          type: string
        jobGroup:
          type: string
        jobId:
          type: string
        state:
          type: boolean
        createdAt:
          $ref: "#/components/schemas/LocalDateTime"
        updatedAt:
          $ref: "#/components/schemas/LocalDateTime"
        createdBy:
          type: string
        updatedBy:
          type: string
        tenantId:
          type: string
        jobName:
          type: string
        nextFireTime:
          $ref: "#/components/schemas/LocalDateTime"
        previousFireTime:
          $ref: "#/components/schemas/LocalDateTime"
    TriggerType:
      type: string
      enum:
      - EVENT
      - SCHEDULED
    TurboException:
      type: object
      properties:
        errNo:
          type: integer
          format: int32
        errMsg:
          type: string
    TypedFieldSchema:
      type: object
      description: 类型字段，更多信息见Schema定义文档
      properties:
        name:
          type: string
          description: 名称
        type:
          type: string
          description: 类型
        comment:
          type: string
          description: 注释
        unique:
          type: boolean
          description: 是否唯一
        nullable:
          type: boolean
          description: 可为空
        defaultValue:
          $ref: "#/components/schemas/DefaultValue"
          type: object
          description: 默认值
        additionalProperties:
          type: object
          additionalProperties: {}
          description: 用户自定义扩展属性
        modelName:
          type: string
        identity:
          type: boolean
        concreteType:
          type: string
    UpdateFlowParamSchema:
      type: object
      properties:
        flowModuleId:
          type: string
          examples:
          - flow_module_001
          description: 流程模块ID
        tenant:
          type: string
          examples:
          - default
          description: 租户
        caller:
          type: string
          examples:
          - admin
          description: 调用者
        operator:
          type: string
          examples:
          - admin
          description: 操作者
    UpdateFlowResultSchema:
      type: object
      properties:
        errCode:
          type: integer
          format: int32
          examples:
          - 0
          description: 错误码
        errMsg:
          type: string
          examples:
          - success
          description: 错误信息
tags:
- name: 【Flexmodel】GraphQL
  description: GraphQL接口信息
- name: 【Flexmodel】任务
  description: 任务管理
- name: 【Flexmodel】接口定义
  description: 接口定义管理
- name: 【Flexmodel】接口文档
  description: 接口文档管理
- name: 【Flexmodel】接口日志
  description: 接口日志管理
- name: 【Flexmodel】数据源
  description: 数据源管理
- name: 【Flexmodel】服务编排
  description: 服务编排管理
- name: 【Flexmodel】模型
  description: 模型管理
- name: 【Flexmodel】生成器
  description: 生成器管理
- name: 【Flexmodel】系统
  description: 系统信息
- name: 【Flexmodel】系统监控
  description: 系统监控相关接口，包括JVM、CPU、内存、线程、磁盘（含I/O）、网络等监控信息
- name: 【Flexmodel】触发器
  description: 触发器管理
- name: 【Flexmodel】记录
  description: 模型数据记录管理
- name: 【Flexmodel】设置
  description: 系统设置
- name: 【Flexmodel】身份源
  description: 身份源管理
