Skip to content

Commit

Permalink
swagger: disable validation
Browse files Browse the repository at this point in the history
Email validation has a network dependency.  We do not want to enforce
that the container has a working network when generating the swagger
dependencies.

Signed-off-by: Samuel Karp <[email protected]>
  • Loading branch information
samuelkarp committed Dec 5, 2018
1 parent df95489 commit 55061aa
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions swagger.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@
// permissions and limitations under the License.

//go:generate find ./client ! -name swagger.yaml -type f -delete
//go:generate docker run --rm -v $PWD:/work -w /work quay.io/goswagger/swagger generate model -f ./client/swagger.yaml --model-package=client/models --client-package=client --copyright-file=COPYRIGHT_HEADER
//go:generate docker run --rm -v $PWD:/work -w /work quay.io/goswagger/swagger generate client -f ./client/swagger.yaml --model-package=client/models --client-package=client --copyright-file=COPYRIGHT_HEADER

// --skip-validation is used in the command-lines below to remove the network dependency that the swagger generator has
// in attempting to validate that the email address specified in the yaml file is valid.

//go:generate docker run --rm --net=none -v $PWD:/work -w /work quay.io/goswagger/swagger generate model -f ./client/swagger.yaml --model-package=client/models --client-package=client --copyright-file=COPYRIGHT_HEADER --skip-validation
//go:generate docker run --rm --net=none -v $PWD:/work -w /work quay.io/goswagger/swagger generate client -f ./client/swagger.yaml --model-package=client/models --client-package=client --copyright-file=COPYRIGHT_HEADER --skip-validation

package firecracker

0 comments on commit 55061aa

Please sign in to comment.