'Swagger in Hybris - UnknownResourceError

I'm trying to use swagger in my extension (CUSTOMcommercewebservices) created through the standard documentation:

https://help.sap.com/viewer/9d346683b0084da2938be8a285c0c27a/6.5.0.0/en-US/8c19ab00866910148f87bf32d4a60d38.html

using the ycommercewebservices Extension.

https://localhost:9002/CUSTOMcommercewebservices/v2/swagger-ui.html

Call the URL for Swagger but I get the following error:

Error

I would have expected it to go as per standard, do you have any idea how to solve the problem?

Thx Claudio



Solution 1:[1]

This documentation is a bit old since it's given for the version 6.5 is this the right Version? I worked with a custom ycommercewebservices extension with 1905 (AddOn approach) and with the Version 2011 (OCC Extensions approach). The resource path was in the 1905 "https://localhost:9002/rest/v2/swagger-ui.html#/" and in the 2011 "https://localhost:9002/rest/v2/swagger-ui.html#/" due to the changing of the default OCC patch in the ycommercewebservices extension. Please check the extensioninfo.xml of your CUSTOMcommercewebservices extension for the right webroot path in the webmodule tag. In the HAC this path can be found in the extensions overview too.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1