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
{{ message }}
Repository navigation
Bug: Operation reconciliation after spec import fails due to stale schema refs in parameters #144
When publishing APIs with spec import to a fresh APIM instance, operation reconciliation (PATCH) fails with "Operation references schema that does not exist" for operations that have schemaId/typeName in their query parameters, headers, or template parameters.
Root Cause
The stripRepresentationSchemaRefs function in api-publisher.ts only strips schemaId and typeName from request.representations and responses[].representations, but APIM also stores schema references in:
request.queryParameters[].schemaId / .typeName
request.headers[].schemaId / .typeName
templateParameters[].schemaId / .typeName
responses[].headers[].schemaId / .typeName
When APIM imports a spec, it generates new schema IDs. The old IDs from the source instance no longer exist, so the PATCH is rejected.
Impact
Any API with typed query/path/header parameters will trigger WARN-level failures during publish to a different APIM instance. The API itself imports fine, but operation metadata (description, displayName) is not reconciled.
Affected APIs (from test run)
demo-conference-api: GetSpeakers, GetSessions, GetTopics, SubmitSession (query params with schema 67a3ac149273231fc454805e)
Activity
fix: resolve named value reference and schema ref issues in publish