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>
Signed-off-by: Vincent Biret <vincentbiret@hotmail.com>
Signed-off-by: Vincent Biret <vincentbiret@hotmail.com>
Signed-off-by: Vincent Biret <vincentbiret@hotmail.com>
chore: refactors unevaluated json to avoid duplication Signed-off-by: Vincent Biret <vincentbiret@hotmail.com>
…get everywhere Signed-off-by: Vincent Biret <vincentbiret@hotmail.com>
Signed-off-by: Vincent Biret <vincentbiret@hotmail.com>
…e actions Signed-off-by: Vincent Biret <vincentbiret@hotmail.com>
Signed-off-by: Vincent Biret <vincentbiret@hotmail.com>
Signed-off-by: Vincent Biret <vincentbiret@hotmail.com>
|
Update, I've had some more time to spend on this. I believe I've addressed all the feedback and got this to a place much closer to a finalized version/ready for a formal vote. Noteable changes:
Let me know if you have any additional comments or questions. |
Signed-off-by: Vincent Biret <vincentbiret@hotmail.com>
Signed-off-by: Vincent Biret <vincentbiret@hotmail.com>
Signed-off-by: Vincent Biret <vincentbiret@hotmail.com>
…r versions of the specification Signed-off-by: Vincent Biret <vincentbiret@hotmail.com>
|
Note: I've just added a lot of tests to improve the coverage. This is going to temporarily make the review more difficult. I've extracted the tests for the current schema (not the changes in this pull request) in #317 in the hope that we merge that one first, making the diff here smaller. |
Signed-off-by: Vincent Biret <vincentbiret@hotmail.com>
| | Field Name | Type | Description | | ||
| | ---- | :----: | ---- | | ||
| | <a name="reusable-action-parameter-name"></a>name | `string` | **REQUIRED** The name of the parameter, MUST match the key for the string literal replacement expression. | | ||
| | <a name="reusable-action-parameter-default>default | Any | A default value for the parameter to use when no value is provided by the reference. Optional. | |
There was a problem hiding this comment.
collecting notes from my implementation work: it might be better to restrain this to string instead of any json value. Having any json value poses a couple of issues:
- string interpolation is not "just string interpolation" anymore (you need to consider the object tree), and that brings a higher chance of ending up with an invalid resolved value in the end
- environment variables would never be able to support that.
So both in the name of simplicity and uniformity I suggest we change this, and the parameter value field to string types instead of json values.
|
|
||
| | 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/`. | |
There was a problem hiding this comment.
@handrews I think that also effectively means that any reusable action (entries under components/actions) MUST have / and ~ encoded according to the JSON pointer semantics. I think we should call this out explicitly in the components section, what do you think?
| | ---- | :----: | ---- | | ||
| | <a name="reusable-action-parameters"></a>parameters | [[Reusable action parameter object](#reusable-action-parameter-object)] | A list of parameters to be used during string literal replacement. Optional. | | ||
| | <a name="reusable-action-environment-variables"></a>environmentVariables | [[Reusable action parameter object](#reusable-action-parameter-object)] | A list of environment variables to be used during string literal replacement. Optional. | | ||
| | <a name="reusable-action-action-fields"></a>Any field defined in the [action object](#action-object) | mixed | The [string literal replacement syntax](#string-literal-replacement-syntax) MAY be used for any of the fields, and the replacements MUST be evaluated as the reusable action reference is being resolved. | |
There was a problem hiding this comment.
Here we need to restrict the interpolation syntax to apply only to string fields (Target, Copy, Description), because for others (Remove) it breaks the JSON schema validation of the document).
And for Update, it poses a lot of additional questions (env vs params, what happens if the resulting JSON doesn't match the structure we expect (requirement for this field), etc...
|
Finalized the implementation of the current version of the spec over here BinkyLabs/openapi-overlays-dotnet#276 (some LLMs were hurt in the process) |
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.