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
When using APICTL to modify an existing API with an exported zip file of that API along with a params.yaml, the APICTL indicates a success message. However, the structure of the params.yaml file used differs from the structure outlined in the documentation [1].
The code below is used within the params.yaml file:
Deployed the PizzaShack API from the Publisher Portal and the endpoints of the PizzaShack API were as follows,
Then exported PizzaShack API with APICTL.
Then we created a params.yaml file using the below code,
In the next step, we used the above params.yaml file and the previously expoted API zip file to update the PizzaShack API using the following command in APICTL, apictl import api -f PizzaShackAPI_1.0.0.zip -e dev -k --params params.yaml --preserve-provider=false --rotate-revision --update=true --verbose
The APICTL showed “Response : API imported successfully. Successfully imported API”. A screenshot is below,
Because of above step the API endpoints were changed as follows to localhost instead of defined value in the params.file,
Additionally the correct params.yaml template should be as follows,
Then we updated the same PizzaShack API using corrected params.yaml file along with API zip using APICTL. The api APICTL showed as “Response : API imported successfully.Successfully imported API.” as below,
Also the API endpoints were updated correctly,
Affected Component
APICTL
Version
4.1.0
Environment Details (with versions)
No response
Relevant Log Output
No response
Related Issues
No response
Suggested Labels
No response
The text was updated successfully, but these errors were encountered:
Description
When using APICTL to modify an existing API with an exported zip file of that API along with a params.yaml, the APICTL indicates a success message. However, the structure of the params.yaml file used differs from the structure outlined in the documentation [1].
The code below is used within the params.yaml file:
If the above mentioned code is used in the params.yaml file to update an API with the API zip file, the endpoints will be modified to localhost.
However, APICTL indicates a success message instead of giving an error.
The corrected params.yaml code should be as follows,
In tested params.yaml code, the ”configs:” line is missing.
This needs to be fixed since it should throw an error on the APICTL tool while updating an API with an invalid params.file
[1] https://apim.docs.wso2.com/en/latest/install-and-setup/setup/api-controller/advanced-topics/configuring-environment-specific-parameters/#defining-the-parameters-file-for-an-api
Steps to Reproduce
Deployed the PizzaShack API from the Publisher Portal and the endpoints of the PizzaShack API were as follows,
Then exported PizzaShack API with APICTL.
Then we created a params.yaml file using the below code,
In the next step, we used the above params.yaml file and the previously expoted API zip file to update the PizzaShack API using the following command in APICTL,
apictl import api -f PizzaShackAPI_1.0.0.zip -e dev -k --params params.yaml --preserve-provider=false --rotate-revision --update=true --verbose
The APICTL showed “Response : API imported successfully. Successfully imported API”. A screenshot is below,
Because of above step the API endpoints were changed as follows to localhost instead of defined value in the params.file,
Additionally the correct params.yaml template should be as follows,
Then we updated the same PizzaShack API using corrected params.yaml file along with API zip using APICTL. The api APICTL showed as “Response : API imported successfully.Successfully imported API.” as below,
Also the API endpoints were updated correctly,
Affected Component
APICTL
Version
4.1.0
Environment Details (with versions)
No response
Relevant Log Output
No response
Related Issues
No response
Suggested Labels
No response
The text was updated successfully, but these errors were encountered: