From 691b4cdc06309cd476296a691bf0b742bb1c4d64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?T=C3=B3th=20Kriszti=C3=A1n=20Gyula?= Date: Fri, 21 Aug 2020 20:39:08 +0200 Subject: [PATCH] Annotated SecretRepository with JsonApiExposed(false) +Removed this annotation above Secret --- .../src/main/java/io/crnk/example/service/model/Secret.java | 1 - .../example/service/repository/security/SecretRepository.java | 4 +++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/crnk-example-service/src/main/java/io/crnk/example/service/model/Secret.java b/crnk-example-service/src/main/java/io/crnk/example/service/model/Secret.java index 84e7a36..533576a 100644 --- a/crnk-example-service/src/main/java/io/crnk/example/service/model/Secret.java +++ b/crnk-example-service/src/main/java/io/crnk/example/service/model/Secret.java @@ -10,7 +10,6 @@ * Login secret for the user. Implemented as nested resource of login. */ @JsonApiResource(type = "secret", nested = true) -@JsonApiExposed(false) // do not have endpoint on its own, only nested one @Data public class Secret { diff --git a/crnk-example-service/src/main/java/io/crnk/example/service/repository/security/SecretRepository.java b/crnk-example-service/src/main/java/io/crnk/example/service/repository/security/SecretRepository.java index 9deee06..5904166 100644 --- a/crnk-example-service/src/main/java/io/crnk/example/service/repository/security/SecretRepository.java +++ b/crnk-example-service/src/main/java/io/crnk/example/service/repository/security/SecretRepository.java @@ -3,6 +3,7 @@ import io.crnk.core.exception.ForbiddenException; import io.crnk.core.queryspec.QuerySpec; import io.crnk.core.repository.ResourceRepositoryBase; +import io.crnk.core.resource.annotations.JsonApiExposed; import io.crnk.core.resource.list.ResourceList; import io.crnk.example.service.model.Secret; import org.springframework.stereotype.Component; @@ -10,9 +11,10 @@ import java.util.UUID; /** - * Showcases throwing a forbidden exception. + * Only available internally to other repositories */ @Component +@JsonApiExposed(false) // do not have endpoint on its own, only nested one public class SecretRepository extends ResourceRepositoryBase { public SecretRepository() {