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

Reference objects for update property #29

Open
adamaltman opened this issue Oct 10, 2023 · 0 comments
Open

Reference objects for update property #29

adamaltman opened this issue Oct 10, 2023 · 0 comments

Comments

@adamaltman
Copy link

Can a reference object ($ref) be used for the update property?

update Any An object with the properties and values to be merged with the object(s) referenced by the target. This property has no impact if remove property is true.

The reason I ask is that people struggle with the OpenAPI format itself. Take overlays and it adds an extra level of complexity. The spec seems silent about it and I'm unclear if Any allows for reference object usage.

I would like to be able to use the overlay like this:

overlay: 1.0.0
info:
  title: Structured Overlay
  version: 1.0.0
actions:
- target: "$"   # Root of document
  update:
    $ref: ./my/changed/openapi.yaml

Why? Because I could use my knowledge of OpenAPI, existing OpenAPI authoring tooling, and not need to learn anything new other than this little snippet I copy and paste into its own separate overlay.yaml file.

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