Skip to content

Preserve API overrides during spec publish by reusing publisher DTO#862

Open
ametelski wants to merge 2 commits into
Azure:mainfrom
ametelski:main
Open

Preserve API overrides during spec publish by reusing publisher DTO#862
ametelski wants to merge 2 commits into
Azure:mainfrom
ametelski:main

Conversation

@ametelski
Copy link
Copy Markdown

When publishing an API with a spec file, ApiOps performs two updates: first it PUTs the API DTO (including publisher overrides), then it PUTs the specification payload. The bug is that the spec PUT path was rebuilding its payload from a fresh APIM GET response, and that response can omit fields like translateRequiredQueryParameters. As a result, override values applied in the first PUT could be dropped in the second PUT, causing APIM to fall back to default behavior (e.g., required query params treated as path templates, leading to unexpected 404s instead of 400s).

The fix is to reuse the already-resolved publisher DTO as the base for spec publishing, then merge only spec-specific fields (format and value). This preserves override-controlled properties across both PUTs and keeps API behavior deterministic.

Closes #860

@ametelski
Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] translateRequiredQueryParameters: "query" not honored by publisher

1 participant