diff --git a/cashu-gateway-rest/src/main/java/xyz/tcheeric/gateway/rest/config/RestExposureConfig.java b/cashu-gateway-rest/src/main/java/xyz/tcheeric/gateway/rest/config/RestExposureConfig.java index 4719cf0..d94a45a 100644 --- a/cashu-gateway-rest/src/main/java/xyz/tcheeric/gateway/rest/config/RestExposureConfig.java +++ b/cashu-gateway-rest/src/main/java/xyz/tcheeric/gateway/rest/config/RestExposureConfig.java @@ -21,6 +21,10 @@ public void configureRepositoryRestConfiguration(RepositoryRestConfiguration con // Expose identifiers (useful for clients) config.exposeIdsFor(GatewayQuote.class, GatewayPayment.class); + // Return entity body on create/update so clients can rely on response payloads + config.setReturnBodyOnCreate(true); + config.setReturnBodyOnUpdate(true); + var exposure = config.getExposureConfiguration(); exposure.forDomainType(GatewayQuote.class) @@ -44,4 +48,3 @@ public void configureRepositoryRestConfiguration(RepositoryRestConfiguration con .enable(HttpMethod.DELETE)); } } - diff --git a/cashu-gateway-rest/src/main/java/xyz/tcheeric/gateway/rest/repository/PaymentRepository.java b/cashu-gateway-rest/src/main/java/xyz/tcheeric/gateway/rest/repository/PaymentRepository.java index ee63b75..73c1fa4 100644 --- a/cashu-gateway-rest/src/main/java/xyz/tcheeric/gateway/rest/repository/PaymentRepository.java +++ b/cashu-gateway-rest/src/main/java/xyz/tcheeric/gateway/rest/repository/PaymentRepository.java @@ -18,7 +18,8 @@ @RepositoryRestResource(collectionResourceRel = "payments", path = "payment") public interface PaymentRepository extends PagingAndSortingRepository { - // Inherit save(...) from CrudRepository; do not redeclare to avoid compiler issues in some toolchains + // Explicitly declare save to satisfy RepositoryInvoker detection in some setups + S save(S entity); /** * Retrieves a payment by its external payment identifier. diff --git a/cashu-gateway-rest/src/main/java/xyz/tcheeric/gateway/rest/repository/QuoteRepository.java b/cashu-gateway-rest/src/main/java/xyz/tcheeric/gateway/rest/repository/QuoteRepository.java index 0e2d4d9..fbac75d 100644 --- a/cashu-gateway-rest/src/main/java/xyz/tcheeric/gateway/rest/repository/QuoteRepository.java +++ b/cashu-gateway-rest/src/main/java/xyz/tcheeric/gateway/rest/repository/QuoteRepository.java @@ -18,7 +18,8 @@ @RepositoryRestResource(collectionResourceRel = "quotes", path = "quote") public interface QuoteRepository extends PagingAndSortingRepository { - // Inherit save(...) from CrudRepository; do not redeclare to avoid compiler issues in some toolchains + // Explicitly declare save to satisfy RepositoryInvoker detection in some setups + S save(S entity); /** * Retrieves a quote by its external quote identifier.