REST API is disabled after you install Mod Pack 1 (8.0.1.0)

If you installed the Mod Pack 1 (8.0.1.0) maintenance package for WebSphere Commerce Developer, you might notice that you cannot access the Swagger UI and the REST Discovery API is disabled.

Note:
  • WebSphere Commerce DeveloperThe ApiDiscoveryEnabled element is supposed to be true (enabled) in WebSphere Commerce Developer environments by default.
  • In WebSphere Commerce runtime environments, the ApiDiscoveryEnabled element is set to false (disabled) by default. Therefore, runtime environments are not affected.

Problem

Mod Pack 1 updates some WebSphere Commerce Developer configuration files that disable the REST Discovery API.

Solution

If you want to enable the REST Discovery API and access the Swagger UI in WebSphere Commerce Developer, you have two options:
  • Update to a newer 8.0.1.x fix pack when available, or
  • Manually update the configuration in the following files:
    1. In your development environment, open the following file, WCDE_installdir\wc.modules\workspace\WC\xml\config\com.ibm.commerce.foundation\wc-component.xml
    2. Set the ApiDiscoveryEnabled property to true. For example,
      <_config:property name="ApiDiscoveryEnabled" value="true"/> 
    3. Update REST configuration properties by extending the following wc-component.xml files.
      • WCDE_installdir\workspace\WC\xml\config\com.ibm.commerce.foundation\wc-component.xml
      • WCDE_installdir\workspace\Search\xml\config\com.ibm.commerce.foundation\wc-component.xml
      For more information about extending, seeWhen you are updating the extended configuration file, add the ApiDiscoveryEnabled property to the REST configgroup. For example,
      <_config:extendedconfiguration>
        ...
          <_config:configgrouping name="REST">
            ...
              <!-- Determines if the REST API Discovery should be enabled. -->
              <_config:property name="ApiDiscoveryEnabled" value="true"/>
            ...
          </_config:configgrouping>
        ...
      </_config:extendedconfiguration>