private function parseFieldSelector(string $field): string {
        if (strlen($field) === 0) {
            return $field;
        }

        if (strpos($field, '.') !== false) {
            if (strpos($field, '/') === false) {
                trigger_error('Field selectors must be separated by "/" instead of "."', E_USER_DEPRECATED);

                $parts = explode('.', $field);
                $parts = @array_map([$this, 'parseFieldSelector'], $parts); // silence because error triggered already.

                $field = implode('/', $parts);
            }
        } elseif ($field === '[]') {
            trigger_error('Field selectors with item selector "[]" must be converted to "items".', E_USER_DEPRECATED);
            $field = 'items';
        } elseif (strpos($field, '/') === false && !in_array($field, ['items', 'additionalProperties'], true)) {
            trigger_error("Field selectors must specify full schema paths. ($field)", E_USER_DEPRECATED);
            $field = "/properties/$field";
        }

        if (strpos($field, '[]') !== false) {
            trigger_error('Field selectors with item selector "[]" must be converted to "/items".', E_USER_DEPRECATED);
            $field = str_replace('[]', '/items', $field);
        }

        return ltrim($field, '/');
    }