You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When parser.filters.deprecated: false is set, non-deprecated operations are silently removed if their response schemas transitively reference a deprecated schema... even when that schema is buried inside a oneOf/anyOf union (e.g., a JSON:API included field).
Root cause: In packages/shared/src/openApi/shared/utils/filter.ts, collectOperations treats a missing schema dependency as fatal:
case"schema": return!schemas.has(dependency);
Its three siblings (collectParameters, collectRequestBodies, collectResponses) instead re-add implicitly-filtered schemas to the set:
So when deprecated: false removes a schema via collectSchemas, any operation transitively depending on it gets dropped.
Real-world impact: On Apple's App Store Connect spec (~1,200 operations), 48 non-deprecated operations silently disappear... including apps_getCollection, apps_getInstance, and appStoreVersions_createInstance. The triggering deprecated schemas sit inside included field oneOf unions (standard JSON:API pattern).
I'll open a PR with the 4-line fix aligning collectOperations with its siblings... I'd call it a consistency fix, not a behavior change.
Description
When
parser.filters.deprecated: falseis set, non-deprecated operations are silently removed if their response schemas transitively reference a deprecated schema... even when that schema is buried inside aoneOf/anyOfunion (e.g., a JSON:APIincludedfield).Root cause: In
packages/shared/src/openApi/shared/utils/filter.ts,collectOperationstreats a missing schema dependency as fatal:Its three siblings (
collectParameters,collectRequestBodies,collectResponses) instead re-add implicitly-filtered schemas to the set:So when
deprecated: falseremoves a schema viacollectSchemas, any operation transitively depending on it gets dropped.Real-world impact: On Apple's App Store Connect spec (~1,200 operations), 48 non-deprecated operations silently disappear... including
apps_getCollection,apps_getInstance, andappStoreVersions_createInstance. The triggering deprecated schemas sit insideincludedfieldoneOfunions (standard JSON:API pattern).I'll open a PR with the 4-line fix aligning
collectOperationswith its siblings... I'd call it a consistency fix, not a behavior change.Reproducible example or configuration
listWidgetsis generated;LegacyWidgetis either dropped from theoneOfor re-included as@deprecated.listWidgetsis silently dropped.OpenAPI specification (optional)
System information (optional)
@hey-api/openapi-ts: 0.96.0@hey-api/shared: 0.4.0@next(0.0.0-next-20260418091407)