fern-api / fern

Input OpenAPI. Output SDKs and Docs.
https://buildwithfern.com
Apache License 2.0
2.6k stars 139 forks source link

fix(cli): parse IR json with streaming parser #4642

Closed mstade closed 2 weeks ago

mstade commented 2 weeks ago

PR #4640 fixed the issue reported in #4639, but sadly this was only part of the solution as the IR JSON is also read and parsed by the generators, causing similar issues as those reported in #4639.

For more context, see: https://github.com/fern-api/fern/pull/4640#issuecomment-2350992867.

This PR introduces a new function streamObjectFromFile to the fs-utils package. The function reads a JSON file and returns a Promise that resolves to the parsed JSON object.

Changes

dsinghvi commented 2 weeks ago

@mstade looking into this now!

dsinghvi commented 2 weeks ago

@mstade closing your PR in favor of https://github.com/fern-api/fern/pull/4647