public function parseSchema($openApiSpec)
    {
        $openApiSpecContents = file_get_contents($openApiSpec);
        $schemaClass         = self::OPEN_API_MODEL;
        $schema              = null;
        $jsonException       = null;
        $yamlException       = null;

        try {
            return $this->serializer->deserialize(
                $openApiSpecContents,
                $schemaClass,
                self::CONTENT_TYPE_JSON,
                [
                    'document-origin' => $openApiSpec
                ]
            );
        } catch (\Exception $exception) {
            $jsonException = $exception;
        }

        $content = Yaml::parse($openApiSpecContents, Yaml::PARSE_OBJECT | Yaml::PARSE_OBJECT_FOR_MAP | Yaml::PARSE_DATETIME | Yaml::PARSE_EXCEPTION_ON_INVALID_TYPE);
        $openApiSpecContents = json_encode($content);

        return $this->serializer->deserialize(
            $openApiSpecContents,
            $schemaClass,
            self::CONTENT_TYPE_JSON,
            [
                'document-origin' => $openApiSpec
            ]
        );
    }