code: func (ref Ref) Ptr() (string, error) {
  	parts := make([]string, 0, len(ref)-1)
  	for _, term := range ref[1:] {
  		if str, ok := term.Value.(String); ok {
  			parts = append(parts, url.PathEscape(string(str)))
  		} else {
  			return "", fmt.Errorf("invalid path value type")
  		}
  	}
  	return strings.Join(parts, "/"), nil
  }
docs: // Ptr returns a slash-separated path string for this ref. If the ref
  // contains non-string terms this function returns an error. Path
  // components are escaped.