Questions tagged [crnk]

Crnk is an implementation of the JSON API specification and recommendations in Java to facilitate building RESTful applications.

Links

26 questions
2
votes
2 answers

Implementation JsonApi with Spring Boot

I worked with standard Rest API Spring Boot applications 2 years. For my next project I need to use JsonApi. I made little research and see few…
faroali
  • 21
  • 2
1
vote
1 answer

crnk spring security only GET request work

My Entity: @Getter @Setter @NoArgsConstructor @JsonApiResource(type = "apiEntity", resourcePath = "apiEntities") public class ApiEntity { @JsonApiId private String id; .... The Repository: @Component public class ApiRepository extends…
emoleumassi
  • 4,881
  • 13
  • 67
  • 93
1
vote
0 answers

How can I add Spring Security OAuth tokens to Crnk Client?

I want to use Crnk Client 3.4 to consume a JSON:API endpoint that is secured with OAuth2. I am using a client_credentials grant and Spring Security OAuth2 (with Boot) to configure the credentials. Since the Spring team has decided to try to force…
1
vote
1 answer

Getting an error: Error attempting to apply AttributeConverter; nested exception is javax.persistence.PersistenceException

My application uses Spring Boot,JPA and Crnk Framework and mariadb as the database. I have a field defined like this @Column(name = "baskets", columnDefinition = "TEXT") @Convert(converter = UUIDListConverter.class) private List baskets; And…
Avinash Reddy
  • 2,204
  • 3
  • 25
  • 44
1
vote
0 answers

Implementing JSR-303 validation with crnk JSON API

I am fairly familiar with the JSR-303's @Valid annotation and have used it a couple of times in my @Controller classes. For example: @PostMapping("/users") ResponseEntity addUser(@Valid @RequestBody User user) { // persisting…
Nathanael
  • 195
  • 2
  • 2
  • 7
1
vote
0 answers

Spring boot/CRNK Custom Query Spec URL Mapping For Single Endpoint

I'm currently trying to change the functionality of the QuerySpecUrlMapper for only one specific endpoint. In particular, we want to disable the behavior that splits a string parameter by commas. I've figured out I can do this by getting the default…
1
vote
0 answers

How to add additional documentation and examples to an openapi spec generated with crnk-gen-openapi?

I am generating the openapi spec of my spring-boot project with crnk-gen-openapi. This process works. Now I want to add detailed documentation to the requests and examples with valid values. I did this in the past with springfox, so I assume it…
tgr
  • 3,557
  • 4
  • 33
  • 63
1
vote
1 answer

How to implement a sub-resource relationship in CRNK (JSON-API) without top level repository

This question mainly relates to HOW to do this using the CRNK framework however I have also tagged it as JSON-API as I am interested in whether or not the approach is generally correct within the confines of JSON-API spec. I don't want to complicate…
DaveJohnston
  • 10,031
  • 10
  • 54
  • 83
0
votes
0 answers

what's the alternative of ResourceRepositoryBase in crnk since i cant find crnk-data-jpa Dependency anywhere

I tried working with a difffrent dependency but it seems that it requires different configuration : io.crnk
0
votes
0 answers

Can crnk(json api) be tested with mockMVC?

Some of my endpoint developed by jsonApi(crnk),As i searched in stackoverflow, mockMVC can only test the controller, is it possible to test with crnk? i have tested a sample but it got 404
Moly Holy
  • 133
  • 1
  • 9
0
votes
0 answers

How To add another root variable in the response json using CRNK IO

I am getting the Current Response below for CRNK IO , But i wanted the JSON Structure to appear Like the Required Response . So things need to be done so that i can get the Final Response JSON Structure as per the Required Response below. Current…
0
votes
1 answer

Servlet double initialization Websphere

I'm using WebSphere 9.0.5.8 and I'm trying to deploy a JEE app that uses Crnk framework with version 3.4. Deployment is fine, but when a request is made, it looks like init() method is called twice what results in SRVE0271E error. Below the…
Mariusz W
  • 39
  • 1
  • 8
0
votes
1 answer

What is difference between @JsonApiRelationId and @JsonApiRelation?

https://www.crnk.io/releases/stable/documentation/#_jsonapirelation What is the need of @JsonApiRelationId as I see no difference without using it?
0
votes
1 answer

Sparse fields on complex JSON API attributes

According to #document-resource-object-attributes it is allowed to have 'complex' values for attributes, i.e. any valid JSON value. With #fetching-sparse-fieldsets it is possible to select a subset of the content. However, all examples are matching…
Robert Scholte
  • 11,889
  • 2
  • 35
  • 44
0
votes
1 answer

Do not display self link in the response of Json API CRNK

I am using crnk framework. I have an object with some properties. The ID field is annotated with @JsonApiId. In some specific scenario the Id field is null and the self link is generated with null value in place of ID parameter(ex:…
bunny
  • 11
  • 3
1
2