Skip to content

Updated Overlay proposal #2300

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 1, 2021
Merged

Updated Overlay proposal #2300

merged 3 commits into from
Apr 1, 2021

Conversation

darrelmiller
Copy link
Member

Updated with "add" and "merge" fields instead of just "value".

@@ -63,10 +63,11 @@ This object represents one or more changes to be applied to the target document
Field Name | Type | Description
---|:---:|---
<a name="updateTarget"></a>target | `string` | A JMESPath expression referencing the target objects in the target document.
<a name="updateValue"></a>value | [Any](#valueObject) | An object with the properties and values to be updated in the target document. Property has no impact if `remove` property is `true`.
<a name="updateAdd"></a>add | [Any](#addObject) | An object to be added as a child of the object(s) referenced by the target. Property has no impact if `remove` property is `true`.
Copy link
Member

Choose a reason for hiding this comment

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

I can see how add works for arrays. For objects, what is the name/key of the child object being added, or is add not applicable to objects?

@@ -63,10 +63,11 @@ This object represents one or more changes to be applied to the target document
Field Name | Type | Description
---|:---:|---
<a name="updateTarget"></a>target | `string` | A JMESPath expression referencing the target objects in the target document.
<a name="updateValue"></a>value | [Any](#valueObject) | An object with the properties and values to be updated in the target document. Property has no impact if `remove` property is `true`.
<a name="updateAdd"></a>add | [Any](#addObject) | An object to be added as a child of the object(s) referenced by the target. Property has no impact if `remove` property is `true`.
<a name="updateMerge"></a>merge | [Any](#mergeObject) | An object with the properties and values to be merged with the object(s) referenced by the target. Property has no impact if `remove` property is `true`.
Copy link
Member

Choose a reason for hiding this comment

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

I can see how merge works for objects, but we should either say how merge works for arrays (provide an example?) or expressly forbid it.

@darrelmiller darrelmiller merged commit 6e5b27a into master Apr 1, 2021
@darrelmiller darrelmiller deleted the dm/overlayupdate branch April 1, 2021 16:19
@FWiesner
Copy link

FWiesner commented Apr 1, 2021

@darrelmiller what is the right ticket to comment on Overlays as shown on the TSC call today?

charjr pushed a commit to charjr/OpenAPI-Specification that referenced this pull request Apr 27, 2023
* Updated Overlay proposal

* fixed examples

* Update proposals/004_Overlays.md

Co-authored-by: Mike Ralphson <[email protected]>

Co-authored-by: Mike Ralphson <[email protected]>
charjr pushed a commit to charjr/OpenAPI-Specification that referenced this pull request Apr 27, 2023
* Updated Overlay proposal

* fixed examples

* Update proposals/004_Overlays.md

Co-authored-by: Mike Ralphson <[email protected]>

Co-authored-by: Mike Ralphson <[email protected]>
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.

3 participants