diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index ca37dcbb30c..d3e11f5d554 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -866,18 +866,15 @@ }, { "ImportPath": "github.com/emicklei/go-restful", - "Comment": "v1.2-66-gc4afa8e", - "Rev": "c4afa8e5421428d584b32d36d7b35f2c9ae5f823" + "Rev": "89ef8af493ab468a45a42bb0d89a06fccdd2fb22" }, { "ImportPath": "github.com/emicklei/go-restful/log", - "Comment": "v1.2-66-gc4afa8e", - "Rev": "c4afa8e5421428d584b32d36d7b35f2c9ae5f823" + "Rev": "89ef8af493ab468a45a42bb0d89a06fccdd2fb22" }, { "ImportPath": "github.com/emicklei/go-restful/swagger", - "Comment": "v1.2-66-gc4afa8e", - "Rev": "c4afa8e5421428d584b32d36d7b35f2c9ae5f823" + "Rev": "89ef8af493ab468a45a42bb0d89a06fccdd2fb22" }, { "ImportPath": "github.com/evanphx/json-patch", diff --git a/api/swagger-spec/api.json b/api/swagger-spec/api.json index 11431a5a2f4..6ec7dba9c8e 100644 --- a/api/swagger-spec/api.json +++ b/api/swagger-spec/api.json @@ -3,6 +3,10 @@ "apiVersion": "", "basePath": "https://10.10.10.10:6443", "resourcePath": "/api", + "info": { + "title": "", + "description": "" + }, "apis": [ { "path": "/api", diff --git a/api/swagger-spec/apis.json b/api/swagger-spec/apis.json index 2f1f9d59995..dea7ec02cf7 100644 --- a/api/swagger-spec/apis.json +++ b/api/swagger-spec/apis.json @@ -3,6 +3,10 @@ "apiVersion": "", "basePath": "https://10.10.10.10:6443", "resourcePath": "/apis", + "info": { + "title": "", + "description": "" + }, "apis": [ { "path": "/apis", diff --git a/api/swagger-spec/apps.json b/api/swagger-spec/apps.json index 7ae045f66ca..695f3160cef 100644 --- a/api/swagger-spec/apps.json +++ b/api/swagger-spec/apps.json @@ -3,6 +3,10 @@ "apiVersion": "", "basePath": "https://10.10.10.10:6443", "resourcePath": "/apis/apps", + "info": { + "title": "", + "description": "" + }, "apis": [ { "path": "/apis/apps", diff --git a/api/swagger-spec/apps_v1alpha1.json b/api/swagger-spec/apps_v1alpha1.json index 6675ec5a533..1fdc86fdbd1 100644 --- a/api/swagger-spec/apps_v1alpha1.json +++ b/api/swagger-spec/apps_v1alpha1.json @@ -3,6 +3,10 @@ "apiVersion": "apps/v1alpha1", "basePath": "https://10.10.10.10:6443", "resourcePath": "/apis/apps/v1alpha1", + "info": { + "title": "", + "description": "" + }, "apis": [ { "path": "/apis/apps/v1alpha1/namespaces/{namespace}/petsets", diff --git a/api/swagger-spec/authentication.k8s.io.json b/api/swagger-spec/authentication.k8s.io.json index d9e804175e1..7135929d552 100644 --- a/api/swagger-spec/authentication.k8s.io.json +++ b/api/swagger-spec/authentication.k8s.io.json @@ -3,6 +3,10 @@ "apiVersion": "", "basePath": "https://10.10.10.10:6443", "resourcePath": "/apis/authentication.k8s.io", + "info": { + "title": "", + "description": "" + }, "apis": [ { "path": "/apis/authentication.k8s.io", diff --git a/api/swagger-spec/authentication.k8s.io_v1beta1.json b/api/swagger-spec/authentication.k8s.io_v1beta1.json index 0049cbe5ba5..e27494d2c24 100644 --- a/api/swagger-spec/authentication.k8s.io_v1beta1.json +++ b/api/swagger-spec/authentication.k8s.io_v1beta1.json @@ -3,6 +3,10 @@ "apiVersion": "authentication.k8s.io/v1beta1", "basePath": "https://10.10.10.10:6443", "resourcePath": "/apis/authentication.k8s.io/v1beta1", + "info": { + "title": "", + "description": "" + }, "apis": [ { "path": "/apis/authentication.k8s.io/v1beta1/tokenreviews", diff --git a/api/swagger-spec/authorization.k8s.io.json b/api/swagger-spec/authorization.k8s.io.json index d7c9e898cd3..aedd67cd8ea 100644 --- a/api/swagger-spec/authorization.k8s.io.json +++ b/api/swagger-spec/authorization.k8s.io.json @@ -3,6 +3,10 @@ "apiVersion": "", "basePath": "https://10.10.10.10:6443", "resourcePath": "/apis/authorization.k8s.io", + "info": { + "title": "", + "description": "" + }, "apis": [ { "path": "/apis/authorization.k8s.io", diff --git a/api/swagger-spec/authorization.k8s.io_v1beta1.json b/api/swagger-spec/authorization.k8s.io_v1beta1.json index 60e2ea50187..fa0108a10e5 100644 --- a/api/swagger-spec/authorization.k8s.io_v1beta1.json +++ b/api/swagger-spec/authorization.k8s.io_v1beta1.json @@ -3,6 +3,10 @@ "apiVersion": "authorization.k8s.io/v1beta1", "basePath": "https://10.10.10.10:6443", "resourcePath": "/apis/authorization.k8s.io/v1beta1", + "info": { + "title": "", + "description": "" + }, "apis": [ { "path": "/apis/authorization.k8s.io/v1beta1/subjectaccessreviews", diff --git a/api/swagger-spec/autoscaling.json b/api/swagger-spec/autoscaling.json index 2d7356626f9..4de1765949b 100644 --- a/api/swagger-spec/autoscaling.json +++ b/api/swagger-spec/autoscaling.json @@ -3,6 +3,10 @@ "apiVersion": "", "basePath": "https://10.10.10.10:6443", "resourcePath": "/apis/autoscaling", + "info": { + "title": "", + "description": "" + }, "apis": [ { "path": "/apis/autoscaling", diff --git a/api/swagger-spec/autoscaling_v1.json b/api/swagger-spec/autoscaling_v1.json index 1783c4777db..70610f77ffb 100644 --- a/api/swagger-spec/autoscaling_v1.json +++ b/api/swagger-spec/autoscaling_v1.json @@ -3,6 +3,10 @@ "apiVersion": "autoscaling/v1", "basePath": "https://10.10.10.10:6443", "resourcePath": "/apis/autoscaling/v1", + "info": { + "title": "", + "description": "" + }, "apis": [ { "path": "/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers", diff --git a/api/swagger-spec/batch.json b/api/swagger-spec/batch.json index 3d99488c549..1fe54f7ca9a 100644 --- a/api/swagger-spec/batch.json +++ b/api/swagger-spec/batch.json @@ -3,6 +3,10 @@ "apiVersion": "", "basePath": "https://10.10.10.10:6443", "resourcePath": "/apis/batch", + "info": { + "title": "", + "description": "" + }, "apis": [ { "path": "/apis/batch", diff --git a/api/swagger-spec/batch_v1.json b/api/swagger-spec/batch_v1.json index ba334774d5c..51f325c7264 100644 --- a/api/swagger-spec/batch_v1.json +++ b/api/swagger-spec/batch_v1.json @@ -3,6 +3,10 @@ "apiVersion": "batch/v1", "basePath": "https://10.10.10.10:6443", "resourcePath": "/apis/batch/v1", + "info": { + "title": "", + "description": "" + }, "apis": [ { "path": "/apis/batch/v1/namespaces/{namespace}/jobs", diff --git a/api/swagger-spec/batch_v2alpha1.json b/api/swagger-spec/batch_v2alpha1.json index df3742a14f2..c805a3b4c26 100644 --- a/api/swagger-spec/batch_v2alpha1.json +++ b/api/swagger-spec/batch_v2alpha1.json @@ -3,6 +3,10 @@ "apiVersion": "batch/v2alpha1", "basePath": "https://10.10.10.10:6443", "resourcePath": "/apis/batch/v2alpha1", + "info": { + "title": "", + "description": "" + }, "apis": [ { "path": "/apis/batch/v2alpha1", diff --git a/api/swagger-spec/certificates.json b/api/swagger-spec/certificates.json index 015c7496d09..d96703da227 100644 --- a/api/swagger-spec/certificates.json +++ b/api/swagger-spec/certificates.json @@ -3,6 +3,10 @@ "apiVersion": "", "basePath": "https://10.10.10.10:6443", "resourcePath": "/apis/certificates", + "info": { + "title": "", + "description": "" + }, "apis": [ { "path": "/apis/certificates", diff --git a/api/swagger-spec/certificates_v1alpha1.json b/api/swagger-spec/certificates_v1alpha1.json index f212c1dda16..4dbb026c8c5 100644 --- a/api/swagger-spec/certificates_v1alpha1.json +++ b/api/swagger-spec/certificates_v1alpha1.json @@ -3,6 +3,10 @@ "apiVersion": "certificates/v1alpha1", "basePath": "https://10.10.10.10:6443", "resourcePath": "/apis/certificates/v1alpha1", + "info": { + "title": "", + "description": "" + }, "apis": [ { "path": "/apis/certificates/v1alpha1/certificatesigningrequests", @@ -866,10 +870,7 @@ ], "properties": { "request": { - "type": "array", - "items": { - "type": "integer" - }, + "type": "string", "description": "Base64-encoded PKCS#10 CSR data" }, "username": { @@ -898,10 +899,7 @@ "description": "Conditions applied to the request, such as approval or denial." }, "certificate": { - "type": "array", - "items": { - "type": "integer" - }, + "type": "string", "description": "If request was approved, the controller will place the issued certificate here." } } diff --git a/api/swagger-spec/extensions.json b/api/swagger-spec/extensions.json index 9e6eeb8b0fa..6d2375f1a61 100644 --- a/api/swagger-spec/extensions.json +++ b/api/swagger-spec/extensions.json @@ -3,6 +3,10 @@ "apiVersion": "", "basePath": "https://10.10.10.10:6443", "resourcePath": "/apis/extensions", + "info": { + "title": "", + "description": "" + }, "apis": [ { "path": "/apis/extensions", diff --git a/api/swagger-spec/extensions_v1beta1.json b/api/swagger-spec/extensions_v1beta1.json index a57c6501ec8..7d74ea3dae9 100644 --- a/api/swagger-spec/extensions_v1beta1.json +++ b/api/swagger-spec/extensions_v1beta1.json @@ -3,6 +3,10 @@ "apiVersion": "extensions/v1beta1", "basePath": "https://10.10.10.10:6443", "resourcePath": "/apis/extensions/v1beta1", + "info": { + "title": "", + "description": "" + }, "apis": [ { "path": "/apis/extensions/v1beta1/namespaces/{namespace}/daemonsets", diff --git a/api/swagger-spec/logs.json b/api/swagger-spec/logs.json index d74c43bf616..971cc9a5b70 100644 --- a/api/swagger-spec/logs.json +++ b/api/swagger-spec/logs.json @@ -3,6 +3,10 @@ "apiVersion": "", "basePath": "https://10.10.10.10:6443", "resourcePath": "/logs", + "info": { + "title": "", + "description": "" + }, "apis": [ { "path": "/logs/{logpath}", diff --git a/api/swagger-spec/policy.json b/api/swagger-spec/policy.json index 007c8f516fc..208c1079930 100644 --- a/api/swagger-spec/policy.json +++ b/api/swagger-spec/policy.json @@ -3,6 +3,10 @@ "apiVersion": "", "basePath": "https://10.10.10.10:6443", "resourcePath": "/apis/policy", + "info": { + "title": "", + "description": "" + }, "apis": [ { "path": "/apis/policy", diff --git a/api/swagger-spec/policy_v1alpha1.json b/api/swagger-spec/policy_v1alpha1.json index 659b71bc108..d58deddb24b 100644 --- a/api/swagger-spec/policy_v1alpha1.json +++ b/api/swagger-spec/policy_v1alpha1.json @@ -3,6 +3,10 @@ "apiVersion": "policy/v1alpha1", "basePath": "https://10.10.10.10:6443", "resourcePath": "/apis/policy/v1alpha1", + "info": { + "title": "", + "description": "" + }, "apis": [ { "path": "/apis/policy/v1alpha1/namespaces/{namespace}/poddisruptionbudgets", diff --git a/api/swagger-spec/rbac.authorization.k8s.io.json b/api/swagger-spec/rbac.authorization.k8s.io.json index 60b0398cdf7..8df6f779780 100644 --- a/api/swagger-spec/rbac.authorization.k8s.io.json +++ b/api/swagger-spec/rbac.authorization.k8s.io.json @@ -3,6 +3,10 @@ "apiVersion": "", "basePath": "https://10.10.10.10:6443", "resourcePath": "/apis/rbac.authorization.k8s.io", + "info": { + "title": "", + "description": "" + }, "apis": [ { "path": "/apis/rbac.authorization.k8s.io", diff --git a/api/swagger-spec/rbac.authorization.k8s.io_v1alpha1.json b/api/swagger-spec/rbac.authorization.k8s.io_v1alpha1.json index fa45a90ad28..e00a71dee51 100644 --- a/api/swagger-spec/rbac.authorization.k8s.io_v1alpha1.json +++ b/api/swagger-spec/rbac.authorization.k8s.io_v1alpha1.json @@ -3,6 +3,10 @@ "apiVersion": "rbac.authorization.k8s.io/v1alpha1", "basePath": "https://10.10.10.10:6443", "resourcePath": "/apis/rbac.authorization.k8s.io/v1alpha1", + "info": { + "title": "", + "description": "" + }, "apis": [ { "path": "/apis/rbac.authorization.k8s.io/v1alpha1/clusterrolebindings", diff --git a/api/swagger-spec/v1.json b/api/swagger-spec/v1.json index 6ce2935e05d..e503572f36a 100644 --- a/api/swagger-spec/v1.json +++ b/api/swagger-spec/v1.json @@ -3,6 +3,10 @@ "apiVersion": "v1", "basePath": "https://10.10.10.10:6443", "resourcePath": "/api/v1", + "info": { + "title": "", + "description": "" + }, "apis": [ { "path": "/api/v1/namespaces/{namespace}/bindings", diff --git a/api/swagger-spec/version.json b/api/swagger-spec/version.json index 59f268aa424..1b60aa14b9e 100644 --- a/api/swagger-spec/version.json +++ b/api/swagger-spec/version.json @@ -3,6 +3,10 @@ "apiVersion": "", "basePath": "https://10.10.10.10:6443", "resourcePath": "/version", + "info": { + "title": "", + "description": "" + }, "apis": [ { "path": "/version", diff --git a/docs/api-reference/certificates/v1alpha1/definitions.html b/docs/api-reference/certificates/v1alpha1/definitions.html index 9f2cf22e525..5c3a14b18fd 100755 --- a/docs/api-reference/certificates/v1alpha1/definitions.html +++ b/docs/api-reference/certificates/v1alpha1/definitions.html @@ -529,7 +529,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }

request

Base64-encoded PKCS#10 CSR data

true

-

integer (int32) array

+

string

@@ -695,7 +695,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }

certificate

If request was approved, the controller will place the issued certificate here.

false

-

integer (int32) array

+

string

@@ -1304,7 +1304,7 @@ Examples:
diff --git a/vendor/github.com/emicklei/go-restful/README.md b/vendor/github.com/emicklei/go-restful/README.md index e5492e47672..cfe6d0a916b 100644 --- a/vendor/github.com/emicklei/go-restful/README.md +++ b/vendor/github.com/emicklei/go-restful/README.md @@ -61,8 +61,8 @@ func (u UserResource) findUser(request *restful.Request, response *restful.Respo - [Documentation on godoc.org](http://godoc.org/github.com/emicklei/go-restful) - [Code examples](https://github.com/emicklei/go-restful/tree/master/examples) -- [Example posted on blog](http://ernestmicklei.com/2012/11/24/go-restful-first-working-example/) -- [Design explained on blog](http://ernestmicklei.com/2012/11/11/go-restful-api-design/) +- [Example posted on blog](http://ernestmicklei.com/2012/11/go-restful-first-working-example/) +- [Design explained on blog](http://ernestmicklei.com/2012/11/go-restful-api-design/) - [sourcegraph](https://sourcegraph.com/github.com/emicklei/go-restful) - [gopkg.in](https://gopkg.in/emicklei/go-restful.v1) - [showcase: Mora - MongoDB REST Api server](https://github.com/emicklei/mora) diff --git a/vendor/github.com/emicklei/go-restful/container.go b/vendor/github.com/emicklei/go-restful/container.go index 62ded27c71b..4e53cccb933 100644 --- a/vendor/github.com/emicklei/go-restful/container.go +++ b/vendor/github.com/emicklei/go-restful/container.go @@ -283,12 +283,12 @@ func fixedPrefixPath(pathspec string) string { } // ServeHTTP implements net/http.Handler therefore a Container can be a Handler in a http.Server -func (c Container) ServeHTTP(httpwriter http.ResponseWriter, httpRequest *http.Request) { +func (c *Container) ServeHTTP(httpwriter http.ResponseWriter, httpRequest *http.Request) { c.ServeMux.ServeHTTP(httpwriter, httpRequest) } // Handle registers the handler for the given pattern. If a handler already exists for pattern, Handle panics. -func (c Container) Handle(pattern string, handler http.Handler) { +func (c *Container) Handle(pattern string, handler http.Handler) { c.ServeMux.Handle(pattern, handler) } @@ -318,7 +318,7 @@ func (c *Container) Filter(filter FilterFunction) { } // RegisteredWebServices returns the collections of added WebServices -func (c Container) RegisteredWebServices() []*WebService { +func (c *Container) RegisteredWebServices() []*WebService { c.webServicesLock.RLock() defer c.webServicesLock.RUnlock() result := make([]*WebService, len(c.webServices)) @@ -329,7 +329,7 @@ func (c Container) RegisteredWebServices() []*WebService { } // computeAllowedMethods returns a list of HTTP methods that are valid for a Request -func (c Container) computeAllowedMethods(req *Request) []string { +func (c *Container) computeAllowedMethods(req *Request) []string { // Go through all RegisteredWebServices() and all its Routes to collect the options methods := []string{} requestPath := req.Request.URL.Path diff --git a/vendor/github.com/emicklei/go-restful/install.sh b/vendor/github.com/emicklei/go-restful/install.sh index 5fe03b56978..36cbf25f82a 100644 --- a/vendor/github.com/emicklei/go-restful/install.sh +++ b/vendor/github.com/emicklei/go-restful/install.sh @@ -1,9 +1,10 @@ -cd examples - ls *.go | xargs -I {} go build -o /tmp/ignore {} - cd .. -go fmt ...swagger && \ +go test -test.v ...restful && \ go test -test.v ...swagger && \ +go vet ...restful && \ +go fmt ...swagger && \ go install ...swagger && \ go fmt ...restful && \ -go test -test.v ...restful && \ -go install ...restful \ No newline at end of file +go install ...restful +cd examples + ls *.go | xargs -I {} go build -o /tmp/ignore {} + cd .. \ No newline at end of file diff --git a/vendor/github.com/emicklei/go-restful/swagger/model_builder.go b/vendor/github.com/emicklei/go-restful/swagger/model_builder.go index 696d192e5bc..398e83049c4 100644 --- a/vendor/github.com/emicklei/go-restful/swagger/model_builder.go +++ b/vendor/github.com/emicklei/go-restful/swagger/model_builder.go @@ -51,6 +51,14 @@ func (b modelBuilder) addModel(st reflect.Type, nameOverride string) *Model { if b.isPrimitiveType(modelName) { return nil } + // golang encoding/json packages says array and slice values encode as + // JSON arrays, except that []byte encodes as a base64-encoded string. + // If we see a []byte here, treat it at as a primitive type (string) + // and deal with it in buildArrayTypeProperty. + if (st.Kind() == reflect.Slice || st.Kind() == reflect.Array) && + st.Elem().Kind() == reflect.Uint8 { + return nil + } // see if we already have visited this model if _, ok := b.Models.At(modelName); ok { return nil @@ -276,6 +284,11 @@ func (b modelBuilder) buildArrayTypeProperty(field reflect.StructField, jsonName return jsonName, prop } fieldType := field.Type + if fieldType.Elem().Kind() == reflect.Uint8 { + stringt := "string" + prop.Type = &stringt + return jsonName, prop + } var pType = "array" prop.Type = &pType isPrimitive := b.isPrimitiveType(fieldType.Elem().Name()) diff --git a/vendor/github.com/emicklei/go-restful/swagger/swagger.go b/vendor/github.com/emicklei/go-restful/swagger/swagger.go index 967b6711e8b..9c40833e7da 100644 --- a/vendor/github.com/emicklei/go-restful/swagger/swagger.go +++ b/vendor/github.com/emicklei/go-restful/swagger/swagger.go @@ -118,6 +118,7 @@ type ApiDeclaration struct { ApiVersion string `json:"apiVersion"` BasePath string `json:"basePath"` ResourcePath string `json:"resourcePath"` // must start with / + Info Info `json:"info"` Apis []Api `json:"apis,omitempty"` Models ModelList `json:"models,omitempty"` Produces []string `json:"produces,omitempty"` diff --git a/vendor/github.com/emicklei/go-restful/web_service.go b/vendor/github.com/emicklei/go-restful/web_service.go index 24fc5328b14..2a51004f802 100644 --- a/vendor/github.com/emicklei/go-restful/web_service.go +++ b/vendor/github.com/emicklei/go-restful/web_service.go @@ -1,7 +1,7 @@ package restful import ( - "fmt" + "errors" "os" "sync" @@ -51,7 +51,7 @@ func (w *WebService) ApiVersion(apiVersion string) *WebService { } // Version returns the API version for documentation purposes. -func (w WebService) Version() string { return w.apiVersion } +func (w *WebService) Version() string { return w.apiVersion } // Path specifies the root URL template path of the WebService. // All Routes will be relative to this path. @@ -155,7 +155,7 @@ func (w *WebService) Route(builder *RouteBuilder) *WebService { // RemoveRoute removes the specified route, looks for something that matches 'path' and 'method' func (w *WebService) RemoveRoute(path, method string) error { if !w.dynamicRoutes { - return fmt.Errorf("dynamic routes are not enabled.") + return errors.New("dynamic routes are not enabled.") } w.routesLock.Lock() defer w.routesLock.Unlock() @@ -192,7 +192,7 @@ func (w *WebService) Consumes(accepts ...string) *WebService { } // Routes returns the Routes associated with this WebService -func (w WebService) Routes() []Route { +func (w *WebService) Routes() []Route { if !w.dynamicRoutes { return w.routes } @@ -207,12 +207,12 @@ func (w WebService) Routes() []Route { } // RootPath returns the RootPath associated with this WebService. Default "/" -func (w WebService) RootPath() string { +func (w *WebService) RootPath() string { return w.rootPath } // PathParameters return the path parameter names for (shared amoung its Routes) -func (w WebService) PathParameters() []*Parameter { +func (w *WebService) PathParameters() []*Parameter { return w.pathParameters } @@ -229,7 +229,7 @@ func (w *WebService) Doc(plainText string) *WebService { } // Documentation returns it. -func (w WebService) Documentation() string { +func (w *WebService) Documentation() string { return w.documentation }