VishalMysore commited on
Commit
897d0b8
1 Parent(s): d73ac04

Update minikube.json

Browse files
Files changed (1) hide show
  1. minikube.json +97 -167
minikube.json CHANGED
@@ -1,167 +1,97 @@
1
- {
2
- "swagger": "2.0",
3
- "info": {
4
- "version": "v1",
5
- "title": "Kubernetes Pods API",
6
- "description": "An extended OpenAPI specification for Kubernetes Pods operations"
7
- },
8
- "host": "your-kubernetes-cluster-api-server",
9
- "schemes": [
10
- "https"
11
- ],
12
- "basePath": "/api/v1",
13
- "paths": {
14
- "/namespaces/{namespace}/pods": {
15
- "get": {
16
- "summary": "List all pods in a namespace",
17
- "description": "Returns all Pods in the specified namespace",
18
- "operationId": "listNamespacedPod",
19
- "produces": [
20
- "application/json"
21
- ],
22
- "parameters": [
23
- {
24
- "name": "namespace",
25
- "in": "path",
26
- "required": true,
27
- "type": "string",
28
- "description": "The namespace to list Pods in"
29
- }
30
- ],
31
- "responses": {
32
- "200": {
33
- "description": "A list of Pods",
34
- "schema": {
35
- "$ref": "#/definitions/PodList"
36
- }
37
- }
38
- }
39
- },
40
- "post": {
41
- "summary": "Create a Pod in a namespace",
42
- "description": "Create a new Pod in the specified namespace",
43
- "operationId": "createNamespacedPod",
44
- "consumes": [
45
- "application/json"
46
- ],
47
- "parameters": [
48
- {
49
- "name": "namespace",
50
- "in": "path",
51
- "required": true,
52
- "type": "string",
53
- "description": "The namespace to create the Pod in"
54
- },
55
- {
56
- "in": "body",
57
- "name": "body",
58
- "required": true,
59
- "schema": {
60
- "$ref": "#/definitions/Pod"
61
- },
62
- "description": "The Pod to create"
63
- }
64
- ],
65
- "responses": {
66
- "201": {
67
- "description": "Pod created",
68
- "schema": {
69
- "$ref": "#/definitions/Pod"
70
- }
71
- }
72
- }
73
- }
74
- },
75
- "/namespaces/{namespace}/pods/{name}": {
76
- "get": {
77
- "summary": "Get a specific pod in a namespace",
78
- "description": "Returns a single Pod by name in the specified namespace",
79
- "operationId": "getNamespacedPod",
80
- "produces": [
81
- "application/json"
82
- ],
83
- "parameters": [
84
- {
85
- "name": "namespace",
86
- "in": "path",
87
- "required": true,
88
- "type": "string",
89
- "description": "The namespace of the Pod to retrieve"
90
- },
91
- {
92
- "name": "name",
93
- "in": "path",
94
- "required": true,
95
- "type": "string",
96
- "description": "The name of the Pod to retrieve"
97
- }
98
- ],
99
- "responses": {
100
- "200": {
101
- "description": "A single Pod",
102
- "schema": {
103
- "$ref": "#/definitions/Pod"
104
- }
105
- }
106
- }
107
- }
108
- }
109
- },
110
- "definitions": {
111
- "PodList": {
112
- "type": "object",
113
- "properties": {
114
- "items": {
115
- "type": "array",
116
- "items": {
117
- "$ref": "#/definitions/Pod"
118
- }
119
- }
120
- }
121
- },
122
- "Pod": {
123
- "type": "object",
124
- "properties": {
125
- "metadata": {
126
- "$ref": "#/definitions/Metadata"
127
- },
128
- "spec": {
129
- "$ref": "#/definitions/PodSpec"
130
- }
131
- }
132
- },
133
- "Metadata": {
134
- "type": "object",
135
- "properties": {
136
- "name": {
137
- "type": "string"
138
- },
139
- "namespace": {
140
- "type": "string"
141
- }
142
- }
143
- },
144
- "PodSpec": {
145
- "type": "object",
146
- "properties": {
147
- "containers": {
148
- "type": "array",
149
- "items": {
150
- "$ref": "#/definitions/Container"
151
- }
152
- }
153
- }
154
- },
155
- "Container": {
156
- "type": "object",
157
- "properties": {
158
- "image": {
159
- "type": "string"
160
- },
161
- "name": {
162
- "type": "string"
163
- }
164
- }
165
- }
166
- }
167
- }
 
1
+ openapi: 3.0.0
2
+ info:
3
+ title: Kubernetes Pods Listing API
4
+ version: 1.0.0
5
+ description: A mock Kubernetes API to list Pods in a specified namespace.
6
+ servers:
7
+ - url: http://localhost:4010
8
+ paths:
9
+ /api/v1/namespaces/{namespace}/pods:
10
+ get:
11
+ summary: List all pods in a namespace
12
+ operationId: listNamespacedPod
13
+ tags:
14
+ - Pods
15
+ parameters:
16
+ - name: namespace
17
+ in: path
18
+ required: true
19
+ schema:
20
+ type: string
21
+ description: The namespace to list Pods in
22
+ responses:
23
+ '200':
24
+ description: A list of Pods
25
+ content:
26
+ application/json:
27
+ schema:
28
+ $ref: '#/components/schemas/PodList'
29
+ components:
30
+ schemas:
31
+ PodList:
32
+ type: object
33
+ properties:
34
+ kind:
35
+ type: string
36
+ example: PodList
37
+ apiVersion:
38
+ type: string
39
+ example: v1
40
+ items:
41
+ type: array
42
+ items:
43
+ $ref: '#/components/schemas/Pod'
44
+ Pod:
45
+ type: object
46
+ properties:
47
+ metadata:
48
+ $ref: '#/components/schemas/Metadata'
49
+ spec:
50
+ $ref: '#/components/schemas/PodSpec'
51
+ status:
52
+ $ref: '#/components/schemas/PodStatus'
53
+ Metadata:
54
+ type: object
55
+ properties:
56
+ name:
57
+ type: string
58
+ example: example-pod-1
59
+ namespace:
60
+ type: string
61
+ example: default
62
+ labels:
63
+ type: object
64
+ additionalProperties:
65
+ type: string
66
+ PodSpec:
67
+ type: object
68
+ properties:
69
+ containers:
70
+ type: array
71
+ items:
72
+ $ref: '#/components/schemas/Container'
73
+ Container:
74
+ type: object
75
+ properties:
76
+ name:
77
+ type: string
78
+ example: web-container
79
+ image:
80
+ type: string
81
+ example: nginx:latest
82
+ ports:
83
+ type: array
84
+ items:
85
+ $ref: '#/components/schemas/ContainerPort'
86
+ ContainerPort:
87
+ type: object
88
+ properties:
89
+ containerPort:
90
+ type: integer
91
+ example: 80
92
+ PodStatus:
93
+ type: object
94
+ properties:
95
+ phase:
96
+ type: string
97
+ example: Running