Closed vincentvanderweele closed 7 years ago
Hi Vincent,
thank you for your contribution :blush: This feature really is a great addition to this module. However there are two things you could improve in your PR:
README.md
filetags
array (e.g. by using lodash's uniq
function). If you want to you can do this for the renameTags
function as well.Integration tests are optional, maybe we will add some later.
Will do!
Currently I have a problem that an array gets converted to an object with integer keys. I'm not sure if my change is causing this, but if it is, I'll obviously fix that as well in this PR.
renameTags
and addTags
and added testcases for that
As described in #1, I added support for adding tags to all endpoints of a specific service, like this:
There are of course two places where tags are used: in the schema root and in every operation. I chose to only add these tags to the operation tags because the root tags will all be merged into a single array anyway (so it doesn't make much sense to allow adding tags per service).
I don't handle the case that an added tag already exists because
renameTags
doesn't handle that either. I also chose to not add a new integration test for this functionality but this can of course be added if needed.