Go-swagger: feat: `swagger mixin -c all`

Created on 22 May 2020  路  3Comments  路  Source: go-swagger/go-swagger

We always completely ignore conflicts. Rather than hack around this, it would be good to have an option to ignore any number of conflicts.

enhancement good first issue mixin

Most helpful comment

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[@]}

All 3 comments

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)

Was this page helpful?
0 / 5 - 0 ratings