From 63c66c88dd6c4bbe1eb5161a6afa67ef67291c64 Mon Sep 17 00:00:00 2001 From: Jim Minter Date: Tue, 5 Sep 2017 15:51:46 -0500 Subject: [PATCH 1/2] UPSTREAM: 51972: ProducesObject should only update the returned API object resource documentation --- .../apiserver/pkg/endpoints/installer.go | 32 +++++++++++-------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/endpoints/installer.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/endpoints/installer.go index 7a412a3e27d6..4d87c923e14c 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/endpoints/installer.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/endpoints/installer.go @@ -548,9 +548,9 @@ func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storag reqScope.MetaGroupVersion = *a.group.MetaGroupVersion } for _, action := range actions { - versionedObject := storageMeta.ProducesObject(action.Verb) - if versionedObject == nil { - versionedObject = defaultVersionedObject + producedObject := storageMeta.ProducesObject(action.Verb) + if producedObject == nil { + producedObject = defaultVersionedObject } reqScope.Namer = action.Namer namespaced := "" @@ -594,8 +594,8 @@ func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storag Param(ws.QueryParameter("pretty", "If 'true', then the output is pretty printed.")). Operation("read"+namespaced+kind+strings.Title(subresource)+operationSuffix). Produces(append(storageMeta.ProducesMIMETypes(action.Verb), mediaTypes...)...). - Returns(http.StatusOK, "OK", versionedObject). - Writes(versionedObject) + Returns(http.StatusOK, "OK", producedObject). + Writes(producedObject) if isGetterWithOptions { if err := addObjectParams(ws, route, versionedGetOptions); err != nil { return nil, err @@ -651,9 +651,9 @@ func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storag Param(ws.QueryParameter("pretty", "If 'true', then the output is pretty printed.")). Operation("replace"+namespaced+kind+strings.Title(subresource)+operationSuffix). Produces(append(storageMeta.ProducesMIMETypes(action.Verb), mediaTypes...)...). - Returns(http.StatusOK, "OK", versionedObject). - Reads(versionedObject). - Writes(versionedObject) + Returns(http.StatusOK, "OK", producedObject). + Reads(defaultVersionedObject). + Writes(producedObject) addParams(route, action.Params) routes = append(routes, route) case "PATCH": // Partially update a resource @@ -668,9 +668,9 @@ func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storag Consumes(string(types.JSONPatchType), string(types.MergePatchType), string(types.StrategicMergePatchType)). Operation("patch"+namespaced+kind+strings.Title(subresource)+operationSuffix). Produces(append(storageMeta.ProducesMIMETypes(action.Verb), mediaTypes...)...). - Returns(http.StatusOK, "OK", versionedObject). + Returns(http.StatusOK, "OK", producedObject). Reads(metav1.Patch{}). - Writes(versionedObject) + Writes(producedObject) addParams(route, action.Params) routes = append(routes, route) case "POST": // Create a resource. @@ -691,9 +691,9 @@ func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storag Param(ws.QueryParameter("pretty", "If 'true', then the output is pretty printed.")). Operation("create"+namespaced+kind+strings.Title(subresource)+operationSuffix). Produces(append(storageMeta.ProducesMIMETypes(action.Verb), mediaTypes...)...). - Returns(http.StatusOK, "OK", versionedObject). - Reads(versionedObject). - Writes(versionedObject) + Returns(http.StatusOK, "OK", producedObject). + Reads(defaultVersionedObject). + Writes(producedObject) addParams(route, action.Params) routes = append(routes, route) case "DELETE": // Delete a resource. @@ -788,6 +788,10 @@ func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storag routes = append(routes, buildProxyRoute(ws, "OPTIONS", a.prefix, action.Path, proxyHandler, namespaced, kind, resource, subresource, hasSubresource, action.Params, operationSuffix)) case "CONNECT": for _, method := range connecter.ConnectMethods() { + connectProducedObject := storageMeta.ProducesObject(method) + if connectProducedObject == nil { + connectProducedObject = "string" + } doc := "connect " + method + " requests to " + kind if hasSubresource { doc = "connect " + method + " requests to " + subresource + " of " + kind @@ -799,7 +803,7 @@ func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storag Operation("connect" + strings.Title(strings.ToLower(method)) + namespaced + kind + strings.Title(subresource) + operationSuffix). Produces("*/*"). Consumes("*/*"). - Writes("string") + Writes(connectProducedObject) if versionedConnectOptions != nil { if err := addObjectParams(ws, route, versionedConnectOptions); err != nil { return nil, err From 9850ad224a9fa387323a1b103ecfa61b1208bd94 Mon Sep 17 00:00:00 2001 From: Jim Minter Date: Tue, 5 Sep 2017 15:52:23 -0500 Subject: [PATCH 2/2] api docs should show right return value for build instantiate{binary,} --- .../v1.BuildConfig.adoc | 4 +- api/docs/oapi/v1.BuildConfig.adoc | 4 +- api/swagger-spec/oapi-v1.json | 344 +++++++++--------- api/swagger-spec/openshift-openapi-spec.json | 8 +- .../registry/buildconfiginstantiate/rest.go | 25 +- 5 files changed, 204 insertions(+), 181 deletions(-) diff --git a/api/docs/apis-build.openshift.io/v1.BuildConfig.adoc b/api/docs/apis-build.openshift.io/v1.BuildConfig.adoc index 7d7dbc4bd9ca..f446fb187d35 100644 --- a/api/docs/apis-build.openshift.io/v1.BuildConfig.adoc +++ b/api/docs/apis-build.openshift.io/v1.BuildConfig.adoc @@ -1205,7 +1205,7 @@ EOF [cols="1,5", options="header"] |=== |HTTP Code|Schema -|200 OK|v1.BuildRequest +|200 OK|v1.Build |401 Unauthorized| |=== @@ -1266,7 +1266,7 @@ $ curl -k \ [cols="1,5", options="header"] |=== |HTTP Code|Schema -|200 OK|string +|200 OK|v1.Build |401 Unauthorized| |=== diff --git a/api/docs/oapi/v1.BuildConfig.adoc b/api/docs/oapi/v1.BuildConfig.adoc index 1b5c55b53e63..f4de859b359e 100644 --- a/api/docs/oapi/v1.BuildConfig.adoc +++ b/api/docs/oapi/v1.BuildConfig.adoc @@ -1205,7 +1205,7 @@ EOF [cols="1,5", options="header"] |=== |HTTP Code|Schema -|200 OK|v1.BuildRequest +|200 OK|v1.Build |401 Unauthorized| |=== @@ -1266,7 +1266,7 @@ $ curl -k \ [cols="1,5", options="header"] |=== |HTTP Code|Schema -|200 OK|string +|200 OK|v1.Build |401 Unauthorized| |=== diff --git a/api/swagger-spec/oapi-v1.json b/api/swagger-spec/oapi-v1.json index 2523db9fe154..547ad8302124 100644 --- a/api/swagger-spec/oapi-v1.json +++ b/api/swagger-spec/oapi-v1.json @@ -1148,7 +1148,7 @@ "description": "OpenShift REST API, version v1", "operations": [ { - "type": "v1.BuildRequest", + "type": "v1.Build", "method": "POST", "summary": "create instantiate of a BuildRequest", "nickname": "createNamespacedBuildRequestInstantiate", @@ -1190,7 +1190,7 @@ { "code": 200, "message": "OK", - "responseModel": "v1.BuildRequest" + "responseModel": "v1.Build" } ], "produces": [ @@ -1209,7 +1209,7 @@ "description": "OpenShift REST API, version v1", "operations": [ { - "type": "string", + "type": "v1.Build", "method": "POST", "summary": "connect POST requests to instantiatebinary of BinaryBuildRequestOptions", "nickname": "connectPostNamespacedBinaryBuildRequestOptionsInstantiatebinary", @@ -22310,12 +22310,9 @@ "id": "v1.DeletionPropagation", "properties": {} }, - "v1.BuildRequest": { - "id": "v1.BuildRequest", - "description": "BuildRequest is the resource used to pass parameters to build generator", - "required": [ - "triggeredBy" - ], + "v1.Build": { + "id": "v1.Build", + "description": "Build encapsulates the inputs needed to produce a new deployable image, as well as the status of the execution and a reference to the Pod which executed the build.", "properties": { "kind": { "type": "string", @@ -22327,35 +22324,63 @@ }, "metadata": { "$ref": "v1.ObjectMeta", - "description": "metadata for BuildRequest." + "description": "Standard object's metadata." + }, + "spec": { + "$ref": "v1.BuildSpec", + "description": "spec is all the inputs used to execute the build." + }, + "status": { + "$ref": "v1.BuildStatus", + "description": "status is the current status of the build." + } + } + }, + "v1.BuildSpec": { + "id": "v1.BuildSpec", + "description": "BuildSpec has the information to represent a build and also additional information about a build", + "required": [ + "strategy", + "nodeSelector", + "triggeredBy" + ], + "properties": { + "serviceAccount": { + "type": "string", + "description": "serviceAccount is the name of the ServiceAccount to use to run the pod created by this build. The pod will be allowed to use secrets referenced by the ServiceAccount" + }, + "source": { + "$ref": "v1.BuildSource", + "description": "source describes the SCM in use." }, "revision": { "$ref": "v1.SourceRevision", - "description": "revision is the information from the source for a specific repo snapshot." + "description": "revision is the information from the source for a specific repo snapshot. This is optional." }, - "triggeredByImage": { - "$ref": "v1.ObjectReference", - "description": "triggeredByImage is the Image that triggered this build." + "strategy": { + "$ref": "v1.BuildStrategy", + "description": "strategy defines how to perform a build." }, - "from": { - "$ref": "v1.ObjectReference", - "description": "from is the reference to the ImageStreamTag that triggered the build." + "output": { + "$ref": "v1.BuildOutput", + "description": "output describes the Docker image the Strategy should produce." }, - "binary": { - "$ref": "v1.BinaryBuildSource", - "description": "binary indicates a request to build from a binary provided to the builder" + "resources": { + "$ref": "v1.ResourceRequirements", + "description": "resources computes resource requirements to execute the build." }, - "lastVersion": { + "postCommit": { + "$ref": "v1.BuildPostCommitSpec", + "description": "postCommit is a build hook executed after the build output image is committed, before it is pushed to a registry." + }, + "completionDeadlineSeconds": { "type": "integer", "format": "int64", - "description": "lastVersion (optional) is the LastVersion of the BuildConfig that was used to generate the build. If the BuildConfig in the generator doesn't match, a build will not be generated." + "description": "completionDeadlineSeconds is an optional duration in seconds, counted from the time when a build pod gets scheduled in the system, that the build may be active on a node before the system actively tries to terminate the build; value must be positive integer" }, - "env": { - "type": "array", - "items": { - "$ref": "v1.EnvVar" - }, - "description": "env contains additional environment variables you want to pass into a builder container." + "nodeSelector": { + "type": "object", + "description": "nodeSelector is a selector which must be true for the build pod to fit on a node If nil, it can be overridden by default build nodeselector values for the cluster. If set to an empty map or a map with any values, default build nodeselector values are ignored." }, "triggeredBy": { "type": "array", @@ -22363,14 +22388,6 @@ "$ref": "v1.BuildTriggerCause" }, "description": "triggeredBy describes which triggers started the most recent update to the build configuration and contains information about those triggers." - }, - "dockerStrategyOptions": { - "$ref": "v1.DockerStrategyOptions", - "description": "DockerStrategyOptions contains additional docker-strategy specific options for the build" - }, - "sourceStrategyOptions": { - "$ref": "v1.SourceStrategyOptions", - "description": "SourceStrategyOptions contains additional source-strategy specific options for the build" } } }, @@ -22474,142 +22491,6 @@ } } }, - "v1.DockerStrategyOptions": { - "id": "v1.DockerStrategyOptions", - "description": "DockerStrategyOptions contains extra strategy options for Docker builds", - "properties": { - "buildArgs": { - "type": "array", - "items": { - "$ref": "v1.EnvVar" - }, - "description": "Args contains any build arguments that are to be passed to Docker. See https://docs.docker.com/engine/reference/builder/#/arg for more details" - }, - "noCache": { - "type": "boolean", - "description": "noCache overrides the docker-strategy noCache option in the build config" - } - } - }, - "v1.SourceStrategyOptions": { - "id": "v1.SourceStrategyOptions", - "description": "SourceStrategyOptions contains extra strategy options for Source builds", - "properties": { - "incremental": { - "type": "boolean", - "description": "incremental overrides the source-strategy incremental option in the build config" - } - } - }, - "v1.BuildList": { - "id": "v1.BuildList", - "description": "BuildList is a collection of Builds.", - "required": [ - "items" - ], - "properties": { - "kind": { - "type": "string", - "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds" - }, - "apiVersion": { - "type": "string", - "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources" - }, - "metadata": { - "$ref": "v1.ListMeta", - "description": "metadata for BuildList." - }, - "items": { - "type": "array", - "items": { - "$ref": "v1.Build" - }, - "description": "items is a list of builds" - } - } - }, - "v1.Build": { - "id": "v1.Build", - "description": "Build encapsulates the inputs needed to produce a new deployable image, as well as the status of the execution and a reference to the Pod which executed the build.", - "properties": { - "kind": { - "type": "string", - "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds" - }, - "apiVersion": { - "type": "string", - "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources" - }, - "metadata": { - "$ref": "v1.ObjectMeta", - "description": "Standard object's metadata." - }, - "spec": { - "$ref": "v1.BuildSpec", - "description": "spec is all the inputs used to execute the build." - }, - "status": { - "$ref": "v1.BuildStatus", - "description": "status is the current status of the build." - } - } - }, - "v1.BuildSpec": { - "id": "v1.BuildSpec", - "description": "BuildSpec has the information to represent a build and also additional information about a build", - "required": [ - "strategy", - "nodeSelector", - "triggeredBy" - ], - "properties": { - "serviceAccount": { - "type": "string", - "description": "serviceAccount is the name of the ServiceAccount to use to run the pod created by this build. The pod will be allowed to use secrets referenced by the ServiceAccount" - }, - "source": { - "$ref": "v1.BuildSource", - "description": "source describes the SCM in use." - }, - "revision": { - "$ref": "v1.SourceRevision", - "description": "revision is the information from the source for a specific repo snapshot. This is optional." - }, - "strategy": { - "$ref": "v1.BuildStrategy", - "description": "strategy defines how to perform a build." - }, - "output": { - "$ref": "v1.BuildOutput", - "description": "output describes the Docker image the Strategy should produce." - }, - "resources": { - "$ref": "v1.ResourceRequirements", - "description": "resources computes resource requirements to execute the build." - }, - "postCommit": { - "$ref": "v1.BuildPostCommitSpec", - "description": "postCommit is a build hook executed after the build output image is committed, before it is pushed to a registry." - }, - "completionDeadlineSeconds": { - "type": "integer", - "format": "int64", - "description": "completionDeadlineSeconds is an optional duration in seconds, counted from the time when a build pod gets scheduled in the system, that the build may be active on a node before the system actively tries to terminate the build; value must be positive integer" - }, - "nodeSelector": { - "type": "object", - "description": "nodeSelector is a selector which must be true for the build pod to fit on a node If nil, it can be overridden by default build nodeselector values for the cluster. If set to an empty map or a map with any values, default build nodeselector values are ignored." - }, - "triggeredBy": { - "type": "array", - "items": { - "$ref": "v1.BuildTriggerCause" - }, - "description": "triggeredBy describes which triggers started the most recent update to the build configuration and contains information about those triggers." - } - } - }, "v1.BuildStatus": { "id": "v1.BuildStatus", "description": "BuildStatus contains the status of a build", @@ -22735,6 +22616,125 @@ } } }, + "v1.BuildRequest": { + "id": "v1.BuildRequest", + "description": "BuildRequest is the resource used to pass parameters to build generator", + "required": [ + "triggeredBy" + ], + "properties": { + "kind": { + "type": "string", + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds" + }, + "apiVersion": { + "type": "string", + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources" + }, + "metadata": { + "$ref": "v1.ObjectMeta", + "description": "metadata for BuildRequest." + }, + "revision": { + "$ref": "v1.SourceRevision", + "description": "revision is the information from the source for a specific repo snapshot." + }, + "triggeredByImage": { + "$ref": "v1.ObjectReference", + "description": "triggeredByImage is the Image that triggered this build." + }, + "from": { + "$ref": "v1.ObjectReference", + "description": "from is the reference to the ImageStreamTag that triggered the build." + }, + "binary": { + "$ref": "v1.BinaryBuildSource", + "description": "binary indicates a request to build from a binary provided to the builder" + }, + "lastVersion": { + "type": "integer", + "format": "int64", + "description": "lastVersion (optional) is the LastVersion of the BuildConfig that was used to generate the build. If the BuildConfig in the generator doesn't match, a build will not be generated." + }, + "env": { + "type": "array", + "items": { + "$ref": "v1.EnvVar" + }, + "description": "env contains additional environment variables you want to pass into a builder container." + }, + "triggeredBy": { + "type": "array", + "items": { + "$ref": "v1.BuildTriggerCause" + }, + "description": "triggeredBy describes which triggers started the most recent update to the build configuration and contains information about those triggers." + }, + "dockerStrategyOptions": { + "$ref": "v1.DockerStrategyOptions", + "description": "DockerStrategyOptions contains additional docker-strategy specific options for the build" + }, + "sourceStrategyOptions": { + "$ref": "v1.SourceStrategyOptions", + "description": "SourceStrategyOptions contains additional source-strategy specific options for the build" + } + } + }, + "v1.DockerStrategyOptions": { + "id": "v1.DockerStrategyOptions", + "description": "DockerStrategyOptions contains extra strategy options for Docker builds", + "properties": { + "buildArgs": { + "type": "array", + "items": { + "$ref": "v1.EnvVar" + }, + "description": "Args contains any build arguments that are to be passed to Docker. See https://docs.docker.com/engine/reference/builder/#/arg for more details" + }, + "noCache": { + "type": "boolean", + "description": "noCache overrides the docker-strategy noCache option in the build config" + } + } + }, + "v1.SourceStrategyOptions": { + "id": "v1.SourceStrategyOptions", + "description": "SourceStrategyOptions contains extra strategy options for Source builds", + "properties": { + "incremental": { + "type": "boolean", + "description": "incremental overrides the source-strategy incremental option in the build config" + } + } + }, + "v1.BuildList": { + "id": "v1.BuildList", + "description": "BuildList is a collection of Builds.", + "required": [ + "items" + ], + "properties": { + "kind": { + "type": "string", + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds" + }, + "apiVersion": { + "type": "string", + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources" + }, + "metadata": { + "$ref": "v1.ListMeta", + "description": "metadata for BuildList." + }, + "items": { + "type": "array", + "items": { + "$ref": "v1.Build" + }, + "description": "items is a list of builds" + } + } + }, "v1.BuildLog": { "id": "v1.BuildLog", "description": "BuildLog is the (unused) resource associated with the build log redirector", diff --git a/api/swagger-spec/openshift-openapi-spec.json b/api/swagger-spec/openshift-openapi-spec.json index 137fdaa155ea..8b0cb151db62 100644 --- a/api/swagger-spec/openshift-openapi-spec.json +++ b/api/swagger-spec/openshift-openapi-spec.json @@ -32507,7 +32507,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/com.github.openshift.origin.pkg.build.apis.build.v1.BuildRequest" + "$ref": "#/definitions/com.github.openshift.origin.pkg.build.apis.build.v1.Build" } }, "401": { @@ -32567,7 +32567,7 @@ "200": { "description": "OK", "schema": { - "type": "string" + "$ref": "#/definitions/com.github.openshift.origin.pkg.build.apis.build.v1.Build" } }, "401": { @@ -70958,7 +70958,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/com.github.openshift.origin.pkg.build.apis.build.v1.BuildRequest" + "$ref": "#/definitions/com.github.openshift.origin.pkg.build.apis.build.v1.Build" } }, "401": { @@ -71018,7 +71018,7 @@ "200": { "description": "OK", "schema": { - "type": "string" + "$ref": "#/definitions/com.github.openshift.origin.pkg.build.apis.build.v1.Build" } }, "401": { diff --git a/pkg/build/registry/buildconfiginstantiate/rest.go b/pkg/build/registry/buildconfiginstantiate/rest.go index 35598f3882f2..be35594dd1c6 100644 --- a/pkg/build/registry/buildconfiginstantiate/rest.go +++ b/pkg/build/registry/buildconfiginstantiate/rest.go @@ -25,6 +25,7 @@ import ( "k8s.io/kubernetes/pkg/registry/core/pod" buildapi "github.com/openshift/origin/pkg/build/apis/build" + buildapiv1 "github.com/openshift/origin/pkg/build/apis/build/v1" buildstrategy "github.com/openshift/origin/pkg/build/controller/strategy" "github.com/openshift/origin/pkg/build/generator" "github.com/openshift/origin/pkg/build/registry" @@ -72,6 +73,17 @@ func (s *InstantiateREST) Create(ctx apirequest.Context, obj runtime.Object, _ b return s.generator.Instantiate(ctx, request) } +func (s *InstantiateREST) ProducesObject(verb string) interface{} { + // for documentation purposes + return buildapiv1.Build{} +} + +func (s *InstantiateREST) ProducesMIMETypes(verb string) []string { + return nil // no additional mime types +} + +var _ rest.StorageMetadata = &InstantiateREST{} + func NewBinaryStorage(generator *generator.BuildGenerator, watcher rest.Watcher, podClient kcoreclient.PodsGetter, info kubeletclient.ConnectionInfoGetter) *BinaryInstantiateREST { return &BinaryInstantiateREST{ Generator: generator, @@ -93,7 +105,7 @@ type BinaryInstantiateREST struct { var _ rest.Connecter = &BinaryInstantiateREST{} // New creates a new build generation request -func (s *BinaryInstantiateREST) New() runtime.Object { +func (r *BinaryInstantiateREST) New() runtime.Object { return &buildapi.BinaryBuildRequestOptions{} } @@ -118,6 +130,17 @@ func (r *BinaryInstantiateREST) ConnectMethods() []string { return []string{"POST"} } +func (r *BinaryInstantiateREST) ProducesObject(verb string) interface{} { + // for documentation purposes + return buildapiv1.Build{} +} + +func (r *BinaryInstantiateREST) ProducesMIMETypes(verb string) []string { + return nil // no additional mime types +} + +var _ rest.StorageMetadata = &BinaryInstantiateREST{} + // binaryInstantiateHandler responds to upload requests type binaryInstantiateHandler struct { r *BinaryInstantiateREST