/**
* @param string $path
* @return \Raml\Resource
* @throws ValidatorSchemaException
*/
private function getResource($path)
{
try {
return $this->apiDefinition->getResourceByUri($path);
} catch (ResourceNotFoundException $exception) {
$message = sprintf('Schema for URI %s was not found in API definition', $path);
throw new ValidatorSchemaException($message, 0, $exception);
}
}