/**
* @param object $resource
* @param array<string,\Neomerx\JsonApi\Contracts\Schema\LinkInterface>|null $links
* @param mixed $meta
*
* @return Response
*/
protected function getCreatedResponse($resource, $links = null, $meta = null)
{
$parameters = $this->getParameters();
$encoder = $this->codecMatcher->getEncoder();
$outputMediaType = $this->codecMatcher->getEncoderRegisteredMatchedType();
$content = $encoder->encode($resource, $links, $meta, $parameters);
$urlPrefix = $encoder->getEncoderOptions() === null ? null : $encoder->getEncoderOptions()->getUrlPrefix();
$location = $urlPrefix . $this->schemaContainer->getSchema($resource)->getSelfSubLink($resource)->getSubHref();
return $this->responses->getCreatedResponse($location, $outputMediaType, $content, $this->supportedExtensions);
}