Skip to content

Overlay with update: [] doesn't actually update the spec #790

@jamietanna

Description

@jamietanna

Given spec.yaml:

openapi: 3.1.0
info:
  title: "..."
  description: "..."
  version: 1.0.0

servers:
  - url: https://example.com
    description: Super secret, don't share!

And overlay.yaml:

overlay: 1.0.0
info:
  title: "..."
  version: 1.0.0
actions:
  - target: $.servers
    update: []

When running:

npx bump-cli@2.9.11 overlay spec.yaml overlay.yaml

the resulting spec is:

openapi: 3.1.0
info:
  title: ...
  description: ...
  version: 1.0.0
servers:
  - url: 'https://example.com'
    description: 'Super secret, don''t share!'

However, I would expect it to have replaced the servers with an empty array

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions