I'm back to the crazy plan to generate a client for the Kubernetes API. Thanks again for all the help last Lambdaconf =]
Below is the corresponding OpenAPI snippet. What happens is that they define a path parameter with the same name as a query parameter:
/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}
...
"parameters": [
...
{
"description": "Path is the URL path to use for the current proxy request to pod.",
"in": "query",
"name": "path",
"type": "string",
"uniqueItems": true
}
"/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}": {
"delete": {
"consumes": [
"*/*"
],
"description": "connect DELETE requests to proxy of Pod",
"operationId": "connectCoreV1DeleteNamespacedPodProxyWithPath",
"produces": [
"*/*"
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "string"
}
},
"401": {
"description": "Unauthorized"
}
},
"schemes": [
"https"
],
"tags": [
"core_v1"
],
"x-kubernetes-action": "connect",
"x-kubernetes-group-version-kind": {
"group": "",
"kind": "PodProxyOptions",
"version": "v1"
}
},
"get": {
"consumes": [
"*/*"
],
"description": "connect GET requests to proxy of Pod",
"operationId": "connectCoreV1GetNamespacedPodProxyWithPath",
"produces": [
"*/*"
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "string"
}
},
"401": {
"description": "Unauthorized"
}
},
"schemes": [
"https"
],
"tags": [
"core_v1"
],
"x-kubernetes-action": "connect",
"x-kubernetes-group-version-kind": {
"group": "",
"kind": "PodProxyOptions",
"version": "v1"
}
},
"head": {
"consumes": [
"*/*"
],
"description": "connect HEAD requests to proxy of Pod",
"operationId": "connectCoreV1HeadNamespacedPodProxyWithPath",
"produces": [
"*/*"
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "string"
}
},
"401": {
"description": "Unauthorized"
}
},
"schemes": [
"https"
],
"tags": [
"core_v1"
],
"x-kubernetes-action": "connect",
"x-kubernetes-group-version-kind": {
"group": "",
"kind": "PodProxyOptions",
"version": "v1"
}
},
"options": {
"consumes": [
"*/*"
],
"description": "connect OPTIONS requests to proxy of Pod",
"operationId": "connectCoreV1OptionsNamespacedPodProxyWithPath",
"produces": [
"*/*"
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "string"
}
},
"401": {
"description": "Unauthorized"
}
},
"schemes": [
"https"
],
"tags": [
"core_v1"
],
"x-kubernetes-action": "connect",
"x-kubernetes-group-version-kind": {
"group": "",
"kind": "PodProxyOptions",
"version": "v1"
}
},
"parameters": [
{
"description": "name of the PodProxyOptions",
"in": "path",
"name": "name",
"required": true,
"type": "string",
"uniqueItems": true
},
{
"description": "object name and auth scope, such as for teams and projects",
"in": "path",
"name": "namespace",
"required": true,
"type": "string",
"uniqueItems": true
},
{
"description": "path to the resource",
"in": "path",
"name": "path",
"required": true,
"type": "string",
"uniqueItems": true
},
{
"description": "Path is the URL path to use for the current proxy request to pod.",
"in": "query",
"name": "path",
"type": "string",
"uniqueItems": true
}
],
"patch": {
"consumes": [
"*/*"
],
"description": "connect PATCH requests to proxy of Pod",
"operationId": "connectCoreV1PatchNamespacedPodProxyWithPath",
"produces": [
"*/*"
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "string"
}
},
"401": {
"description": "Unauthorized"
}
},
"schemes": [
"https"
],
"tags": [
"core_v1"
],
"x-kubernetes-action": "connect",
"x-kubernetes-group-version-kind": {
"group": "",
"kind": "PodProxyOptions",
"version": "v1"
}
},
"post": {
"consumes": [
"*/*"
],
"description": "connect POST requests to proxy of Pod",
"operationId": "connectCoreV1PostNamespacedPodProxyWithPath",
"produces": [
"*/*"
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "string"
}
},
"401": {
"description": "Unauthorized"
}
},
"schemes": [
"https"
],
"tags": [
"core_v1"
],
"x-kubernetes-action": "connect",
"x-kubernetes-group-version-kind": {
"group": "",
"kind": "PodProxyOptions",
"version": "v1"
}
},
"put": {
"consumes": [
"*/*"
],
"description": "connect PUT requests to proxy of Pod",
"operationId": "connectCoreV1PutNamespacedPodProxyWithPath",
"produces": [
"*/*"
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "string"
}
},
"401": {
"description": "Unauthorized"
}
},
"schemes": [
"https"
],
"tags": [
"core_v1"
],
"x-kubernetes-action": "connect",
"x-kubernetes-group-version-kind": {
"group": "",
"kind": "PodProxyOptions",
"version": "v1"
}
}
}