wso2 / carbon-apimgt

Apache License 2.0
165 stars 618 forks source link

Add changes to add subscription status to application.yaml when exporting and to support ignoreTier query param when importing #12442

Open shnrndk opened 1 month ago

shnrndk commented 1 month ago

Related PR: https://github.com/wso2-support/carbon-apimgt/pull/6447, https://github.com/wso2-support/carbon-apimgt/pull/6451

This PR adds the subscription workflow status to the application.yaml when exporting an application. Please note that although we added the changes to the application.yaml, we haven't considered the status when importing. Need to have a discussion and support preserving the workflow status when importing too. Currently the status is shown as "ON_HOLD" for all 3 types (ON_HOLD, ACCEPTED, REJECTED). This PR adds a query parameter to the import Rest API call as ''ignoreTier". This is to skip considering whether the subscription tier is available at the API for a particular subscription at the time of importing the application. The default value is false. If the value is set to true, then the tier will not be considered and the import will be done for all the subscriptions. Only an error will be logged saying the particular tier is not available for the subscription of the particular API. If the value is false, default behaviour will be considered and the application will be imported giving a 207 status.