Skip to content
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

Root element not understood when using a structured overlay #6

Closed
lornajane opened this issue Nov 16, 2023 · 1 comment
Closed

Root element not understood when using a structured overlay #6

lornajane opened this issue Nov 16, 2023 · 1 comment

Comments

@lornajane
Copy link
Owner

I get an error when trying to apply a structured overlay that targets the whole OpenAPI document. The error is Error applying overlay: couldn't understand path

The overlay is very simple:

overlay: 1.0.0
info:
  title: Structured Overlay
  version: 1.0.0
actions:
- target: "$"   # Root of document
  update:
    info:
      x-overlaid: yes

Expected behaviour: overlay applied correctly.

Potentially related: dchester/jsonpath#72

paulRbr added a commit to paulRbr/openapi-overlays-js that referenced this issue Mar 26, 2024
This commit allows for updates on the root target ('$'). The Jsonpath
lib doesn't know how to treat `.apply(` when the target is the root
object rightly so. Instead, let's manually merge the global spec
object when the JSON path target is '$'.

About lornajane#6
paulRbr added a commit to paulRbr/openapi-overlays-js that referenced this issue Apr 8, 2024
This commit allows for updates on the root target ('$'). The Jsonpath
lib doesn't know how to treat `.apply(` when the target is the root
object rightly so. Instead, let's manually merge the global spec
object when the JSON path target is '$'.

About lornajane#6
paulRbr added a commit to paulRbr/openapi-overlays-js that referenced this issue Apr 8, 2024
This commit allows for updates on the root target ('$'). The Jsonpath
lib doesn't know how to treat `.apply(` when the target is the root
object rightly so. Instead, let's manually merge the global spec
object when the JSON path target is '$'.

About lornajane#6
@lornajane
Copy link
Owner Author

Fixed in #20

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

No branches or pull requests

1 participant