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
When publishing SOAP APIs whose specification is imported from WSDL, every XSD schema artifact fails with a ValidationError, producing dozens of errors on otherwise healthy runs. #270
WSDL-importer-generated XSD schemas are skipped during publish (APIM recreates them from the imported WSDL); publish completes with no errors and the schema count on the target matches the source.
Actual behavior
Error
ERROR PUT apischema/<soap-api>/<schema-guid>: Async operation failed for
apis/<soap-api>/schemas/<schema-guid>:
[ValidationError] One or more fields contain incorrect values:
When a WSDL is imported (?import=true&format=wsdl), APIM auto-recreates the XSD schemas itself, so the CLI must not re-PUT them. planApiPublication() (src/services/api-publisher.ts) excludes auto-generated schemas using isAutoGeneratedId(), but that helper only matches 24-char lowercase hex IDs (^[0-9a-f]{24}$). The WSDL importer names XSD schemas with GUIDs (e.g. 4b6fe4d6-dbad-4db0-a6d6-58958e74850d), so they slip through the filter as "explicit" schemas, get re-published after the spec import, and APIM rejects the PUTs.
Steps to Reproduce
Extract a service containing a SOAP (WSDL) API — the extract produces apis/<api>/schemas/<guid>/schemaInformation.json files with contentType: application/vnd.ms-azure-apim.xsd+xml.
Publish to another service instance.
Every XSD schema PUT fails with ValidationError.
Suggested Fix
In planApiPublication(), when importSpecification is true, exclude schemas whose artifact properties.contentType is application/vnd.ms-azure-apim.xsd+xml. Filtering by content type is safer than widening isAutoGeneratedId() to GUIDs, since user-defined schemas may legitimately use GUID names.
Verified fix: after excluding XSD schemas, publish completes with 0 errors and the target APIM contains the exact same schema counts per API as the source (recreated by the WSDL import).
Activity