Package dev.ucomprotocol.discovery
Class UcpDiscoveryController
java.lang.Object
dev.ucomprotocol.discovery.UcpDiscoveryController
@RestController
@RequestMapping("/.well-known/ucp")
public class UcpDiscoveryController
extends Object
Controller that exposes the Universal Commerce Protocol (UCP) discovery
endpoint.
This endpoint is available at /.well-known/ucp and returns metadata
about the supported
capabilities of this commerce service. It adheres to the UCP specification,
using the canonical
namespace dev.ucp for all capabilities.
Capabilities are dynamically discovered based on the registered
CommerceAdapter.
- dev.ucp.shopping.catalog: Present if
CommerceAdapter.getCatalogAdapter() is not null.
- dev.ucp.shopping.cart: Present if
CommerceAdapter.getCartAdapter() is not null.
- dev.ucp.shopping.order: Present if
CommerceAdapter.getOrderAdapter() is not null.
- dev.ucp.common.identity: Present if
CommerceAdapter.getCustomerAdapter() is not null.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordDetails about a specific capability.static final recordTop-level response wrapper for UCP discovery.static final recordDetails about a service endpoint.static final recordDetailed UCP protocol information. -
Constructor Summary
ConstructorsConstructorDescriptionUcpDiscoveryController(UcpProperties ucpProperties, CommerceAdapter commerceAdapter) -
Method Summary
-
Constructor Details
-
UcpDiscoveryController
-
-
Method Details
-
getDiscoveryInfo
-