fix(cli): apply property audience filtering to V3 imports#15847
Conversation
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review to trigger a review and subscribe this PR to future pushes, or @claude review once for a one-time review.
Tip: disable this comment in your organization's Code Review settings.
SDK Generation Benchmark ResultsComparing PR branch against median of 5 nightly run(s) on Full benchmark table (click to expand)
main (generator): generator-only time via --skip-scripts (includes Docker image build, container startup, IR parsing, and code generation — this is the same Docker-based flow customers use via |
Docs Generation Benchmark ResultsComparing PR branch against median of 5 nightly run(s) on
Docs generation runs |
Description
Linear ticket: Closes FER-10214
Follow-up to #15789. That PR fixed the shared property-level audience filtering semantics in
ir-utils, but the V3 OpenAPI importer path was still missing parts of the plumbing needed for that filter to work end-to-end.Specifically, V3 imports were not consistently registering property-level
x-fern-audiencesmetadata for inline request bodies, query parameters, and inline webhook payloads with the sharedIrGraph. They also used a narrower importer-specific audience filter and emitted V3-specific IR/example shapes (v2RequestBodies,v2Examples) that were not scrubbed by the original fix.Changes Made
filterIntermediateRepresentationForAudiencespath.IrGraphfor inline request bodies, query parameters, and inline webhook payloads.v2RequestBodiesandv2Examples.ir.typeskeys differ from the canonical type IDs used byIrGraph.Testing
Added V3 OpenAPI importer regression tests covering public-only, internal+public, and no-filter behavior across named schema properties, inline request body properties, query parameters, webhook payloads,
v2RequestBodies, andv2Examples.Manually verified the customer repro by publishing the same docs config with and without this branch: the public audience view no longer includes internal-only OpenAPI properties such as
force_verifyandcustom_id, while the internal audience view still includes them.