Mermade / openapi-filter

Filter internal paths, operations, parameters, schemas etc from OpenAPI/Swagger/AsyncAPI definitions

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`tags` array and inverse mode; multiple elements filtered

pineman opened this issue · comments

This may be a regression from #26.
We use a top-level tags with multiple filtered elements.
Reproduce:

input

openapi: 3.0.0
info:
  title: API
  version: 1.0.0
tags:
  - name: Tag 1
  - "x-public": true
    name: Tag 2
  - "x-public": true
    name: Tag 3
  - "x-public": true
    name: Tag 4
paths: {}

output

tags:
  - x-public: true
    name: Tag 4

But we expected:

tags:
  - x-public: true
    name: Tag 2
  - x-public: true
    name: Tag 3
  - x-public: true
    name: Tag 4

Thanks in advance.

Fixed in openapi-filter@2.0.2 - many thanks for reporting.