Skip to content

Instantly share code, notes, and snippets.

@ponelat
Last active August 11, 2022 17:14
Show Gist options
  • Save ponelat/2ce2e23090c9c42dfd3d296de8573ccd to your computer and use it in GitHub Desktop.
Save ponelat/2ce2e23090c9c42dfd3d296de8573ccd to your computer and use it in GitHub Desktop.
Remove tags

How to use:

# You may need to update the links in the gists to work.
curl -sNL https://gist.githubusercontent.com/ponelat/2ce2e23090c9c42dfd3d296de8573ccd/raw/8bb3ea588fc8545c80d492a6da3979490d2ad996/overlay.yml | npx overlays-cli@latest

Note: requires Node 16+

See: https://github.com/ponelat/overlays-cli

openapi: 3.0.3
info:
title: Remove tag with Overlays
description: Remove tag with [Overlays-CLI](https://github.com/ponelat/overlays-cli)
version: 1.0.0
paths:
/v1/do/this:
get:
tags:
- InternalTag
- ExternalTagA
responses:
default:
description: ok
/v1/do/that:
get:
tags:
- InternalTag
- ExternalTagB
responses:
default:
description: ok
/v1/do/somethingelse:
post:
tags:
- InternalTag
- ExternalTagA
responses:
default:
description: ok
overlays: 1.0.0
extends: https://gist.githubusercontent.com/ponelat/2ce2e23090c9c42dfd3d296de8573ccd/raw/0977fe313c74b82c8f1f6832f941bbf2afac36db/openapi.yml
actions:
- target: '$..tags[?(@ == "InternalTag")]'
remove: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment