bump-sh / bump-sh/cli

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

Open
#790 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
71
Forks
9
Avg merge
7m
Merged PRs (30d)
4

Description

Given `spec.yaml`:

```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`:

```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:

```yaml
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

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.