FAQ

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

    arazzo-step-operationPath


    Formats: Severity:

    arazzo-step-operationPath suggests using operationId instead of operationPath in workflow steps.

    It is not part of the recommended ruleset. It runs with --hard-mode, in the all Arazzo rules ruleset, or when you switch it on.

    Why did this violation appear?

    A step uses operationPath.

    An operationPath is a JSON Pointer into the source document. It is welded to the shape of that file, so moving a path breaks the workflow. An operationId survives the move.

    Bad example

    steps:
      - stepId: read
        description: Call the read operation.
        operationPath: '{$sourceDescriptions.api.url}#/paths/~1pets/get'
    

    Good example

    steps:
      - stepId: read
        description: Call the read operation.
        operationId: $sourceDescriptions.api.read
    

    How do I fix this violation?

    Give the operation an operationId in the source document and reference that. If you don’t own the API and it has no operation IDs, operationPath is all you’ve got. Leave this rule off.