Skip to content

[APIM 4.5.0] Add ApiPolicies field to APIDTODefinition and integration API struct#1357

Merged
RakhithaRR merged 2 commits into
wso2:4.5.xfrom
manodyaSenevirathne:patch-17404-4.5.x
Jun 18, 2026
Merged

[APIM 4.5.0] Add ApiPolicies field to APIDTODefinition and integration API struct#1357
RakhithaRR merged 2 commits into
wso2:4.5.xfrom
manodyaSenevirathne:patch-17404-4.5.x

Conversation

@manodyaSenevirathne

Copy link
Copy Markdown
Contributor

Purpose

apictl init --definition silently drops API-level apiPolicies when unmarshalling the definition YAML into APIDTODefinition.

Root cause

The struct was missing the ApiPolicies field. YAML/JSON decoders discard unknown keys.

Fix

Added ApiPolicies interface{} to APIDTODefinition in specs/v2/apispec.go
Added same field to integration test helper API struct in integration/apim/apiDTO.go

Impact

API-level policies now round-trip correctly through apictl init --definition → import → Publisher API.

@RakhithaRR RakhithaRR merged commit 05051c0 into wso2:4.5.x Jun 18, 2026
1 check passed
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.

3 participants