code: private void handleIdOverride(Class<?> resourceClass, List<ResourceField> fields) {
          List<ResourceField> idFields = fields.stream()
                  .filter(field -> field.getResourceFieldType() == ResourceFieldType.ID)
                  .collect(Collectors.toList());
          if (idFields.size() == 2) {
              ResourceField field0 = idFields.get(0);
              ResourceField field1 = idFields.get(1);
  
              BeanInformation beanInformation = BeanInformation.get(resourceClass);
              BeanAttributeInformation attr0 = beanInformation.getAttribute(field0.getUnderlyingName());
              BeanAttributeInformation attr1 = beanInformation.getAttribute(field1.getUnderlyingName());
  
              boolean jsonApiId0 = attr0.getAnnotation(JsonApiId.class).isPresent();
              boolean jsonApiId1 = attr1.getAnnotation(JsonApiId.class).isPresent();
              if (jsonApiId0 && !jsonApiId1) {
                  ((ResourceFieldImpl) field1).setResourceFieldType(ResourceFieldType.ATTRIBUTE);
                  ((ResourceFieldImpl) field1).setJsonName(getJsonName(attr1, ResourceFieldType.ATTRIBUTE)); // undo enforce "id" name
  
              } else if (!jsonApiId0 && jsonApiId1) {
                  ((ResourceFieldImpl) field0).setResourceFieldType(ResourceFieldType.ATTRIBUTE);
                  ((ResourceFieldImpl) field0).setJsonName(getJsonName(attr0, ResourceFieldType.ATTRIBUTE)); // undo enforce "id" name
              }
          }
      }
docs: make sure that @JsonApiId wins over @Id and @EmbeddedId of JPA.