> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gable.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Lineage Events

> Create Lineage Events



## OpenAPI

````yaml /api-reference/bundled.yaml post /v0/events
openapi: 3.1.0
info:
  title: Gable API
  description: >
    API to interact with the Gable platform

    ## Authorization

    All API requests require an API key to be passed in the `X-API-KEY` header.
    For instructions on finding your API key and api endpoint check out the [API
    Key documentation](../docs/api-keys.md).

    Example: `curl -H "X-API-KEY: <your-api-key>"
    https://api-{organization}.gable.ai/v0/ping`
  contact:
    name: Gable Engineering
    url: https://gable.ai
    email: engineers@gable.ai
  version: 1.28.0
servers:
  - url: https://{hostname}.gable.ai
    description: Gable API
    variables:
      hostname:
        default: demo-api
        description: Customer environment assigned by Gable
security:
  - ApiKeyAuth: []
tags:
  - name: action
  - name: api-keys
  - name: auth
  - name: changelog
  - name: config
  - name: contract
  - name: data-asset
  - name: debug
  - name: s3
  - name: settings
  - name: slack
  - name: sso
  - name: webhook
  - name: notifications
  - name: constraints
  - name: telemetry
  - name: component
  - name: components
  - name: sca
  - name: cross-service-components
  - name: lineage
  - name: events
  - name: measurements
  - name: defect-report
  - name: experimental
paths:
  /v0/events:
    post:
      tags:
        - events
      summary: Create Lineage Events
      description: Create Lineage Events
      operationId: postEvents
      requestBody:
        description: event to create
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PostEventsRequest'
      responses:
        '200':
          description: Lineage Event was created
        '400':
          description: Error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    PostEventsRequest:
      type: object
      description: Create lineage events or upload lineage data event
      oneOf:
        - $ref: '#/components/schemas/StaticAnalysisPathsApiRequest'
        - $ref: '#/components/schemas/CrossServiceDataStoreApiRequest'
        - $ref: '#/components/schemas/CrossServiceEdgeApiRequest'
        - $ref: '#/components/schemas/EventEnvelope'
      discriminator:
        propertyName: type
        mapping:
          CODE:
            $ref: '#/components/schemas/StaticAnalysisPathsApiRequest'
          DATA_STORE:
            $ref: '#/components/schemas/CrossServiceDataStoreApiRequest'
          EDGE:
            $ref: '#/components/schemas/CrossServiceEdgeApiRequest'
          LINEAGE_EVENT:
            $ref: '#/components/schemas/EventEnvelope'
    ErrorResponse:
      type: object
      required:
        - message
      properties:
        id:
          type: number
        title:
          type: string
        message:
          type: string
    StaticAnalysisPathsApiRequest:
      type: object
      description: API request for uploading code lineage paths
      additionalProperties: false
      properties:
        paths:
          type: array
          items:
            $ref: '#/components/schemas/StaticAnalysisDataFlowPath'
        run_id:
          type: string
          description: The ID of the run that the paths belong to
        upload_context:
          $ref: '#/components/schemas/PostScaStartRunRequest'
        external_component_id:
          type: string
          description: Optional ID of the external component that was analyzed
        type:
          type: string
          description: The type of data being uploaded
          enum:
            - CODE
        metadata:
          type: object
          description: Additional metadata for the component.
          properties:
            extras:
              type: object
              additionalProperties:
                type: string
        name:
          type: string
          description: The name of the component that was analyzed
      required:
        - paths
        - run_id
        - type
    CrossServiceDataStoreApiRequest:
      type: object
      description: API request for uploading data store metadata
      additionalProperties: false
      properties:
        run_id:
          type: string
          description: The ID of the run that this data belongs to
        upload_context:
          $ref: '#/components/schemas/PostScaStartRunRequest'
        external_component_id:
          type: string
          description: The provided external ID for the data store
        type:
          type: string
          enum:
            - DATA_STORE
          description: The type of data store
        schema:
          type: object
          additionalProperties: false
          required:
            - fields
          properties:
            fields:
              type: array
              minItems: 1
              items:
                type: object
                additionalProperties: false
                properties:
                  name:
                    type: string
                    description: The name of the field
                  type:
                    type: string
                    description: The type of the field
                required:
                  - name
                  - type
        table_metadata:
          type: object
          additionalProperties: false
          properties:
            type:
              type: string
              description: The type of data store
              enum:
                - dynamodb
                - redis
                - elasticache
                - database
                - kafka
                - other
            table_name:
              type: string
              description: The name of the data store
            extras:
              type: object
              description: Additional metadata for the data store.
              additionalProperties:
                type: string
          required:
            - type
            - table_name
      required:
        - run_id
        - external_component_id
        - type
        - table_metadata
        - schema
    CrossServiceEdgeApiRequest:
      type: object
      description: API request for uploading edge definitions
      additionalProperties: false
      properties:
        run_id:
          type: string
          description: The ID of the run that this data belongs to
        upload_context:
          $ref: '#/components/schemas/PostScaStartRunRequest'
        type:
          type: string
          enum:
            - EDGE
        field_mappings:
          type: array
          minItems: 1
          items:
            type: object
            additionalProperties: false
            required:
              - source_field
              - destination_field
            properties:
              source_field:
                type: string
              destination_field:
                type: string
              notes:
                type: string
        source:
          type: object
          additionalProperties: false
          required:
            - source_component_name
            - type
          properties:
            component_id:
              type: string
              description: >-
                Id of the source component (optional, for backward
                compatibility)
            source_component_name:
              type: string
              description: Name of the source component
            egress_id:
              type: string
              description: Id of the source entity
            type:
              type: string
              description: the type of edge connection
            payload_name:
              type: string
              description: The name of the payload source
        destination:
          type: object
          additionalProperties: false
          required:
            - destination_component_name
            - type
          properties:
            component_id:
              type: string
              description: >-
                Id of the destination component (optional, for backward
                compatibility)
            destination_component_name:
              type: string
              description: Name of the destination component
            ingress_id:
              type: string
              description: Id of the destination entity
            type:
              type: string
              description: the type of edge connection
            payload_name:
              type: string
              description: The name of the payload destination
      required:
        - run_id
        - type
        - field_mappings
        - source
        - destination
    EventEnvelope:
      type: object
      required:
        - events
        - type
      additionalProperties: false
      properties:
        type:
          type: string
          enum:
            - LINEAGE_EVENT
        events:
          type: array
          minItems: 1
          items:
            type: object
            description: Lineage event envelope.
            required:
              - source
              - payload
              - component_id
              - actor
            properties:
              occurred_at:
                type: string
                format: date-time
                description: >-
                  Client timestamp when the event occurred (server also records
                  received time).
              source:
                type: string
                description: Origin of the event.
                enum:
                  - UI
                  - SCA
                  - BYO
                  - API
              actor:
                type: object
                description: Actor responsible for the event (optional for SCA).
                required:
                  - actor_type
                properties:
                  actor_type:
                    type: string
                    enum:
                      - user
                      - api_key
                  actor_id:
                    type: string
                    description: Opaque identifier for the actor.
              component_id:
                type: string
                format: uuid
                description: The ID of the component that the path belongs to
              payload:
                oneOf:
                  - $ref: '#/components/schemas/DataFlowPathSuppressedEvent'
                  - $ref: '#/components/schemas/DataFlowPathUnsuppressedEvent'
                  - $ref: '#/components/schemas/DataFlowPathAddedEvent'
                  - $ref: '#/components/schemas/DataFlowEdgeAddedEvent'
                  - $ref: '#/components/schemas/DataFlowEdgeDeletedEvent'
                  - $ref: '#/components/schemas/DataFlowByoPathDeletedEvent'
            discriminator:
              propertyName: event_type
              mapping:
                DATA_FLOW_PATH_ADDED:
                  $ref: '#/components/schemas/DataFlowPathAddedEvent'
                DATA_FLOW_EDGE_ADDED:
                  $ref: '#/components/schemas/DataFlowEdgeAddedEvent'
                DATA_FLOW_EDGE_DELETED:
                  $ref: '#/components/schemas/DataFlowEdgeDeletedEvent'
                DATA_FLOW_PATH_SUPPRESSED:
                  $ref: '#/components/schemas/DataFlowPathSuppressedEvent'
                DATA_FLOW_PATH_UNSUPPRESSED:
                  $ref: '#/components/schemas/DataFlowPathUnsuppressedEvent'
                DATA_FLOW_BYO_PATH_DELETED:
                  $ref: '#/components/schemas/DataFlowByoPathDeletedEvent'
            additionalProperties: false
    StaticAnalysisDataFlowPath:
      type: object
      description: >-
        A path in the codebase that starts at an ingress node and ends at an
        egress node
      required:
        - ingress
        - egress
      properties:
        ingress:
          $ref: '#/components/schemas/StaticAnalysisDataFlowPathEnds'
        egress:
          $ref: '#/components/schemas/StaticAnalysisDataFlowPathEnds'
        code_anchors:
          description: >-
            Ordered list of code anchors that represent the path from ingress to
            egress. The order of the anchors in this array represents the flow
            of data through the codebase.
          type: array
          items:
            $ref: '#/components/schemas/StaticAnalysisCodeAnchor'
        field_mappings:
          description: >-
            List of identified field mappings between schema at ingress and
            egress.
          type: array
          items:
            $ref: '#/components/schemas/StaticAnalysisTabularLineageFieldMapping'
        transformation_summary:
          type: string
          description: >-
            An AI-generated summary of the data transformation that occurs along
            this path.
        transformation_summary_detailed:
          description: >-
            A detailed, AI-generated summary of the data transformation that
            occurs along this path.
          type: string
        payload_name:
          description: >-
            The name of the path. If provided, this value will be used directly
            without being overwritten by computed values.
          type: string
        completeness:
          $ref: '#/components/schemas/StaticAnalysisCompleteness'
          description: Completeness indicators for a ground truth path
    PostScaStartRunRequest:
      type: object
      properties:
        code_info:
          $ref: '#/components/schemas/StaticAnalysisCodeMetadata'
        sca_info:
          $ref: '#/components/schemas/StaticAnalysisToolMetadata'
        action:
          type: string
          description: >-
            Action to perform upon receiving the results. Register should be
            used when the results are active (like on a 'main' branch or
            production system), as assets will be registered from the lineage
            data. Check should be used when the results are from a proposed
            change (like a pull request) and resultant assets will be checked
            against any contracts. Upload is the same as register except that no
            assets will be registered, only the lineage data will be uploaded.
          enum:
            - register
            - check
            - upload
        pr_link:
          type: string
          description: >-
            Link to the pull request in the source code repository, if
            applicable
        include_unchanged_assets:
          type: boolean
          description: Whether to include assets that have not changed since the last run
          default: false
        output_format:
          type: string
          description: Format of the output, either 'json', 'text', or 'markdown'
          enum:
            - json
            - text
            - markdown
        type:
          type: string
          description: >-
            Type of the run, either 'code', 'data_store', 'edge', or
            'code_strands'
          enum:
            - CODE
            - DATA_STORE
            - EDGE
            - CODE_STRANDS
          default: CODE
        run_id:
          type: string
          description: The ID of the run that the component belongs to
        collection_mechanism:
          type: string
          description: >-
            How the lineage data was collected. SCA means Gable's static code
            analysis tool scanned the code. BYOL (Bring Your Own Lineage) means
            the caller produced the lineage data externally and is uploading it
            directly.
          enum:
            - SCA
            - BYOL
          default: BYOL
      required:
        - code_info
        - action
    DataFlowPathSuppressedEvent:
      type: object
      description: Lineage data flow path suppressed event
      allOf:
        - type: object
          required:
            - event_type
          properties:
            event_type:
              type: string
              enum:
                - DATA_FLOW_PATH_SUPPRESSED
            path_id:
              type: string
              format: uuid
              description: Stable server-issued path identifier.
            effective_since_commit_sha:
              type: string
              description: The commit SHA that the path should apply from.
            reason:
              type: string
              description: The reason for the event
            namespace:
              type: string
              description: Optional namespace scope for this event.
    DataFlowPathUnsuppressedEvent:
      type: object
      description: Lineage data flow path un-suppressed event
      allOf:
        - type: object
          required:
            - event_type
          properties:
            event_type:
              type: string
              enum:
                - DATA_FLOW_PATH_UNSUPPRESSED
            path_id:
              type: string
              format: uuid
              description: Stable server-issued path identifier.
            effective_since_commit_sha:
              type: string
              description: The commit SHA that the path should apply from.
            reason:
              type: string
              description: The reason for the event
            namespace:
              type: string
              description: Optional namespace scope for this event.
    DataFlowPathAddedEvent:
      type: object
      description: Lineage data flow path added event
      allOf:
        - type: object
          required:
            - event_type
            - path
          properties:
            event_type:
              type: string
              enum:
                - DATA_FLOW_PATH_ADDED
            effective_since_commit_sha:
              type: string
              description: The commit SHA that the path should apply from.
            payload_name:
              type: string
              description: Deterministic payload name for a path if id is not available.
            reason:
              type: string
              description: The reason for the event
            path:
              $ref: '#/components/schemas/StaticAnalysisDataFlowPath'
            namespace:
              type: string
              description: Optional namespace scope for this event.
    DataFlowEdgeAddedEvent:
      type: object
      description: Lineage data flow edge added event
      allOf:
        - type: object
          required:
            - event_type
            - source
            - destination
            - field_mappings
          properties:
            event_type:
              type: string
              enum:
                - DATA_FLOW_EDGE_ADDED
            reason:
              type: string
              description: The reason for the event.
            namespace:
              type: string
              description: Optional namespace scope for this event.
            branch_name:
              type: string
              description: Optional branch scope for this event.
            job_trigger:
              type: string
              description: Optional trigger scope for this event.
            field_mappings:
              type: array
              minItems: 1
              items:
                type: object
                additionalProperties: false
                required:
                  - source_field
                  - destination_field
                properties:
                  source_field:
                    type: string
                  destination_field:
                    type: string
                  notes:
                    type: string
            source:
              type: object
              additionalProperties: false
              required:
                - component_id
                - source_component_name
                - payload_name
                - type
              properties:
                component_id:
                  type: string
                  format: uuid
                  description: Source component ID for edge matching.
                source_component_name:
                  type: string
                  description: Source component name.
                egress_id:
                  type: string
                  description: Optional source egress ID.
                payload_name:
                  type: string
                  description: Source payload name used for edge matching.
                effective_since_commit_sha:
                  type: string
                  description: Optional source-side effective commit SHA.
                type:
                  type: string
                  description: Source endpoint type.
            destination:
              type: object
              additionalProperties: false
              required:
                - component_id
                - destination_component_name
                - payload_name
                - type
              properties:
                component_id:
                  type: string
                  format: uuid
                  description: Destination component ID for edge matching.
                destination_component_name:
                  type: string
                  description: Destination component name.
                ingress_id:
                  type: string
                  description: Optional destination ingress ID.
                payload_name:
                  type: string
                  description: Destination payload name used for edge matching.
                effective_since_commit_sha:
                  type: string
                  description: Optional destination-side effective commit SHA.
                type:
                  type: string
                  description: Destination endpoint type.
    DataFlowEdgeDeletedEvent:
      type: object
      description: Lineage data flow edge deleted event
      allOf:
        - type: object
          required:
            - event_type
            - edge_id
          properties:
            event_type:
              type: string
              enum:
                - DATA_FLOW_EDGE_DELETED
            edge_id:
              type: string
              description: Stable server-issued edge identifier to hide.
            reason:
              type: string
              description: The reason for the event.
            namespace:
              type: string
              description: Optional namespace scope for this event.
    DataFlowByoPathDeletedEvent:
      type: object
      description: Lineage data flow BYO path deleted event
      allOf:
        - type: object
          required:
            - event_type
            - path_id
          properties:
            event_type:
              type: string
              enum:
                - DATA_FLOW_BYO_PATH_DELETED
            path_id:
              type: string
              format: uuid
              description: Stable server-issued path identifier.
            effective_since_commit_sha:
              type: string
              description: The commit SHA that the BYO path deletion should apply from.
            reason:
              type: string
              description: The reason for the event
            namespace:
              type: string
              description: Optional namespace scope for this event.
    StaticAnalysisDataFlowPathEnds:
      type: object
      properties:
        kind:
          type: string
          description: The kind of the ingress/egress (e.g. "postgres", "gateway_response")
        signature_name:
          type: string
          description: >-
            The name of the package, class, or method that the ingress/egress
            point is associated with
        code_anchor:
          $ref: '#/components/schemas/StaticAnalysisCodeAnchor'
          description: >-
            The code anchor that represents the ingress/egress point in the
            codebase (optional for BYOL imports). This should be the same as the
            first (for ingress) or last (for egress) code anchor in the flow
            path.
        schema:
          $ref: '#/components/schemas/GableSchemaStruct'
        description:
          description: An AI-generated summary of the ingress/egress point.
          type: string
        id:
          description: >-
            The ID of the ingress/egress point. This is a unique identifier for
            the ingress/egress point.
          type: string
        payload_name:
          description: The name of the ingress/egress node.
          type: string
      required:
        - schema
        - signature_name
    StaticAnalysisCodeAnchor:
      type: object
      properties:
        anchor_id:
          type: string
          description: >-
            Unique identifier for the anchor. Analogous to a merge key.
            Conceptually, an anchor represents a point in code which is ideally
            stable to some set of changes to surrounding code. Generated by the
            tool.
        code_uri:
          $ref: '#/components/schemas/StaticAnalysisCodeURI'
      required:
        - anchor_id
        - code_uri
    StaticAnalysisTabularLineageFieldMapping:
      type: object
      description: >-
        A mapping of a field in the ingress schema to a field in the egress
        schema
      required:
        - ingress_field
        - egress_field
      properties:
        ingress_field:
          type: string
          description: The field in the ingress schema
        egress_field:
          type: string
          description: The field in the egress schema
        notes:
          type: string
          description: Notes about the mapping
        kind:
          $ref: '#/components/schemas/FieldMappingKind'
        field_data_flow_path:
          type: array
          description: The field data flow path that represents this mapping
          items:
            $ref: '#/components/schemas/StaticAnalysisCodeAnchor'
    StaticAnalysisCompleteness:
      type: object
      properties:
        ingress:
          $ref: '#/components/schemas/StaticAnalysisCompletenessClassification'
          description: >-
            The completeness of non-schema ingress elements (name, signature,
            code anchor, etc.).
        ingress_schema:
          $ref: '#/components/schemas/StaticAnalysisCompletenessClassification'
          description: The completeness of the ingress's field schema.
        egress:
          $ref: '#/components/schemas/StaticAnalysisCompletenessClassification'
          description: >-
            The completeness of non-schema egress elements (name, signature,
            code anchor, etc.).
        egress_schema:
          $ref: '#/components/schemas/StaticAnalysisCompletenessClassification'
          description: The completeness of the egress's field schema.
        field_mappings:
          $ref: '#/components/schemas/StaticAnalysisCompletenessClassification'
          description: The completeness of the field mappings.
      required:
        - ingress
        - ingress_schema
        - egress
        - egress_schema
        - field_mappings
    StaticAnalysisCodeMetadata:
      type: object
      description: Metadata about the code that is being analyzed
      additionalProperties: true
      required:
        - repo_uri
        - repo_branch
        - repo_commit
        - project_root
      properties:
        repo_uri:
          type: string
          description: URI of the code repository
        repo_ui_url:
          type: string
          description: URL of the code repository UI (e.g. GitHub URL)
        repo_branch:
          type: string
          description: Branch of the code repository
        repo_commit:
          type: string
          description: Commit hash of the code
        project_root:
          type: string
          description: Root directory targeted by the static analysis tool
        external_component_id:
          type: string
          description: ID of the external component that was analyzed
        repo_name:
          type: string
          description: Name of the code repository
        event_repo:
          type: string
          description: Name of the repository from the GitHub event
        job_trigger:
          type: string
          enum:
            - MERGE_TO_MAIN
            - PULL_REQUEST_COMMENT
            - PULL_REQUEST_CREATED
            - PULL_REQUEST_UPDATED
            - MANUAL
            - UNKNOWN
          description: Type of the GitHub event
        repo_commit_timestamp:
          type: string
          description: Timestamp of the commit
        is_default_branch:
          type: boolean
          description: Whether this is the default branch of the code repository
        namespace:
          type: string
          description: Namespace of the customer (e.g. dev, qa, prod)
        docker_image_version:
          type: string
          description: Version of the Docker image used
        has_uncommitted_changes:
          type: boolean
          description: Whether there are uncommitted changes in the code repository
        operating_system:
          type: string
          description: Operating system of the machine that ran the static analysis tool
        sca_config_version:
          type: string
          description: Version (git SHA) of the SCA configuration files used
        scan_duration_ms:
          type: integer
          format: int64
          description: >-
            Total elapsed time, in milliseconds, spent running the Gable scan
            command for this component
        raw_payload_size_bytes:
          type: integer
          format: int64
          description: Size, in bytes, of the raw scan payload generated before upload
        upload_duration_ms:
          type: integer
          format: int64
          description: >-
            Total elapsed time, in milliseconds, spent processing the SCA
            results upload
        pr_base_branch:
          type: object
          properties:
            branch:
              type: string
              description: Base branch of the pull request
            commit:
              type: string
              description: Commit hash of the base branch
          description: Base branch of the pull request, if this was run from a pull request
        pr_number:
          type: integer
          description: Number of the pull request
        gable_cli_version:
          type: string
          description: Version of the Gable CLI used for this run
        sca_prime_version:
          type: string
          description: Version of the SCA Prime binary used for this run
        dependencies:
          type: array
          items:
            $ref: '#/components/schemas/StaticAnalysisDependencyMetadata'
          description: Dependencies of the code repository
    StaticAnalysisToolMetadata:
      type: object
      required:
        - name
        - version
      properties:
        name:
          type: string
          description: Name of the SCA tool used
        version:
          type: string
          description: Version of the SCA tool
        config:
          $ref: '#/components/schemas/StaticAnalysisToolConfig'
    GableSchemaStruct:
      type: object
      required:
        - type
      properties:
        type:
          type: string
          enum:
            - struct
        name:
          type: string
        fields:
          type: array
          items:
            $ref: '#/components/schemas/GableSchemaField'
        alias:
          type: string
          pattern: ^[a-zA-Z_][a-zA-Z0-9_]*(?:\.[a-zA-Z_][a-zA-Z0-9_]*)+$
        doc:
          type: string
        logical:
          type: string
    StaticAnalysisCodeURI:
      type: object
      description: >-
        Code URI is a unique identifier for a code location. It is used to
        identify the code location in the codebase.
      required:
        - file
        - line_start
        - column_start
      properties:
        file:
          type: string
          description: Relative file path in the repo
        line_start:
          type: integer
        line_end:
          type: integer
        column_start:
          type: integer
        column_end:
          type: integer
    FieldMappingKind:
      type: string
      description: >
        How a field mapping participates in the path.

        - DataFlow: the ingress field's value flows into the egress field
        (default).

        - KeyValueBridge: the mapping bridges a key/value pair rather than
        copying a single value.

        - ControlFlow: the ingress field influences whether/how the egress field
        is produced, but is not its value.

        When absent, treat as DataFlow.
      enum:
        - DataFlow
        - KeyValueBridge
        - ControlFlow
    StaticAnalysisCompletenessClassification:
      type: string
      description: A completeness classification of a ground truth element.
      enum:
        - UNKNOWN
        - KNOWN_INCOMPLETE
        - KNOWN_COMPLETE
    StaticAnalysisDependencyMetadata:
      type: object
      description: Metadata about a dependency of the code repository
      properties:
        repo_name:
          type: string
          description: Name of the dependency repository
        commit_sha:
          type: string
          description: Associated commit hash of the dependency repository
        commit_timestamp:
          type: string
          description: Timestamp of the commit
    StaticAnalysisToolConfig:
      type: object
      description: Configuration for a static analysis tool
      required:
        - ingress_signatures
        - egress_signatures
      properties:
        ingress_signatures:
          type: array
          items:
            $ref: '#/components/schemas/StaticAnalysisSignature'
        egress_signatures:
          type: array
          items:
            $ref: '#/components/schemas/StaticAnalysisSignature'
    GableSchemaField:
      oneOf:
        - $ref: '#/components/schemas/GableSchemaFieldStruct'
        - $ref: '#/components/schemas/GableSchemaFieldNull'
        - $ref: '#/components/schemas/GableSchemaFieldBool'
        - $ref: '#/components/schemas/GableSchemaFieldInt'
        - $ref: '#/components/schemas/GableSchemaFieldFloat'
        - $ref: '#/components/schemas/GableSchemaFieldString'
        - $ref: '#/components/schemas/GableSchemaFieldBytes'
        - $ref: '#/components/schemas/GableSchemaFieldList'
        - $ref: '#/components/schemas/GableSchemaFieldMap'
        - $ref: '#/components/schemas/GableSchemaFieldEnum'
        - $ref: '#/components/schemas/GableSchemaFieldUnion'
        - $ref: '#/components/schemas/GableSchemaFieldAliasReference'
        - $ref: '#/components/schemas/GableSchemaFieldUnknown'
      discriminator:
        propertyName: type
        mapping:
          struct:
            $ref: '#/components/schemas/GableSchemaFieldStruct'
          'null':
            $ref: '#/components/schemas/GableSchemaFieldNull'
          bool:
            $ref: '#/components/schemas/GableSchemaFieldBool'
          int:
            $ref: '#/components/schemas/GableSchemaFieldInt'
          float:
            $ref: '#/components/schemas/GableSchemaFieldFloat'
          string:
            $ref: '#/components/schemas/GableSchemaFieldString'
          bytes:
            $ref: '#/components/schemas/GableSchemaFieldBytes'
          list:
            $ref: '#/components/schemas/GableSchemaFieldList'
          map:
            $ref: '#/components/schemas/GableSchemaFieldMap'
          enum:
            $ref: '#/components/schemas/GableSchemaFieldEnum'
          union:
            $ref: '#/components/schemas/GableSchemaFieldUnion'
          aliasReference:
            $ref: '#/components/schemas/GableSchemaFieldAliasReference'
          unknown:
            $ref: '#/components/schemas/GableSchemaFieldUnknown'
    StaticAnalysisSignature:
      type: object
      description: A signature for a static analysis tool
      required:
        - class_names
        - method_names
        - kind
      properties:
        class_names:
          type: array
          items:
            type: string
          description: The names of the classes
        method_names:
          type: array
          items:
            type: string
          description: The names of the methods
        kind:
          type: string
          description: >-
            Unique name for the ingress/egress signature (e.g. "postgres",
            "gateway_response"). All the signatures with the same kind are
            grouped together.
    GableSchemaFieldStruct:
      type: object
      required:
        - type
      properties:
        type:
          type: string
          enum:
            - struct
        name:
          type: string
        fields:
          type: array
          items:
            $ref: '#/components/schemas/GableSchemaField'
        alias:
          type: string
          pattern: ^[a-zA-Z_][a-zA-Z0-9_]*(?:\.[a-zA-Z_][a-zA-Z0-9_]*)+$
        doc:
          type: string
        logical:
          type: string
        optional:
          type: boolean
    GableSchemaFieldNull:
      type: object
      required:
        - type
      properties:
        type:
          type: string
          enum:
            - 'null'
        alias:
          type: string
          pattern: ^[a-zA-Z_][a-zA-Z0-9_]*(?:\.[a-zA-Z_][a-zA-Z0-9_]*)+$
        doc:
          type: string
        logical:
          type: string
        name:
          type: string
        optional:
          type: boolean
    GableSchemaFieldBool:
      type: object
      required:
        - type
      properties:
        type:
          type: string
          enum:
            - bool
        alias:
          type: string
          pattern: ^[a-zA-Z_][a-zA-Z0-9_]*(?:\.[a-zA-Z_][a-zA-Z0-9_]*)+$
        doc:
          type: string
        logical:
          type: string
        name:
          type: string
        optional:
          type: boolean
    GableSchemaFieldInt:
      type: object
      required:
        - type
        - bits
      properties:
        type:
          type: string
          enum:
            - int
        bits:
          type: integer
          minimum: 1
          maximum: 2147483647
        signed:
          type: boolean
          default: true
        alias:
          type: string
          pattern: ^[a-zA-Z_][a-zA-Z0-9_]*(?:\.[a-zA-Z_][a-zA-Z0-9_]*)+$
        doc:
          type: string
        logical:
          $ref: '#/components/schemas/LogicalEnumTemporal'
        unit:
          type: string
          enum:
            - year
            - month
            - day
            - hour
            - minute
            - second
            - millisecond
            - microsecond
            - nanosecond
            - picosecond
        timezone:
          type: string
        name:
          type: string
        optional:
          type: boolean
    GableSchemaFieldFloat:
      type: object
      required:
        - type
        - bits
      properties:
        type:
          type: string
          enum:
            - float
        bits:
          type: integer
          minimum: 1
          maximum: 2147483647
        alias:
          type: string
          pattern: ^[a-zA-Z_][a-zA-Z0-9_]*(?:\.[a-zA-Z_][a-zA-Z0-9_]*)+$
        doc:
          type: string
        logical:
          type: string
        name:
          type: string
        optional:
          type: boolean
    GableSchemaFieldString:
      type: object
      required:
        - type
      properties:
        type:
          type: string
          enum:
            - string
        bytes:
          type: integer
          minimum: 1
          maximum: 9223372036854776000
        variable:
          type: boolean
          default: true
        alias:
          type: string
          pattern: ^[a-zA-Z_][a-zA-Z0-9_]*(?:\.[a-zA-Z_][a-zA-Z0-9_]*)+$
        doc:
          type: string
        logical:
          $ref: '#/components/schemas/LogicalEnumText'
        name:
          type: string
        optional:
          type: boolean
    GableSchemaFieldBytes:
      type: object
      required:
        - type
      properties:
        type:
          type: string
          enum:
            - bytes
        bytes:
          type: integer
          minimum: 1
          maximum: 9223372036854776000
        variable:
          type: boolean
        alias:
          type: string
          pattern: ^[a-zA-Z_][a-zA-Z0-9_]*(?:\.[a-zA-Z_][a-zA-Z0-9_]*)+$
        doc:
          type: string
        logical:
          $ref: '#/components/schemas/LogicalEnumNumeric'
        precision:
          type: integer
          minimum: 1
          maximum: 2147483647
        scale:
          type: integer
          minimum: 0
          maximum: 2147483647
        unit:
          type: string
          enum:
            - year
            - month
            - day
            - hour
            - minute
            - second
            - millisecond
            - microsecond
            - nanosecond
            - picosecond
        name:
          type: string
        optional:
          type: boolean
      if:
        properties:
          variable:
            const: false
        required:
          - variable
      then:
        required:
          - bytes
    GableSchemaFieldList:
      type: object
      required:
        - type
        - values
      properties:
        type:
          type: string
          enum:
            - list
        values:
          $ref: '#/components/schemas/GableSchemaType'
        length:
          type: integer
          minimum: 1
          maximum: 9223372036854776000
        variable:
          type: boolean
          default: true
        alias:
          type: string
          pattern: ^[a-zA-Z_][a-zA-Z0-9_]*(?:\.[a-zA-Z_][a-zA-Z0-9_]*)+$
        doc:
          type: string
        name:
          type: string
        optional:
          type: boolean
    GableSchemaFieldMap:
      type: object
      required:
        - type
        - keys
        - values
      properties:
        type:
          type: string
          enum:
            - map
        keys:
          $ref: '#/components/schemas/GableSchemaType'
        values:
          $ref: '#/components/schemas/GableSchemaType'
        alias:
          type: string
          pattern: ^[a-zA-Z_][a-zA-Z0-9_]*(?:\.[a-zA-Z_][a-zA-Z0-9_]*)+$
        doc:
          type: string
        logical:
          type: string
        name:
          type: string
        optional:
          type: boolean
    GableSchemaFieldEnum:
      type: object
      required:
        - type
        - symbols
      properties:
        type:
          type: string
          enum:
            - enum
        symbols:
          type: array
          items:
            type: string
        alias:
          type: string
          pattern: ^[a-zA-Z_][a-zA-Z0-9_]*(?:\.[a-zA-Z_][a-zA-Z0-9_]*)+$
        doc:
          type: string
        logical:
          type: string
        name:
          type: string
        optional:
          type: boolean
    GableSchemaFieldUnion:
      type: object
      required:
        - type
        - types
      properties:
        type:
          type: string
          enum:
            - union
        types:
          type: array
          items:
            $ref: '#/components/schemas/GableSchemaType'
        alias:
          type: string
          pattern: ^[a-zA-Z_][a-zA-Z0-9_]*(?:\.[a-zA-Z_][a-zA-Z0-9_]*)+$
        doc:
          type: string
        logical:
          type: string
        name:
          type: string
        optional:
          type: boolean
    GableSchemaFieldAliasReference:
      type: object
      required:
        - type
      properties:
        type:
          type: string
          not:
            $ref: '#/components/schemas/GableSchemaTypeName'
        doc:
          type: string
        logical:
          type: string
        name:
          type: string
        optional:
          type: boolean
      additionalProperties: true
      not:
        required:
          - alias
    GableSchemaFieldUnknown:
      type: object
      required:
        - type
      properties:
        type:
          type: string
          enum:
            - unknown
        alias:
          type: string
          pattern: ^[a-zA-Z_][a-zA-Z0-9_]*(?:\.[a-zA-Z_][a-zA-Z0-9_]*)+$
        doc:
          type: string
        logical:
          type: string
        name:
          type: string
        optional:
          type: boolean
    LogicalEnumTemporal:
      type: string
      enum:
        - Date
        - Time
        - Duration
        - Timestamp
    LogicalEnumText:
      type: string
      enum:
        - UUID
        - org.iso.8601.Date
        - org.iso.8601.DateTime
        - org.iso.8601.Time
    LogicalEnumNumeric:
      type: string
      enum:
        - Decimal
        - Interval
    GableSchemaType:
      oneOf:
        - $ref: '#/components/schemas/GableSchemaTypeName'
        - oneOf:
            - $ref: '#/components/schemas/GableSchemaStruct'
            - $ref: '#/components/schemas/GableSchemaNull'
            - $ref: '#/components/schemas/GableSchemaBool'
            - $ref: '#/components/schemas/GableSchemaInt'
            - $ref: '#/components/schemas/GableSchemaFloat'
            - $ref: '#/components/schemas/GableSchemaString'
            - $ref: '#/components/schemas/GableSchemaBytes'
            - $ref: '#/components/schemas/GableSchemaList'
            - $ref: '#/components/schemas/GableSchemaMap'
            - $ref: '#/components/schemas/GableSchemaEnum'
            - $ref: '#/components/schemas/GableSchemaUnion'
            - $ref: '#/components/schemas/GableSchemaAliasReference'
            - $ref: '#/components/schemas/GableSchemaUnknown'
          discriminator:
            propertyName: type
            mapping:
              struct:
                $ref: '#/components/schemas/GableSchemaStruct'
              'null':
                $ref: '#/components/schemas/GableSchemaNull'
              bool:
                $ref: '#/components/schemas/GableSchemaBool'
              int:
                $ref: '#/components/schemas/GableSchemaInt'
              float:
                $ref: '#/components/schemas/GableSchemaFloat'
              string:
                $ref: '#/components/schemas/GableSchemaString'
              bytes:
                $ref: '#/components/schemas/GableSchemaBytes'
              list:
                $ref: '#/components/schemas/GableSchemaList'
              map:
                $ref: '#/components/schemas/GableSchemaMap'
              enum:
                $ref: '#/components/schemas/GableSchemaEnum'
              union:
                $ref: '#/components/schemas/GableSchemaUnion'
              aliasReference:
                $ref: '#/components/schemas/GableSchemaAliasReference'
              unknown:
                $ref: '#/components/schemas/GableSchemaUnknown'
    GableSchemaTypeName:
      type: string
      enum:
        - 'null'
        - bool
        - int
        - float
        - string
        - bytes
        - list
        - map
        - struct
        - enum
        - union
    GableSchemaNull:
      type: object
      required:
        - type
      properties:
        type:
          type: string
          enum:
            - 'null'
        alias:
          type: string
          pattern: ^[a-zA-Z_][a-zA-Z0-9_]*(?:\.[a-zA-Z_][a-zA-Z0-9_]*)+$
        doc:
          type: string
        logical:
          type: string
    GableSchemaBool:
      type: object
      required:
        - type
      properties:
        type:
          type: string
          enum:
            - bool
        alias:
          type: string
          pattern: ^[a-zA-Z_][a-zA-Z0-9_]*(?:\.[a-zA-Z_][a-zA-Z0-9_]*)+$
        doc:
          type: string
        logical:
          type: string
    GableSchemaInt:
      type: object
      required:
        - type
        - bits
      properties:
        type:
          type: string
          enum:
            - int
        bits:
          type: integer
          minimum: 1
          maximum: 2147483647
        signed:
          type: boolean
          default: true
        alias:
          type: string
          pattern: ^[a-zA-Z_][a-zA-Z0-9_]*(?:\.[a-zA-Z_][a-zA-Z0-9_]*)+$
        doc:
          type: string
        logical:
          $ref: '#/components/schemas/LogicalEnumTemporal'
        unit:
          type: string
          enum:
            - year
            - month
            - day
            - hour
            - minute
            - second
            - millisecond
            - microsecond
            - nanosecond
            - picosecond
        timezone:
          type: string
    GableSchemaFloat:
      type: object
      required:
        - type
        - bits
      properties:
        type:
          type: string
          enum:
            - float
        bits:
          type: integer
          minimum: 1
          maximum: 2147483647
        alias:
          type: string
          pattern: ^[a-zA-Z_][a-zA-Z0-9_]*(?:\.[a-zA-Z_][a-zA-Z0-9_]*)+$
        doc:
          type: string
        logical:
          type: string
    GableSchemaString:
      type: object
      required:
        - type
      properties:
        type:
          type: string
          enum:
            - string
        bytes:
          type: integer
          minimum: 1
          maximum: 9223372036854776000
        variable:
          type: boolean
          default: true
        alias:
          type: string
          pattern: ^[a-zA-Z_][a-zA-Z0-9_]*(?:\.[a-zA-Z_][a-zA-Z0-9_]*)+$
        doc:
          type: string
        logical:
          $ref: '#/components/schemas/LogicalEnumText'
    GableSchemaBytes:
      type: object
      required:
        - type
      properties:
        type:
          type: string
          enum:
            - bytes
        bytes:
          type: integer
          minimum: 1
          maximum: 9223372036854776000
        variable:
          type: boolean
        alias:
          type: string
          pattern: ^[a-zA-Z_][a-zA-Z0-9_]*(?:\.[a-zA-Z_][a-zA-Z0-9_]*)+$
        doc:
          type: string
        logical:
          $ref: '#/components/schemas/LogicalEnumNumeric'
        precision:
          type: integer
          minimum: 1
          maximum: 2147483647
        scale:
          type: integer
          minimum: 0
          maximum: 2147483647
        unit:
          type: string
          enum:
            - year
            - month
            - day
            - hour
            - minute
            - second
            - millisecond
            - microsecond
            - nanosecond
            - picosecond
      if:
        properties:
          variable:
            const: false
        required:
          - variable
      then:
        required:
          - bytes
    GableSchemaList:
      type: object
      required:
        - type
        - values
      properties:
        type:
          type: string
          enum:
            - list
        values:
          $ref: '#/components/schemas/GableSchemaType'
        length:
          type: integer
          minimum: 1
          maximum: 9223372036854776000
        variable:
          type: boolean
          default: true
        alias:
          type: string
          pattern: ^[a-zA-Z_][a-zA-Z0-9_]*(?:\.[a-zA-Z_][a-zA-Z0-9_]*)+$
        doc:
          type: string
    GableSchemaMap:
      type: object
      required:
        - type
        - keys
        - values
      properties:
        type:
          type: string
          enum:
            - map
        keys:
          $ref: '#/components/schemas/GableSchemaType'
        values:
          $ref: '#/components/schemas/GableSchemaType'
        alias:
          type: string
          pattern: ^[a-zA-Z_][a-zA-Z0-9_]*(?:\.[a-zA-Z_][a-zA-Z0-9_]*)+$
        doc:
          type: string
        logical:
          type: string
    GableSchemaEnum:
      type: object
      required:
        - type
        - symbols
      properties:
        type:
          type: string
          enum:
            - enum
        symbols:
          type: array
          items:
            type: string
        alias:
          type: string
          pattern: ^[a-zA-Z_][a-zA-Z0-9_]*(?:\.[a-zA-Z_][a-zA-Z0-9_]*)+$
        doc:
          type: string
        logical:
          type: string
    GableSchemaUnion:
      type: object
      required:
        - type
        - types
      properties:
        type:
          type: string
          enum:
            - union
        types:
          type: array
          items:
            $ref: '#/components/schemas/GableSchemaType'
        alias:
          type: string
          pattern: ^[a-zA-Z_][a-zA-Z0-9_]*(?:\.[a-zA-Z_][a-zA-Z0-9_]*)+$
        doc:
          type: string
        logical:
          type: string
    GableSchemaAliasReference:
      type: object
      required:
        - type
      properties:
        type:
          type: string
          not:
            $ref: '#/components/schemas/GableSchemaTypeName'
        doc:
          type: string
        logical:
          type: string
      additionalProperties: true
      not:
        required:
          - alias
    GableSchemaUnknown:
      type: object
      required:
        - type
      properties:
        type:
          type: string
          enum:
            - unknown
        alias:
          type: string
          pattern: ^[a-zA-Z_][a-zA-Z0-9_]*(?:\.[a-zA-Z_][a-zA-Z0-9_]*)+$
        doc:
          type: string
        logical:
          type: string
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY

````