Closed warmans closed 6 years ago
I think the best will be to have the option that will switch the set
for append
as you proposed
OK I'll probably work on a PR for this later today.
In beta branch I have refactored the code and split it to separate functions, I am also planning to add linting. You can wait till it is in master so I wouldn't mess up your work with conflicts.
here is an example swagger parameter definition:
and here is what gets generated for that parameter
The filters array ends up being joined with commas.
What should happen:
The generated code for the param should look more like this:
This is unfortunately arguable since apparently there is not a clear standard. However multiple params with the same name is the most and reliable approach AFAIK so it should probably be used.
The functionality could be hidden behind a flag for backwards compatibility i.e. it uses
set
by default butappend
if--append-array-params
is supplied during generation.