code: func (s *GenericAPIServer) getOpenAPIModels(apiPrefix string, apiGroupInfos ...*APIGroupInfo) (openapiproto.Models, error) {
  	if s.openAPIConfig == nil {
  		return nil, nil
  	}
  	pathsToIgnore := openapiutil.NewTrie(s.openAPIConfig.IgnorePrefixes)
  	resourceNames := make([]string, 0)
  	for _, apiGroupInfo := range apiGroupInfos {
  		groupResources, err := getResourceNamesForGroup(apiPrefix, apiGroupInfo, pathsToIgnore)
  		if err != nil {
  			return nil, err
  		}
  		resourceNames = append(resourceNames, groupResources...)
  	}
  
  	// Build the openapi definitions for those resources and convert it to proto models
  	openAPISpec, err := openapibuilder.BuildOpenAPIDefinitionsForResources(s.openAPIConfig, resourceNames...)
  	if err != nil {
  		return nil, err
  	}
  	return utilopenapi.ToProtoModels(openAPISpec)
  }
docs: // getOpenAPIModels is a private method for getting the OpenAPI models