// GetSwaggerSchema returns the swagger spec from master func GetSwaggerSchema(apiVer string, kubeClient client.Interface) (*swagger.ApiDeclaration, error) { swaggerSchema, err := kubeClient.SwaggerSchema(apiVer) if err != nil { return nil, fmt.Errorf("couldn't read swagger schema from server: %v", err) } return swaggerSchema, nil }