Parses raw YAML/JSON into a map and checks it is an OpenAPI 3.x document.
@spec parse(String.t()) :: {:ok, map()} | {:error, term()}