code: public Collection<Resource> createEndpointResources(EndpointMapping endpointMapping,
  			Collection<ExposableWebEndpoint> endpoints,
  			EndpointMediaTypes endpointMediaTypes, EndpointLinksResolver linksResolver) {
  		List<Resource> resources = new ArrayList<>();
  		endpoints.stream().flatMap((endpoint) -> endpoint.getOperations().stream())
  				.map((operation) -> createResource(endpointMapping, operation))
  				.forEach(resources::add);
  		if (StringUtils.hasText(endpointMapping.getPath())) {
  			Resource resource = createEndpointLinksResource(endpointMapping.getPath(),
  					endpointMediaTypes, linksResolver);
  			resources.add(resource);
  		}
  		return resources;
  	}
docs: Creates {@link Resource Resources} for the operations of the given
  {@code webEndpoints}.
  @param endpointMapping the base mapping for all endpoints
  @param endpoints the web endpoints
  @param endpointMediaTypes media types consumed and produced by the endpoints
  @param linksResolver resolver for determining links to available endpoints
  @return the resources for the operations