FAQ

  • GitHub GitHub Repo stars
  • Discord Discord Server
  • ✨ New! Try the OpenAPI Doctor ✨ The OpenAPI Doctor
    Recommended

    arazzo-dependency


    Formats: Severity:

    arazzo-dependency checks dependsOn. Every prerequisite has to exist, and the chain of prerequisites can’t loop back on itself.

    Why did this violation appear?

    A workflow depends on something that isn’t there, or two workflows are waiting on each other. Neither can ever start.

    Bad example

    arazzo: 1.0.1
    info:
      title: Read a pet
      version: '1.0'
      description: Retrieve a pet from the API.
      summary: Read a pet.
    sourceDescriptions:
      - name: api
        url: api.yaml
        type: openapi
    workflows:
      - workflowId: readPet
        description: Retrieve a pet.
        summary: Read a pet.
        dependsOn: [login]
        steps:
          - stepId: read
            description: Call the read operation.
            operationId: $sourceDescriptions.api.read
      - workflowId: login
        description: Log in.
        summary: Log in.
        dependsOn: [readPet]
        steps:
          - stepId: read
            description: Call the read operation.
            operationId: $sourceDescriptions.api.read
    
    prerequisite dependency contains a cycle
    

    Good example

    arazzo: 1.0.1
    info:
      title: Read a pet
      version: '1.0'
      description: Retrieve a pet from the API.
      summary: Read a pet.
    sourceDescriptions:
      - name: api
        url: api.yaml
        type: openapi
    workflows:
      - workflowId: readPet
        description: Retrieve a pet.
        summary: Read a pet.
        dependsOn: [login]
        steps:
          - stepId: read
            description: Call the read operation.
            operationId: $sourceDescriptions.api.read
      - workflowId: login
        description: Log in.
        summary: Log in.
        steps:
          - stepId: read
            description: Call the read operation.
            operationId: $sourceDescriptions.api.read
    

    How do I fix this violation?

    Remove the dependency that closes the loop, or correct the workflow ID being depended on.

    Coming from Spectral? This is the rule that covers workflow prerequisite checks.

    This rule reports findings from vacuum’s shared Arazzo validation pass, using the arazzoDocument function.