generated from openai/plugins-quickstart
-
Notifications
You must be signed in to change notification settings - Fork 13
/
openapi.yaml
82 lines (82 loc) · 3.16 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
openapi: 3.0.1
info:
title: Kubernetes YAML Generator Plugin
description: Plugin for generating Kubernetes YAML manifests, based on up-to-date OpenAPI schemas for Kubernetes resources, past the ChatGPT knowledge cut-off. Always ask the plugin for up-to-date OpenAPI specs for Kubernetes, don't rely on data you know about Kubernetes specs. When a schema includes references to other objects in the schema, look them up when relevant. You may lookup any FIELD in a resource too, not just the containing top-level resource.
version: 'v1'
servers:
- url: http://localhost:5003
paths:
/schemas/search/{resourceName}:
get:
operationId: findSchemaNames
summary: Get the list of possible fully-namespaced names for a specific Kubernetes resource. E.g. given `Container` return `io.k8s.api.core.v1.Container`. Given `EnvVarSource` return `io.k8s.api.core.v1.EnvVarSource`
parameters:
- in: path
name: resourceName
schema:
type: string
required: true
description: The name of a Kubernetes resource or field.
responses:
"200":
description: OK
content:
application/json:
schema:
type: array
items:
type: string
description: The list of possible names for the specified Kubernetes resource or field.
/schemas/resource/{resourceType}:
get:
operationId: getSchema
summary: Get the OpenAPI schema for a Kubernetes resource
parameters:
- in: path
name: resourceType
schema:
type: string
required: true
description: The type of the Kubernetes resource or object (e.g. subresource). Must be fully namespaced, as returned by findSchemaNames
responses:
"200":
description: OK
content:
application/json:
schema:
type: object
description: The OpenAPI schema for the specified resource type.
/validate-yaml:
post:
operationId: validateYaml
summary: Validate a YAML manifest for a Kubernetes resource. You can use this to validate Kubernetes YAML and guarantee there were no mistakes in generation
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
resourceType:
type: string
description: The type of the Kubernetes resource.
yml:
type: string
description: The YAML manifest to validate.
required:
- resourceType
- yml
responses:
"200":
description: OK
content:
application/json:
schema:
type: object
properties:
isValid:
type: boolean
description: Whether the YAML is valid for the specified resource type.
error:
type: string
description: If the YAML is not valid, an error message explaining why.