Repository navigation
Fix WSDL import ignoring backendBasepath with -overrideSpecBasePath - #595
Merged
rathnapandi merged 1 commit intoNov 5, 2026
Merged
rathnapandi merged 1 commit into
rathnapandi merged 1 commit into
Conversation
WSDLSpecification reset the overrideSpecBasePath flag in parse(), but only after an early return for spec locations ending in ?wsdl, .wsdl or ?singlewsdl. For those, the flag stayed enabled, so CreateNewAPI and UpdateExistingAPI skipped applying backendBasepath and the endpoint from the WSDL was used instead. Move the reset to configureBasePath(), which always runs for the chosen specification (same approach as WADLSpecification). This also stops parse() from clearing the flag while probing non-WSDL specifications. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Running
apim api import -overrideSpecBasePathon a WSDL-based API ignoresbackendBasepathfrom the API config. The backend URL from the WSDL is used instead.Cause
WSDLSpecification.parse()turnsoverrideSpecBasePathoff because WSDLs don't support it. But this happens after an earlyreturn truefor spec locations ending in?wsdl,.wsdlor?singlewsdl. For those, the flag stays on, soCreateNewAPI/UpdateExistingAPIskip applyingbackendBasepath.Also,
parse()runs while probing other spec types (WSDL is checked before WADL/OData), so it could turn the flag off for non-WSDL specs.Fix
Move the reset into
WSDLSpecification.configureBasePath(), which always runs for the selected spec.WADLSpecificationalready does it this way.Tests
overrideSpecBasePathIsResetForWSDLUrl: a?wsdlURL with the flag on now appliesbackendBasepath.parseDoesNotResetOverrideSpecBasePath: probing non-WSDL content leaves the flag unchanged.Both fail without the fix. All
APISpecification*Testtests pass.🤖 Generated with Claude Code