Skip to content

Respect workflow references must use $sourceDescriptions.<name>.<workflowId> #2826

Description

@DmitryAnansky

Describe the bug

According to Arazzo 1.0.1/ 1.1.0 Runtime Expressions, workflow references must use $sourceDescriptions...
But current Respect syntax usses $sourceDescriptions..workflows..
The workflows part should be removed.

Expected behavior

Should be according to the specification, but let also keep backward compatibility for current implementation =>

Source Description Expression Resolution
When using $sourceDescriptions.., the portion is resolved with the following priority:

  • operationId or workflowId - If the referenced source description is an OpenAPI description, is first matched against operationIds. If the source description is an Arazzo document, is matched against workflowIds.
  • Source description field - If no operationId/workflowId match is found, is matched against field names of the Source Description Object (e.g., url, type).

Examples:

Given this source description:

sourceDescriptions:
  - name: petstore
    url: https://api.example.com/petstore.yaml
    type: openapi

Given the above example source description and an OpenAPI description at that specified URL containing an operation with operationId: getPetById:

  • $sourceDescriptions.petstore.getPetById resolves to the operation with operationId getPetById (priority 1)
  • $sourceDescriptions.petstore.url resolves to https://api.example.com/petstore.yaml (priority 2)
  • $sourceDescriptions.petstore.type resolves to openapi (priority 2)

If an operationId happens to conflict with a field name (e.g., an operation with operationId: url), the operationId takes precedence.

Additional context

https://spec.openapis.org/arazzo/latest.html

Metadata

Metadata

Assignees

No one assigned

    Labels

    RespectRelated to the `respect` command which works with Arazzo specificationType: BugSomething isn't workingp3

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions