'How to override resourcePath in CRNK json api?

If i have this:

@JsonApiResource(type = "provisioning-request", resourcePath = "v3/provisioning")
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = false)
@ToString(callSuper = true)
public class ProvisioningRequest extends ProvisioningRequestBase implements Serializable {
    private static final long serialVersionUID = 1L;

    @JsonApiId
    private String id;

}

How can i have also:

@JsonApiResource(type = "provisioning-request", resourcePath = "v4/provisioning-request")
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = false)
@ToString(callSuper = true)
public class ProvisioningRequestV4 extends ProvisioningRequestBase implements Serializable {
    private static final long serialVersionUID = 1L;

    @JsonApiId
    private String id;

}

Im getting an error that i cant have same type two times. Any suggestion how can i avoid this or override someehow resourcePath for my other class?



Sources

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

Source: Stack Overflow

Solution Source