FAQ

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

    arazzo-duplicate-id


    Formats: Severity:

    arazzo-duplicate-id checks that identifiers are unique where they need to be. Workflow IDs across the document, step IDs within a workflow, source names across sourceDescriptions.

    Why did this violation appear?

    Two things share a name, so anything that refers to that name is ambiguous.

    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.
        steps:
          - stepId: read
            description: Call the read operation.
            operationId: $sourceDescriptions.api.read
          - stepId: read
            description: Call it again.
            operationId: $sourceDescriptions.api.read
    

    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.
        steps:
          - stepId: read
            description: Call the read operation.
            operationId: $sourceDescriptions.api.read
          - stepId: readAgain
            description: Call it again.
            operationId: $sourceDescriptions.api.read
    

    How do I fix this violation?

    Rename one of them. Then check every expression that referenced the old name, like $steps.read.outputs.pet.

    Coming from Spectral? This is the rule that covers workflow and step ID uniqueness.

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