Skip to content

Allow updating and removing primitive values #57

Open
@ralfhandl

Description

@ralfhandl

The current text does not allow directly targeting a primitive value, for example a certain string in the tags array of an Operation Object, and thus does not allow a convenient/workable way to remove or replace a certain tag name without knowing all other tag names in the tags field.

Proposal

Allow target JSON Path expressions to select nodes of all JSON types.

For example allow

overlay: 1.0.0
info:
  title: Remove a string from the tags array of all operations
  version: 1.0.0
actions:
  - target: $.paths.*.*.tags[?@ == 'dummy']
    remove: true

and

overlay: 1.0.0
info:
  title: Preplace a string in the tags array of all operations
  version: 1.0.0
actions:
  - target: $.paths.*.*.tags[?@ == 'Foo']
    update: "Bar"

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions