Skip to content

Reference objects for update property #29

Open
@adamaltman

Description

@adamaltman

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions