public static function getCanonicalSchemaRoute($service, $serviceConfig, $type = 'item', $option = false)
    {
        $pattern = self::getBaseFromService($service, $serviceConfig);
        $pattern = '/schema' . $pattern . $type;

        $action = 'schemaAction';
        $method = 'GET';
        if ($option !== false) {
            $action = 'optionsAction';
            $method = 'OPTIONS';
        }

        $defaults = array(
            '_controller' => $service . ':' . $action,
            '_format' => '~',
        );

        $route = new Route($pattern, $defaults, []);
        $route->setMethods($method);

        return $route;
    }