Skip to content

Feat/add support for output transformations#20

Draft
DavidAtJentic wants to merge 12 commits intomainfrom
feat/add-support-for-output-transformations
Draft

Feat/add support for output transformations#20
DavidAtJentic wants to merge 12 commits intomainfrom
feat/add-support-for-output-transformations

Conversation

@DavidAtJentic
Copy link
Contributor

@DavidAtJentic DavidAtJentic commented Aug 14, 2025

Currently, the arazzo runner does not allow for transformation of data output from a previous API call - only referencing. This means that if Step 1 of an arazzo workflow outputs a value of the form "a/path/to/somewhere", and Step 2 requires just the value "somewhere" as an input, there is no way to access this value.

This PR introduces the functionality to apply regex transformations where applicable.

The transformations take the following form:

"parameters": [
  {
    "name": "filename",
    "in": "path",
    "value": "$steps.get-absolute-path.path",
    "x-transform": [
      {
        "type": "regex",
        "pattern": ".*/(?P<basename>[^/]+)$",
        "result": "\\<basename>",
        "description": "Extract the basename (portion after the last slash) from the upload absolute path"
      }
    ]
  }
]

@displague
Copy link

displague commented Sep 5, 2025

according to the spec (https://spec.openapis.org/arazzo/latest.html#fixed-fields-2):

outputs Map[string, {expression}] A map between a friendly name and a dynamic output value defined using a Runtime Expression. The name MUST use keys that match the regular expression: ^[a-zA-Z0-9\.\-_]+$.

If this is already handled, what benefit would there be to the proposed custom extension? Transformations could be defined in runtime expressions.
If this isn't already handled, feature parity with the spec would be preferrable to an alternative approach.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants