code: func (d *DiscoveryClient) OpenAPISchema() (*openapi_v2.Document, error) {
  	data, err := d.restClient.Get().AbsPath("/openapi/v2").SetHeader("Accept", mimePb).Do().Raw()
  	if err != nil {
  		if errors.IsForbidden(err) || errors.IsNotFound(err) || errors.IsNotAcceptable(err) {
  			// single endpoint not found/registered in old server, try to fetch old endpoint
  			// TODO: remove this when kubectl/client-go don't work with 1.9 server
  			data, err = d.restClient.Get().AbsPath("/swagger-2.0.0.pb-v1").Do().Raw()
  			if err != nil {
  				return nil, err
  			}
  		} else {
  			return nil, err
  		}
  	}
  	document := &openapi_v2.Document{}
  	err = proto.Unmarshal(data, document)
  	if err != nil {
  		return nil, err
  	}
  	return document, nil
  }
docs: // OpenAPISchema fetches the open api schema using a rest client and parses the proto.