jlalmes / trpc-openapi

OpenAPI support for tRPC 🧩
https://www.npmjs.com/package/trpc-openapi
MIT License
2.18k stars 147 forks source link

Support OpenAPI V3 tags #445

Open zAlweNy26 opened 5 months ago

zAlweNy26 commented 5 months ago

OpenAPI has an interface for the tags key, but I saw there is this not-needed mapping in the generator file: https://github.com/jlalmes/trpc-openapi/blob/d1eab87f14fc4bf20b000dfc3ecb5fc5b105006b/src/generator/index.ts#L48

I think this package could support both an array of strings (like now) or an array of TagObject (from the openapi-types package). Or, if we want to introduce a "breaking change", just support the array of objects. Tell me if my suggestion makes sense to you, I can open a PR to fix that if it's ok.