capability_id: project_v2.fields.list
version: "1.0.0"
description: List fields for a Projects v2 project.
input_schema:
  type: object
  required: [owner, projectNumber]
  properties:
    owner: { type: string, minLength: 1 }
    projectNumber: { type: integer, minimum: 1 }
    first: { type: integer, minimum: 1, maximum: 100, default: 30 }
    after: { type: [string, "null"] }
  additionalProperties: false
output_schema:
  type: object
  required: [items, pageInfo]
  properties:
    items:
      type: array
      items:
        type: object
        required: [id, name, dataType]
        properties:
          id: { type: [string, "null"] }
          name: { type: [string, "null"] }
          dataType: { type: [string, "null"] }
          options:
            type: [array, "null"]
            items:
              type: object
              required: [id, name]
              properties:
                id: { type: string }
                name: { type: string }
              additionalProperties: false
        additionalProperties: false
    pageInfo:
      type: object
      required: [hasNextPage, endCursor]
      properties:
        hasNextPage: { type: boolean }
        endCursor: { type: [string, "null"] }
      additionalProperties: false
  additionalProperties: false
routing:
  preferred: graphql
  fallbacks: [cli]
graphql:
  operationName: ProjectV2FieldsList
  operationType: query
  documentPath: src/gql/operations/project-v2-fields-list.graphql
cli:
  command: project field-list
