openapi-merge icon indicating copy to clipboard operation
openapi-merge copied to clipboard

x-tagGroups Only keeps first file's tags

Open pedrodagraca opened this issue 2 years ago • 3 comments

Hi,

I'm using the cli to merge 2 openapi json files. The x-tagGroups in the result json only has the first file's x-tagGroups array.

Any ideas?

pedrodagraca avatar Mar 21 '22 18:03 pedrodagraca

This is expected behaviour according to the test cases: https://github.com/robertmassaioli/openapi-merge/blob/main/packages/openapi-merge/src/tests/x-tensions.test.ts

The x-* fields are extensions of OpenAPI and could be in any format at all. Is this a feature request for merging arbitrary JSON blobs in x-* fields? Maybe for being able to provide you own custom merge logic just for that field?

robertmassaioli avatar Mar 21 '22 22:03 robertmassaioli

I see. Yes, in that case this would be a feature request for merging those x-* blobs. I currently use Redoc, which uses the x-tagGroups field in order to create a higher level grouping of the endpoints.

pedrodagraca avatar Mar 22 '22 07:03 pedrodagraca

I think that the program should treat the x-* tags the same as the others, because when you use some implementation, (e.g: redocly with the x-tagGroups) the implmentation itself has consistency. It could be a really useful feature for the future. (I'm currently having the same problem as @pedrodagraca)

WenceslaoMateos avatar Nov 17 '22 17:11 WenceslaoMateos