Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Tip

This guide uses version 1.0.0 of the BuyMoreBillCalculateRESTAPI asset, which you searched and retrieved in Searching for an Asset in Publisher

...

You view the following information about it as shown below.

view details of the assetImage Removedview info of an assetImage Added

Editing an asset

...

  1. Stop the WSO2 G-Reg server if it is already running.
  2. 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

  3. Un-comment the following bit of code in the corresponding asset.js file:

    Code Block
    languagejs
    // 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--;
        }
    }
  4. Restart the server.

  5. Log in to the G-Reg Publisher using the following URL and admin/admin credentials:  https://<G-REG_HOST>:<G-REG_PORT>/publisher
  6. Search and locate the asset. For instructions, see Searching for an Asset in Store.
  7. Click on the asset. Now, you view the EDIT button in the G-Reg Publisher as shown below.