From e1d3961f3d89bd05239775b5f4fe5fd2a6162a06 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Fri, 31 Oct 2025 10:32:46 -0400 Subject: [PATCH 1/6] fix: explicitly call out the RFC for JSON path query expressions Signed-off-by: Vincent Biret --- versions/1.1.0-dev.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/versions/1.1.0-dev.md b/versions/1.1.0-dev.md index 96b04eb..b05d9c7 100644 --- a/versions/1.1.0-dev.md +++ b/versions/1.1.0-dev.md @@ -21,7 +21,7 @@ The main purpose of the Overlay Specification is to provide a way to repeatably ### Overlay -An Overlay is a JSON or YAML structure containing an ordered list of [Action Objects](#overlay-actions) that are to be applied to the target document. Each [Action Object](#action-object) has a `target` property and a modifier type (`update` or `remove`). The `target` property is a [[RFC9535|JSONPath]] query expression that identifies the elements of the target document to be updated and the modifier determines the change. +An Overlay is a JSON or YAML structure containing an ordered list of [Action Objects](#overlay-actions) that are to be applied to the target document. Each [Action Object](#action-object) has a `target` property and a modifier type (`update` or `remove`). The `target` property is a [[RFC9535|RFC9535 JSONPath]] query expression that identifies the elements of the target document to be updated and the modifier determines the change. ## Specification @@ -113,7 +113,7 @@ This object represents one or more changes to be applied to the target document | Field Name | Type | Description | | ---- | :----: | ---- | -| target | `string` | **REQUIRED** A JSONPath expression selecting nodes in the target document. | +| target | `string` | **REQUIRED** A RFC9535 JSONPath query expression selecting nodes in the target document. | | description | `string` | A description of the action. [[CommonMark]] syntax MAY be used for rich text representation. | | update | Any | If the `target` selects an object node, the value of this field MUST be an object with the properties and values to merge with the selected node. If the `target` selects an array, the value of this field MUST be an entry to append to the array. This field has no impact if the `remove` field of this action object is `true`. | | remove | `boolean` | A boolean value that indicates that the target object or array MUST be removed from the the map or array it is contained in. The default value is `false`. | From 02eb2e0101517f861e28328512f91d248fa7e849 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Fri, 31 Oct 2025 10:45:02 -0400 Subject: [PATCH 2/6] feat: adds a section about RFC compliance Signed-off-by: Vincent Biret --- versions/1.1.0-dev.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/versions/1.1.0-dev.md b/versions/1.1.0-dev.md index b05d9c7..b17a880 100644 --- a/versions/1.1.0-dev.md +++ b/versions/1.1.0-dev.md @@ -282,6 +282,28 @@ The extensions may or may not be supported by the available tooling, but those m Overlay files MAY choose to follow the convention of a `purpose.overlay.yaml` file naming pattern. Other file naming conventions are also supported. +### RFC9535 compliance + +[[RFC9535|RFC9535]] is a recent specification and libraries implementing JSONPath support might predate the RFC. Those libraries might differ entirely (expressions syntax is incompatible), or implement additional capabilities (superset of the RFC). A tool or library MUST fully implement [[RFC9535|RFC9535]] when parsing and expanding JSONPath query expressions to be compliant with the Overlay specification. + +Users SHALL refrain from using additional capabilities offered by the tool's JSONPath implementation to avoid any interoperability issues with their Overlay Documents. + +In case the tool being use is not fully compliant with RFC9535, users MIGHT have to update some JSONPath query expressions to accommodate for the implementation in use. + +### Example of updates to JSONPath + +This example JSONPath query expression: + +```jsonpath +$.paths.*.get.parameters[?@.name=='filter' && @.in=='query'] +``` + +Might require additional optional parenthesis with some implementations like so: + +```jsonpath +$.paths.*.get.parameters[?(@.name=='filter' && @.in=='query)'] +``` + ## Appendix A: Revision History | Version | Date | Notes | From 4dddb2581cdfa75a6e10d77bccbf1f471e5fb211 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Fri, 31 Oct 2025 12:23:18 -0400 Subject: [PATCH 3/6] Apply suggestions from code review Co-authored-by: Ralf Handl --- versions/1.1.0-dev.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/versions/1.1.0-dev.md b/versions/1.1.0-dev.md index 590c2fc..1f2473b 100644 --- a/versions/1.1.0-dev.md +++ b/versions/1.1.0-dev.md @@ -284,9 +284,9 @@ Other file naming conventions are also supported. ### RFC9535 compliance -[[RFC9535|RFC9535]] is a recent specification and libraries implementing JSONPath support might predate the RFC. Those libraries might differ entirely (expressions syntax is incompatible), or implement additional capabilities (superset of the RFC). A tool or library MUST fully implement [[RFC9535|RFC9535]] when parsing and expanding JSONPath query expressions to be compliant with the Overlay specification. +[[RFC9535]] is a recent specification and libraries implementing JSONPath support might predate the RFC. Those libraries might differ entirely (expressions syntax is incompatible), or implement additional capabilities (superset of the RFC). A tool or library MUST fully implement [[RFC9535]] when parsing and expanding JSONPath query expressions to be compliant with the Overlay specification. -Users SHALL refrain from using additional capabilities offered by the tool's JSONPath implementation to avoid any interoperability issues with their Overlay Documents. +Interoperable Overlay Documents MUST use RFC9535 JSONPath query expressions and MUST NOT use tool-specific JSONPath extensions. In case the tool being use is not fully compliant with RFC9535, users MIGHT have to update some JSONPath query expressions to accommodate for the implementation in use. From 8cca6e9fc3fabbc85c30d5f82611943a420613b0 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Mon, 3 Nov 2025 08:18:13 -0500 Subject: [PATCH 4/6] Apply suggestions from code review Co-authored-by: Ralf Handl --- versions/1.1.0-dev.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/versions/1.1.0-dev.md b/versions/1.1.0-dev.md index 8309843..50c6dec 100644 --- a/versions/1.1.0-dev.md +++ b/versions/1.1.0-dev.md @@ -292,7 +292,7 @@ Interoperable Overlay Documents MUST use RFC9535 JSONPath query expressions and In case the tool being use is not fully compliant with RFC9535, users MIGHT have to update some JSONPath query expressions to accommodate for the implementation in use. -### Example of updates to JSONPath +#### Example of Differences between JSONPath Implementations This example JSONPath query expression: @@ -300,7 +300,7 @@ This example JSONPath query expression: $.paths.*.get.parameters[?@.name=='filter' && @.in=='query'] ``` -Might require additional optional parenthesis with some implementations like so: +might require additional optional parenthesis with some implementations like so: ```jsonpath $.paths.*.get.parameters[?(@.name=='filter' && @.in=='query)'] From d5c7381fcfa07023fa82be6fb80e3366b6964cd9 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Mon, 3 Nov 2025 08:22:29 -0500 Subject: [PATCH 5/6] docs: moves the RFC interop issue example to the readme Signed-off-by: Vincent Biret --- README.md | 18 ++++++++++++++++++ versions/1.1.0-dev.md | 15 --------------- 2 files changed, 18 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 788db9d..fdf4dfe 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,24 @@ If you are looking for tools to use with Overlays, try these: (Is something missing from the list? Send us a pull request to add it!) +## Support for RFC9535 JSONPath + +[[RFC9535]] is a recent specification and libraries implementing JSONPath support might predate the RFC. Those libraries might differ entirely (expressions syntax is incompatible), or implement additional capabilities (superset of the RFC). + +In case the tool being use is not fully compliant with RFC9535, users MIGHT have to update some JSONPath query expressions to accommodate for the implementation in use. + +This example JSONPath query expression: + +```jsonpath +$.paths.*.get.parameters[?@.name=='filter' && @.in=='query'] +``` + +might require additional optional parenthesis with some implementations like so: + +```jsonpath +$.paths.*.get.parameters[?(@.name=='filter' && @.in=='query)'] +``` + ## Licensing See: [License (Apache-2.0)](./LICENSE) diff --git a/versions/1.1.0-dev.md b/versions/1.1.0-dev.md index 50c6dec..8d74cc6 100644 --- a/versions/1.1.0-dev.md +++ b/versions/1.1.0-dev.md @@ -290,21 +290,6 @@ Other file naming conventions are also supported. Interoperable Overlay Documents MUST use RFC9535 JSONPath query expressions and MUST NOT use tool-specific JSONPath extensions. -In case the tool being use is not fully compliant with RFC9535, users MIGHT have to update some JSONPath query expressions to accommodate for the implementation in use. - -#### Example of Differences between JSONPath Implementations - -This example JSONPath query expression: - -```jsonpath -$.paths.*.get.parameters[?@.name=='filter' && @.in=='query'] -``` - -might require additional optional parenthesis with some implementations like so: - -```jsonpath -$.paths.*.get.parameters[?(@.name=='filter' && @.in=='query)'] -``` ### Comments in OpenAPI descriptions From b667690fbf37ca4e6bc4c6c1d4aed71ea2073d11 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Mon, 3 Nov 2025 12:08:46 -0500 Subject: [PATCH 6/6] Update README.md Co-authored-by: Ralf Handl --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index fdf4dfe..d936954 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ If you are looking for tools to use with Overlays, try these: ## Support for RFC9535 JSONPath -[[RFC9535]] is a recent specification and libraries implementing JSONPath support might predate the RFC. Those libraries might differ entirely (expressions syntax is incompatible), or implement additional capabilities (superset of the RFC). +[[RFC9535]] is a recent specification and libraries implementing JSONPath support might predate the RFC. Those libraries might differ entirely (expressions syntax is incompatible), implement additional capabilities (superset of the RFC), or support only a subset of the RFC. In case the tool being use is not fully compliant with RFC9535, users MIGHT have to update some JSONPath query expressions to accommodate for the implementation in use.