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:
- The 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:
- In your development environment, open the following file, WCDE_installdir\wc.modules\workspace\WC\xml\config\com.ibm.commerce.foundation\wc-component.xml
- Set the ApiDiscoveryEnabled property to true. For
example,
<_config:property name="ApiDiscoveryEnabled" value="true"/>
- 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
- Changing REST configuration properties in the component configuration file (wc-component.xml)
- Changing properties in the component configuration file (wc-component.xml) (Search EAR)
ApiDiscoveryEnabled
property to the RESTconfiggroup
. 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>