Skip to content

feat: adds reusable actions#296

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

feat: adds reusable actions#296
baywet wants to merge 73 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!

@mikekistler mikekistler 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.

Looks good. 👍

I made some suggestions that I think are improvements, but will leave the decision to you . Feel free to ignore these if you think they are off the mark.

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 Outdated
mikekistler
mikekistler previously approved these changes Jun 3, 2026

@mikekistler mikekistler 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.

Sorry ... that should have been a Approve.

Co-authored-by: Mike Kistler <mikekistler@microsoft.com>
@baywet baywet dismissed stale reviews from mikekistler and ralfhandl via fb4b8b0 June 3, 2026 14:53
mikekistler
mikekistler previously approved these changes Jun 3, 2026

@mikekistler mikekistler 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.

Looks good! 👍

Comment thread versions/1.2.0-dev.md
Co-authored-by: Ralf Handl <ralf.handl@gmail.com>
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

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.

We might want to update the Overlay section in Definitions to make it a bit less specific? Right now it says

An Overlay is a JSON or YAML structure containing an ordered list of Action Objects that are to be applied to the target document.

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.

attempted an update via a8c1719

Happy to take better suggestions.

Comment thread versions/1.2.0-dev.md
1. A Reusable Action Object has to be referenced by a Reusable Action Reference Object to have any effect on the OpenAPI description.

#### Reusable Action Reference Object

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.

Let's add a sentence or two about what a resusable action reference object is and what it's for before we describe its fields

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.

added in 3515bf7

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
@@ -0,0 +1,10 @@
overlay: 1.2.0
info:
title: Reusable action with empty fields

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 don't think I understand this one (and therefore probably didn't understand an earlier case that I also commented on!). How can an action have empty fields and succeed? Also should the one action in the collection here include a $ref ?

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.

Here we're simply testing the JSON schema. This tests that:

  1. fields is required on the reusable action object
  2. any field under fields is not required (because we use the same base schema as the actions, and that was not required, and requiring it now would be breaking)

Let me know if you have any additional comments or questions.

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 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.

Re-approving.

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