This guide uses version 1.0.0 of the BuyMoreBillCalculateRESTAPI asset, which you searched and retrieved in Searching for an Asset in Publisher.
Viewing information about an asset
Follow the steps below to view information about an asset.
- Log in to the G-Reg Publisher using the following URL and admin/admin credentials: https://<G-REG_HOST>:<G-REG_PORT>/publisher
- Search and locate the asset. For instructions, see Searching for an Asset in Store.
- Click on the asset.
You view the following information about it as shown below.
Editing an asset
Follow the steps below to edit an asset.
- Log in to the G-Reg Publisher using the following URL and admin/admin credentials: https://<G-REG_HOST>:<G-REG_PORT>/publisher
- Search and locate the asset. For instructions, see Searching for an Asset in Store.
- Click on the asset.
- Click Edit.
- Update the required details about the asset in the below screen.
- Click Update.
You view the following message upon successful update of the asset.
Enabling the editing option on assets
By default, you can only edit context-type assets (i.e., SOAP and REST services) in WSO2 G-Reg. However, you can follow the instructions below to enable the editing option on content-type assets (i.e., Swagger, WSDL, WADL, Policy, Schema etc.).
- Stop the WSO2 G-Reg server if it is already running.
- Navigate to the corresponding
asset.js
file of the respective asset as follows: For Swagger:
<G-Reg_HOME>/repository/deployment/server/jaggeryapps/publisher/extensions/assets/swagger/asset.js
For WSDL:
<G-Reg_HOME>/repository/deployment/server/jaggeryapps/publisher/extensions/assets/wsdl/asset.js
For WADL:
<G-Reg_HOME>/repository/deployment/server/jaggeryapps/publisher/extensions/assets/wadl/asset.js
For Policy:
<G-Reg_HOME>/repository/deployment/server/jaggeryapps/publisher/extensions/assets/policy/asset.js
For Schema:
<G-Reg_HOME>/repository/deployment/server/jaggeryapps/publisher/extensions/assets/schema/asset.js
Un-comment the following bit of code in the corresponding
asset.js
file:// Following is to remove the edit button in the detail page since for asset types // wsdl, wadl, swagger, policy, schema, the edit operations are not allowed for(var index = 0; index < page.leftNav.length; index++) { var button = page.leftNav[index]; // if(button.iconClass === "btn-edit") { // page.leftNav.splice(index, 1); // index--; // } if(button.iconClass === "btn-copy") { page.leftNav.splice(index, 1); index--; } }