-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathopenapi.yaml
99 lines (99 loc) · 2.15 KB
/
openapi.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
openapi: 3.0.0
info:
description: Wrapper API of kubectl CLI command
license:
name: Apache 2.0
url: http://www.apache.org/licenses/LICENSE-2.0.html
title: Swagger Kubechat
version: 0.1.0
servers:
- description: default server
url: http://kubechat.swagger.io/v1
- description: internal for development
url: http://localhost:8080
paths:
/kubectl:
get:
operationId: runKubectl
parameters:
- description: cmd to run
explode: true
in: query
name: cmd
required: true
schema:
type: string
style: form
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/Kubectl'
description: return data from cmd
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: cmd is invalid
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: cmd is not allowed
default:
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: unexpected error
summary: Execute kubectl
tags:
- kubectl
components:
schemas:
Kubectl:
type: object
properties:
version:
type: string
allowPattern:
type: string
cmd:
type: string
required:
- version
- cmd
- allowPattern
CmdOutput:
required:
- code
- cmd
properties:
cmd:
type: string
code:
type: integer
stdout:
type: array
items:
type: string
stderr:
type: array
items:
type: string
responseTime:
type: string
format: string
Error:
properties:
code:
format: int32
type: integer
message:
type: string
required:
- code
- message