Skip to content

feat: adds reusable actions#296

Open
baywet wants to merge 77 commits into
OAI:mainfrom
baywet:feat/action-templates
Open

feat: adds reusable actions#296
baywet wants to merge 77 commits into
OAI:mainfrom
baywet:feat/action-templates

Conversation

@baywet

@baywet baywet commented Feb 18, 2026

Copy link
Copy Markdown
Member

This pull request adds reusable actions.

closes #238

Reusable actions are a much simpler iteration of anything previously proposed/iterated on:

  • component actions that can define any field that are available in actions today EXCEPT FOR the target
  • reference objects that have at least $ref and target in the actions array
  • reference object MAY also override anything from the referenced reusable action (copy/update/remove/description)

This iteration is better than earlier proposals because it's as simple as we can possibly make it. (no matrix, no variables, no string interpolation, etc...)

@baywet baywet added this to the Release 1.2 milestone Feb 18, 2026
@baywet baywet requested review from handrews, karenetheridge, lornajane, mikekistler, mkistler and ralfhandl and removed request for mkistler February 18, 2026 18:37
@ralfhandl

Copy link
Copy Markdown
Contributor

I like the general direction.

@baywet

baywet commented Feb 24, 2026

Copy link
Copy Markdown
Member Author

Feedback from the meeting from both @lornajane and @ralfhandl :

  • add a peer block to parameters for the environment variables, this allows to set defaults and "declare" which variables are used. But this declaration is optional.
  • add a peer "actions" in the components, that's defined as everything except for the target. So people can specify the target on reference. Reusable actions may use action templates in turns.

Signed-off-by: Vincent Biret <vincentbiret@hotmail.com>
Signed-off-by: Vincent Biret <vincentbiret@hotmail.com>
Signed-off-by: Vincent Biret <vincentbiret@hotmail.com>
Signed-off-by: Vincent Biret <vincentbiret@hotmail.com>
Signed-off-by: Vincent Biret <vincentbiret@hotmail.com>
Signed-off-by: Vincent Biret <vincentbiret@hotmail.com>
@baywet baywet force-pushed the feat/action-templates branch from e709bde to 06a21c9 Compare February 25, 2026 15:19
@baywet baywet changed the title feat: adds action templates feat: adds action templates and reusable actions Feb 25, 2026

@ralfhandl ralfhandl left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly wording and capitalization

Comment thread versions/1.2.0-dev.md Outdated
Comment thread versions/1.2.0-dev.md Outdated
Comment thread versions/1.2.0-dev.md Outdated
Comment thread versions/1.2.0-dev.md Outdated
Comment thread versions/1.2.0-dev.md Outdated
Comment thread versions/1.2.0-dev.md Outdated
Comment thread versions/1.2.0-dev.md Outdated
Comment thread versions/1.2.0-dev.md Outdated
Comment thread versions/1.2.0-dev.md Outdated
Comment thread versions/1.2.0-dev.md Outdated
baywet and others added 3 commits February 25, 2026 11:37
Co-authored-by: Ralf Handl <ralf.handl@gmail.com>
Co-authored-by: Ralf Handl <ralf.handl@gmail.com>
Co-authored-by: Ralf Handl <ralf.handl@gmail.com>
Comment thread versions/1.2.0-dev.md Outdated
@baywet baywet requested a review from ralfhandl February 25, 2026 18:56
baywet added 3 commits March 3, 2026 08:33
Signed-off-by: Vincent Biret <vincentbiret@hotmail.com>
…rlay-Specification into feat/action-templates

Signed-off-by: Vincent Biret <vincentbiret@hotmail.com>
Signed-off-by: Vincent Biret <vincentbiret@hotmail.com>
@baywet

baywet commented Mar 3, 2026

Copy link
Copy Markdown
Member Author

@ralfhandl @lornajane I pushed another update a couple of minutes ago. I wasn't happy about the whole reusable actions vs action templates kind of thing. After chatting with @mikekistler internally I realized we could simply define a an action template reference object as "you can override anything from the resolved template in the reference" like JSON schema does to some extent. And keep things extra simple.

Let me know what you think!

@baywet baywet requested a review from mikekistler June 4, 2026 17:05
Comment thread schemas/v1.2-dev/schema.yaml Outdated
@baywet baywet requested a review from ralfhandl June 5, 2026 16:35
ralfhandl
ralfhandl previously approved these changes Jun 7, 2026

@lornajane lornajane left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Had a more detailed pass at it this time, added a few comments for things we should take a second glance at (especially considering how much refactoring has been done on this one) but nothing fundamental I promise!

Comment thread versions/1.2.0-dev.md
Comment thread versions/1.2.0-dev.md Outdated
Comment thread versions/1.2.0-dev.md Outdated
Comment thread versions/1.2.0-dev.md
Comment thread versions/1.2.0-dev.md
Comment thread tests/v1.2-dev/fail/reusable-action-reference-unescaped-component-key.yaml Outdated
Comment thread tests/v1.2-dev/fail/reusable-action-reference-unescaped-tilde-component-key.yaml Outdated
Comment thread tests/v1.2-dev/pass/components-extensions.yaml Outdated
Comment thread tests/v1.2-dev/pass/reusable-action-empty-fields.yaml
Comment thread tests/v1.2-dev/pass/reusable-action-extensions.yaml
baywet and others added 5 commits June 8, 2026 09:52
Signed-off-by: Vincent Biret <vincentbiret@hotmail.com>
Signed-off-by: Vincent Biret <vincentbiret@hotmail.com>
Signed-off-by: Vincent Biret <vincentbiret@hotmail.com>
Signed-off-by: Vincent Biret <vincentbiret@hotmail.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
baywet and others added 2 commits June 8, 2026 10:17
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Vincent Biret <vincentbiret@hotmail.com>
@baywet

baywet commented Jun 8, 2026

Copy link
Copy Markdown
Member Author

@lornajane thanks for the great suggestions here! I took the liberty of resolving the ones that I considered trivial. Let me know what you think!

@baywet baywet requested a review from lornajane June 8, 2026 14:29
mikekistler
mikekistler previously approved these changes Jun 8, 2026

@mikekistler mikekistler left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-approving.

Comment thread versions/1.2.0-dev.md Outdated
Comment thread versions/1.2.0-dev.md Outdated
Comment thread versions/1.2.0-dev.md Outdated
Co-authored-by: Ralf Handl <ralf.handl@gmail.com>
mikekistler
mikekistler previously approved these changes Jun 16, 2026

@mikekistler mikekistler left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. 👍

baywet added 3 commits June 16, 2026 11:08
Signed-off-by: Vincent Biret <vincentbiret@hotmail.com>
Signed-off-by: Vincent Biret <vincentbiret@hotmail.com>
Signed-off-by: Vincent Biret <vincentbiret@hotmail.com>
Comment thread versions/1.2.0-dev.md

This object MAY be extended with [Specification Extensions](#specification-extensions).

In case a description is defined in `fields` of the referenced [Reusable Action Object](#reusable-action-object) and in the Reference Object, the description from the Reference Object MUST be used.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I thought more about this since we last discussed it and I think I've changed my mind... The reusable action is more generic, and the action that refers to it is more specific. So the overlay action's description should be used if it has one, and we can fall back to the reusable action's description if it doesn't.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I'm understanding your comment correctly, it should already be possible with the current wording?

When:

  • the reusable action has a description, but not the reference, use the one in the reusable action
  • the reusable action does not have a description, but the reference does, use the one from the reference.
  • both have a description, use the one from the reference.

Is this not what you expect anymore? Is the current wording unclear with regards to the intent?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've read this a couple more times and I think it's the language that is confusing (I know I'm supposed to be helping with this, not making it more confusing!). I think part of the problem here is that we are referring to something as a "reference" that can define a target or a description alongside, but actually I think we should be referring to an "action" as defined in the actions section , or a "reusable action" as defined in the components section.

Specifically to the description field which I think is the only thing we can define in either location now: if only one or other location has it, use that, but if they both do then the action (defined in the actions: section) should be used, not the more generic one from the reusable action (defined in components.actions).

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
In case a description is defined in `fields` of the referenced [Reusable Action Object](#reusable-action-object) and in the Reference Object, the description from the Reference Object MUST be used.
In case a description is defined in `fields` of the referenced [Reusable Action Object](#reusable-action-object) and in the [Reusable Action Reference Object](#reusable-action-reference-object), the description from the Reusable Action Reference Object MUST be used.

Is this better?

And the reason why we have a Reusable Action Reference Object different from the Action Object is because of the difference in required fields between the two. @handrews and I didn't want to write a bunch of conditional requirements after the experience in OpenAPI parameters, headers, etc...

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants