Skip to content

Better $ref support #32

@lornajane

Description

@lornajane

Not all the use cases work as I would expect when $ref is in the value to apply. For example the following overlay:

overlay: 1.0.0
info:
  title: Update stuff
  version: 1.0.0
actions:
- target: $.paths.*.get
  update:
    parameters:
      - $ref: "#/components/schemas/filterSchema"

Produces this for the first GET PathItem:

      parameters:
        - &ref_0
          $ref: '#/components/schemas/filterSchema'

And then for all the others:

      parameters:
        - *ref_0

Which isn't what I'd expect.

The $ref: line should be added to the document as-is, everywhere it applies. It's the responsibility of the user to make sure that reference actually exists.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions