Код IT
← Каталог

Документирование API с использованием Swagger/OpenAPI — Коллекции и массивы

Фрагмент из «Документирование API с использованием Swagger/OpenAPI»: Коллекции и массивы.

yaml projectencyclopedia7-08-tehnicheskoe-pismo-3 embed URL статья в энциклопедии
YAML main.yaml
components:
  schemas:
    TaskList:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/Task'
        total:
          type: integer
          description: Общее количество задач
        page:
          type: integer
          description: Текущий номер страницы
        pageSize:
          type: integer
          description: Размер страницы
components:
  schemas:
    TaskList:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/Task'
        total:
          type: integer
          description: Общее количество задач
        page:
          type: integer
          description: Текущий номер страницы
        pageSize:
          type: integer
          description: Размер страницы