Skip to content

Broken Resolution rules for source descriptions #350

@char0n

Description

@char0n

URL resolution of Source Description Objects within our Arazzo workflow files is not spec compliant. All Arazzo workflow files are using SourceDescription.url field in following way ./apis/*. In order to be Arazzo spec compliant, the url field should resolve against Arazzo workflow retrievalURI, which means the url field needs to be defined as ../../apis/*. This will make the workflows spec compliant and allows 3rd party tooling to consume the OAK.

  "sourceDescriptions": [
    {
      "name": "openapi_source",
      "url": "./apis/openapi/agco-ats.com/main/v1/openapi.json",
      "type": "openapi"
    }
  ],

should be

  "sourceDescriptions": [
    {
      "name": "openapi_source",
      "url": "../../apis/openapi/agco-ats.com/main/v1/openapi.json",
      "type": "openapi"
    }
  ],

This will allow other Arazzo spec compliant runners to directly consume OAK from our GitHub repo via URLs like this: https://raw.githubusercontent.com/jentic/jentic-public-apis/refs/heads/main/workflows/agco-ats.com/workflows.arazzo.json

POC that demonstrates the issue:

$ npx @redocly/cli respect --verbose  https://raw.githubusercontent.com/jentic/jentic-public-apis/refs/heads/main/workflows/apacta.com/workflows.arazzo.json

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions