We always completely ignore conflicts. Rather than hack around this, it would be good to have an option to ignore any number of conflicts.
A little hack for those who need this:
COLLISIONS_COUNT=$( \
go run github.com/go-swagger/go-swagger/cmd/swagger mixin \
--quiet \
--output ./api/openapi/openapi.json \
${INPUT_FILES[@]} 2>&1 | awk '{print $NF}' \
)
go run github.com/go-swagger/go-swagger/cmd/swagger mixin \
-c "${COLLISIONS_COUNT}" \
--quiet \
--output ./api/openapi/openapi.json \
${INPUT_FILES[@]}
Yes that could be a nice addition. Having collision count as an exit code value has always been flaky.
Feel free to push a PR improving the CLI this way (e.g. --ignore-conflicts or something of the like)
I made a pr for this: https://github.com/go-swagger/go-swagger/pull/2375
Most helpful comment
A little hack for those who need this: