2019-08-30 18:33:25 +00:00
|
|
|
|
|
|
|
package openapi
|
|
|
|
|
|
|
|
import (
|
|
|
|
"bytes"
|
|
|
|
"compress/gzip"
|
|
|
|
"time"
|
|
|
|
|
|
|
|
jsoniter "github.com/json-iterator/go"
|
2020-08-10 17:43:49 +00:00
|
|
|
"k8s.io/klog/v2"
|
2019-08-30 18:33:25 +00:00
|
|
|
"k8s.io/kube-openapi/pkg/common"
|
|
|
|
)
|
|
|
|
|
|
|
|
var (
|
|
|
|
definitions = map[string]common.OpenAPIDefinition{}
|
|
|
|
)
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
start := time.Now()
|
|
|
|
defer func() {
|
2019-09-19 23:17:14 +00:00
|
|
|
klog.V(7).Info("Instantiated OpenAPI definitions in ", time.Now().Sub(start))
|
2019-08-30 18:33:25 +00:00
|
|
|
}()
|
|
|
|
|
|
|
|
var json = jsoniter.ConfigCompatibleWithStandardLibrary
|
|
|
|
gz, err := gzip.NewReader(bytes.NewBuffer(api))
|
|
|
|
if err != nil {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
if err := json.NewDecoder(gz).Decode(&definitions); err != nil {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func GetOpenAPIDefinitions(_ common.ReferenceCallback) map[string]common.OpenAPIDefinition {
|
|
|
|
return definitions
|
|
|
|
}
|
|
|
|
|
2021-03-18 22:40:29 +00:00
|
|
|
var api = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xec\xbd\x7b\x93\xdb\xb8\xb5\x2f\xfa\x55\x50\xca\x9d\xb2\x9d\x52\xab\xed\x99\x9d\xe4\x5c\x4f\xed\xba\xb7\xb7\xed\x24\xae\xd8\x9e\x3e\xee\x76\x52\xf7\xa6\x53\xc7\x10\x09\x49\x38\xa6\x00\x0e\x01\x76\x5b\xd9\x35\xdf\xfd\x14\xd6\x02\x40\xf0\x25\x52\x6a\xa9\x1f\x36\xf2\x47\xc6\x2d\x82\x20\x9e\xeb\xf9\x5b\x6b\xfd\xf7\xe4\xcb\xff\x50\x33\x2e\x4f\x69\xce\x4f\x69\xba\xe6\x4a\x71\x29\x0a\xb6\xe4\x4a\x17\x54\x73\x29\x4e\xaf\x5f\xcc\xde\x97\x9a\x6a\x2e\x96\xff\x60\xf3\x95\x94\x5f\x26\x2f\xff\x7b\x72\x91\xac\xd8\x9a\x9a\x7f\xa5\x4c\x25\x05\xcf\x4d\xdb\xc9\xcb\x49\xa3\x29\xc1\xa7\x73\xa6\x08\x15\xc4\x7f\x80\xdc\xd8\xc7\x54\xa4\x44\xaf\x18\x29\x98\x92\x65\x91\x40\xb3\x94\xc8\x9c\xe1\xc7\x15\xe1\x9a\xd0\x3c\xcf\x38\x53\x44\xcb\xd9\x64\x3a\xd1\x9b\x9c\x4d\x5e\x4e\xe4\xfc\x7f\xb3\x44\x4f\xa6\x93\x82\xfd\x5a\xf2\x82\xa5\x93\x97\xff\x9c\x08\xba\x66\x93\xe9\x24\xc9\x38\x13\xfa\x95\x14\x0b\xbe\x9c\x4c\x27\x8a\xa7\xec\xcd\x62\xc1\x12\xad\x26\xd3\x89\x1f\xc3\x47\x76\xcd\xd9\xcd\xdf\x59\x61\xfe\x50\x93\x7f\x4d\x27\x79\x61\x3e\xac\x39\x53\x66\x5e\x7d\x0d\x5b\x53\x3e\xeb\x6e\x48\x38\xcc\x59\x16\x29\x2b\x58\x4a\x32\xae\x34\x91\x0b\x92\x17\x6c\xc1\x0a\xf3\xcb\xe7\xc6\x8b\x9f\xc9\xb5\x7b\xd5\x2c\x89\x5b\x41\xf6\x35\x37\x43\x9f\x91\xb3\xf3\xb7\x44\xb1\xe2\x9a\x15\xe4\x86\x67\x19\xd1\xc5\x86\x68\x49\x4a\xc5\xc8\x82\x17\x4a\xbb\xd7\x09\x17\xd0\x01\x7c\xf1\x66\xc5\x93\x95\x59\x45\x55\xe6\xb9\x2c\x4c\x3f\x6f\x17\x44\x48\xc1\xcc\x60\x4c\x33\xff\x51\x95\xb3\x84\x2f\x38\x4b\xb1\x03\xae\xb0\x07\xfb\x22\x4b\xc9\x7c\x13\x8c\x61\x4a\xae\x69\xc6\x53\xd8\x26\x1c\xcf\x82\xf2\x8c\x2c\x64\x81\xef\xe2\x06\xc1\xd7\x28\xc9\xcd\x37\x94\xe9\xc3\x6d\x7c\x02\xbb\x53\xe2\x36\xfb\x4f\x2b\x42\xb3\x4c\xde\xb0\xb4\x1a\x95\x39\x0f\xa9\x64\x8a\x08\xa9\x09\x17\x49\x56\xa6\x8c\x50\xb1\xa9\x5a\x7c\x11\xf2\x46\x98\x95\x30\xb3\x31\x03\xbc\xb0\x03\x4c\x68\x96\x29\xf7\xc0\x7d\xb8\x1a\xaa\xe9\x79\xce\x88\x2a\x61\xa4\xae\x9d\x79\x54\x16\x8c\xe4\x32\xe3\xc9\x26\x38\x71\xb4\x28\xe8\x66\x32\x9d\x70\xcd\xd6\x70\x0a\xec\xef\x4a\x17\x5c\x98\x73\x96\xb2\x05\x2d\x33\x3d\x79\x39\x99\xfc\xf6\x5b\xe3\x14\xb6\x0e\xcd\xab\xe0\x29\x49\xd9\x82\x0b\xa6\xc8\x4a\xde\x98\x61\x24\x72\xbd\x2e\x05\x4f\xa8\x66\xe4\x86\xeb\x15\x8c\xcb\x0c\x7e\x46\x3e\xba\xd3\x1e\x7c\xee\xbf\x7f\x9b\x4e\xfe\xaf\x82\x2d\x26\x2f\x27\xbf\x3b\x85\xae\x38\xdc\x9d\x53\x2e\x67\xe6\x76\xd3\x9c\xcf\x3a\xaf\xf6\xec\xfa\xc5\xcc\x9e\xb2\x70\x38\x93\xdf\xa6\x13\xbb\x0a\xe7\xb0\x08\xed\xd1\xff\x39\x7c\x5c\x1b\x7e\x29\x0a\x96\xc8\xa5\xe0\xff\x66\x29\x61\x45\x21\x0b\x45\x16\x85\x5c\xc3\x1c\xaa\xfb\xcf\x44\x9a\x4b\x2e\x34\xa1\x05\x23\x2b\x2a\xd2\x8c\xa5\xe4\xa4\xda\x7d\x9a\x95\xe6\x30\x14\x8c\xbc\x5d\x0a\x59\x30\x22\x0b\x62\x3e\x3a\x23\xaf\x71\xda\xb0\xaf\xf0\x4b\xb5\x43\x76\x27\x7e\x9b\x4e\xd6\x54\x27\xab\xbe\xc1\x07\x0f\xeb\x2b\xbf\x62\xe4\x6a\x52\x94\x19\x53\x57\x13\x3c\xfb\x5c\x99\xeb\x95\x9a\x6f\xc1\x5b\xe6\x00\xca\x35\x17\x4b\x62\xc8\x0e\x53\x70\x2d\xdb\x63\xbe\x9a\xbc\xf9\x4a\x13\x7d\x35\x31\xc3\xbe\x9a\xbc\xf9\xb5\xe4\xd7\x34\x63\x42\x5f\x4d\x66\x57\xe2\x4a\x9c\x10\x78\xfe\xd2\x76\x4a\x5d\x6f\x44\x8a\x6c\x43\xf8\xc2\xdc\x57\x66\x5a\x64\x1b\x6c\x62\xfa\x0d\xee\xa7\x19\xe3\x8c\xfc\x59\x16\xa6\xd5\x3a\xcf\xd8\xd4\xbc\x94\xb2\x3c\x93\x9b\x35\x13\x5a\x91\x84\x0a\x73\xb6\xd7\x32\xc5\x37\xae\x39\x35\x74\x54\x9d\x5e\xbf\x98\xba\x7f\xcc\x99\xa6\xe6\x2f\x91\x12\xf6\x55\x33\x01\xb7\xa9\xfa\x7d\x5e\xea\x60\x39\x70\x64\x78\xfd\x52\xf2\x99\xe6\xfc\x2f\x85\x2c\x73\xf5\xf2\x9f\x57\x13\xd3\xdf\xd5\xe4\x5f\xa6\x63\xee\xa8\x9f\xf9\xfd\xfa\x05\xfc\xea\x69\xfb\x4b\xf2\xcf\xab\x49\x30\xca\xab\xc9\xbf\x3e\x4f\x83\xd9\x6b\x59\x1b\x1a\x81\xf9\x35\x07\x46\x6e\x64\x99\xa5\x40\x0d\xcc\xe5\x65\x42\x37\x6e\xb8\x5b\x61\xbf\xe8\xed\x65\xe6\x0b\xb7\x32\x0a\x7e\xc5\xf1\xc1\x96\x23\xf5\x83\x59\x4f\x09\xbb\x66\x02\x97\x4e\x48\xbd\x62\x05\x50\x97\xa5\x99\xb7\x19\x9b\x25\x40\x47\xdf\x08\xf3\xfb\xc3\xdd\x88\x39\x33\xb4\xfc\x9a\x01\x87\xa8\x5e\x84\x51\xf7\xed\x4e\x78\x87\xeb\xd7\xa3\xeb\x32\x03\x57\x6f\xdd\xe2\xcb\x15\x23\xe6\x89\x63\x63\x2d\xd9\x62\x46\x3e\x98\xc7\x6a\xe5\x86\xb9\x28\xb3\x6c\x43\x7e\x2d\x69\x06\x5b\x31\
|