Conversation
|
I like the general direction. |
|
Feedback from the meeting from both @lornajane and @ralfhandl :
|
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>
e709bde to
06a21c9
Compare
ralfhandl
left a comment
There was a problem hiding this comment.
Mostly wording and capitalization
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>
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>
|
@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! |
…ferences Signed-off-by: Vincent Biret <vincentbiret@hotmail.com>
|
Finalized the implementation of the current version of the spec over here BinkyLabs/openapi-overlays-dotnet#276 (some LLMs were hurt in the process) |
ralfhandl
left a comment
There was a problem hiding this comment.
Only reviewed the examples.
Co-authored-by: Ralf Handl <ralf.handl@gmail.com>
Signed-off-by: Vincent Biret <vincentbiret@hotmail.com>
Signed-off-by: Vincent Biret <vincentbiret@hotmail.com>
mikekistler
left a comment
There was a problem hiding this comment.
I think this is very close now. I left a few more comments about possible improvements.
Signed-off-by: Vincent Biret <vincentbiret@hotmail.com>
Signed-off-by: Vincent Biret <vincentbiret@hotmail.com>
ralfhandl
left a comment
There was a problem hiding this comment.
Only minor suggestions
tests/v1.2-dev/fail/action-with-environment-variables-invalid.yaml
Outdated
Show resolved
Hide resolved
tests/v1.2-dev/fail/action-with-environment-variables-invalid.yaml
Outdated
Show resolved
Hide resolved
Co-authored-by: Ralf Handl <ralf.handl@gmail.com> Co-authored-by: Vincent Biret <vincentbiret@hotmail.com>
Signed-off-by: Vincent Biret <vincentbiret@hotmail.com>
Signed-off-by: Vincent Biret <vincentbiret@hotmail.com>
…ect nodes Signed-off-by: Vincent Biret <vincentbiret@hotmail.com>
Signed-off-by: Vincent Biret <vincentbiret@hotmail.com>
|
Sharing some number from the refactor on our internal repos: we're seeing about 30% reduction on average. Of course that number highly depends on how repetitive your Overlay document is. |
mikekistler
left a comment
There was a problem hiding this comment.
Looks good. 👍
I think this is a valuable addition to Overlays and will help expand their adoption.
I wish we could fix some of the terminology quirks we have discussed -- in particular "Reusable Action Objects" -- but I don't want to make perfect the enemy of the good.
handrews
left a comment
There was a problem hiding this comment.
A few minor comments and questions.
| | ---- | :----: | ---- | | ||
| | <a name="reusable-action-reference-ref"></a>$ref | `string` | **REQUIRED** A [same-document](https://www.rfc-editor.org/rfc/rfc3986.html#section-4.4) (or fragment-only) relative URI reference, per RFC3986 §4.4, and that the fragment syntax is JSON Pointer, with the pointer prefix restricted to `/components/actions/`. Component action keys in this pointer MUST be encoded according to [[RFC6901], Section 3](https://www.rfc-editor.org/rfc/rfc6901#section-3). | | ||
| | <a name="reusable-action-reference-parameter-values></a>parameterValues | `Map(string, string)` | A set of string values to use for the reusable action parameters, the key MUST match the parameter name. Optional. | | ||
| | <a name="reusable-action-reference-action-fields"></a>Any field defined in the [Action Object](#action-object) | mixed | Any field defined in the [Action Object](#action-object) to be used as an override to the value resolved in the reusable action. The [string literal replacement syntax](#string-literal-replacement-syntax) MAY NOT be used for any of the fields. Optional. | |
There was a problem hiding this comment.
This seems to be missing the field name and type? I see this is true in the other Object where I commented on RFC2119 usage as well? I also don't see a field name in the schema? I am confused here, is this a fixed field, and if so what is its name?
There was a problem hiding this comment.
This comment applies to line 218, I apparently missed when selecting lines 🤦
There was a problem hiding this comment.
The goal here was to say something along the lines of: "any field that's defined for the action object, you can also use here", without duplicating those. But if you think a copy paste instead would make the reading easier, I do that instead, what do you think?
There was a problem hiding this comment.
Please do not duplicate the fields, that will cause trouble later when fields are added to actions and not here.
There was a problem hiding this comment.
Thank you for the input. How do we reword this better so what we mean here is obvious then?
There was a problem hiding this comment.
@baywet this feels more like a "Patterned Fields" than a "Fixed Fields"? Also, I'm concerned about embedding an "any field..." in an object with fixed fields. It invites field name collision problems. Can we push this down under a field that would hold all of this stuff in its own namespace?
There was a problem hiding this comment.
Aaaah the collision aspect is a good callout (from the operations in OpenAPI) I had not thought out. We could in theory create a "definition" field which would effectively be an Overlay Action Object (with all fields optional, and the string interpolation turned on)
What do you think?
(using definition here for lack of better term, to avoid having another thing called "action")
There was a problem hiding this comment.
Seems like the right general idea, but definition has JSON Schema-ish re-use connotations... you could just call it fields?
There was a problem hiding this comment.
Sure! Always happy to get better name suggestions.
There was a problem hiding this comment.
Sure! Always happy to get better name suggestions.
Co-authored-by: Henry Andrews <andrews_henry@yahoo.com>
| | Field Name | Type | Description | | ||
| | ---- | :----: | ---- | | ||
| | <a name="reusable-action-reference-ref"></a>$ref | `string` | **REQUIRED** A [same-document](https://www.rfc-editor.org/rfc/rfc3986.html#section-4.4) (or fragment-only) relative URI reference, per RFC3986 §4.4, and that the fragment syntax is JSON Pointer, with the pointer prefix restricted to `/components/actions/`. Component action keys in this pointer MUST be encoded according to [[RFC6901], Section 3](https://www.rfc-editor.org/rfc/rfc6901#section-3). | | ||
| | <a name="reusable-action-reference-ref"></a>$ref | `string` | **REQUIRED** A [same-document](https://www.rfc-editor.org/rfc/rfc3986.html#section-4.4) (or fragment-only) relative URI reference, per RFC3986 §4.4, where that the fragment syntax is JSON Pointer with the pointer prefix restricted to `/components/actions/`. Component action keys in this pointer MUST be encoded according to [[RFC6901], Section 3](https://www.rfc-editor.org/rfc/rfc6901#section-3). | |
There was a problem hiding this comment.
where that the fragment syntax is JSON Pointer
"where the fragment is a JSON Pointer"
(If that is what you mean?)
This pull request adds action templates.
fixes #33
fixes #136
fixes #270
closes #238
This is another attempt to solve a scale limitation in the current specification. Action templates are better than the previous parameters proposal because:
The pull request is incomplete as it is, it's a draft, I want to collect feedback on the approach before making any further investments.