diff --git a/apis/types/registry_service_config.go b/apis/types/registry_service_config.go index 3f334ea97..31406054a 100644 --- a/apis/types/registry_service_config.go +++ b/apis/types/registry_service_config.go @@ -41,7 +41,7 @@ type RegistryServiceConfig struct { // > are in compliance with any terms that cover redistributing // > nondistributable artifacts. // - AllowNondistributableArtifactsCIDRs []string `json:"AllowNondistributableArtifactsCIDRs"` + AllowNondistributableArtifactsCIDRs []string `json:"AllowNondistributableArtifactsCIDRs,omitempty"` // List of registry hostnames to which nondistributable artifacts can be // pushed, using the format `[:]` or `[:]`. @@ -64,7 +64,7 @@ type RegistryServiceConfig struct { // > are in compliance with any terms that cover redistributing // > nondistributable artifacts. // - AllowNondistributableArtifactsHostnames []string `json:"AllowNondistributableArtifactsHostnames"` + AllowNondistributableArtifactsHostnames []string `json:"AllowNondistributableArtifactsHostnames,omitempty"` // index configs IndexConfigs map[string]IndexInfo `json:"IndexConfigs,omitempty"` @@ -93,10 +93,10 @@ type RegistryServiceConfig struct { // > security, users should add their CA to their system's list of trusted // > CAs instead of enabling this option. // - InsecureRegistryCIDRs []string `json:"InsecureRegistryCIDRs"` + InsecureRegistryCIDRs []string `json:"InsecureRegistryCIDRs,omitempty"` // List of registry URLs that act as a mirror for the official registry. - Mirrors []string `json:"Mirrors"` + Mirrors []string `json:"Mirrors,omitempty"` } /* polymorph RegistryServiceConfig AllowNondistributableArtifactsCIDRs false */ diff --git a/hack/codegen/swagger.sh b/hack/codegen/swagger.sh index a1620d9f7..ea59b0091 100644 --- a/hack/codegen/swagger.sh +++ b/hack/codegen/swagger.sh @@ -2,7 +2,7 @@ set -euo pipefail -readonly SWAGGER_VERSION=0.12.0 +readonly SWAGGER_VERSION=dev # swagger::check_version checks the command and the version. swagger::check_version() { @@ -26,8 +26,7 @@ swagger::check_version() { swagger::install() { echo ">>>> install swagger-${SWAGGER_VERSION} <<<<" local url - url="https://github.com/go-swagger/go-swagger/releases/download" - url="${url}/${SWAGGER_VERSION}/swagger_linux_amd64" + url="https://raw.githubusercontent.com/pouchcontainer/tools/master/bin/swagger" wget --quiet -O /usr/local/bin/swagger "${url}" chmod +x /usr/local/bin/swagger