Skip to content

Conversation

@SrishJ23
Copy link

This PR adds support for the new File References API in the Crowdin Java client.

Endpoints implemented:

  • List File References
  • Get File Reference
  • Add File Reference
  • Delete File Reference

Files added:

  • src/main/java/com/crowdin/client/filereferences/FileReferencesApi.java
  • src/main/java/com/crowdin/client/filereferences/model/FileReference.java
  • src/main/java/com/crowdin/client/filereferences/model/AddFileReferenceRequest.java

Closes #341

@SrishJ23 SrishJ23 changed the title Add support for File References API (list/get/add/delete) feat: add support for File References API (list/get/add/delete) Oct 28, 2025
@SrishJ23
Copy link
Author

@andrii-bodnar Hi 👋 ,
Thank you for reviewing! Please let me know if any changes are needed — happy to update the PR.

Copy link
Member

@andrii-bodnar andrii-bodnar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SrishJ23 Thanks for your contribution! Please address the discussions I started regarding the changes. Also, the new methods should be covered by unit tests.

Comment on lines +16 to +19
/**
* List File References
*/
public ResponseList<FileReference> listFileReferences(Long projectId) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new methods should be documented according to the code style used for the rest of the project resources

import com.crowdin.client.filereferences.model.AddFileReferenceRequest;
import com.fasterxml.jackson.core.type.TypeReference;

public class FileReferencesApi extends CrowdinApi {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is not a new API resource. Please follow the API docs structure and include the new methods in the sourcefiles resource

Comment on lines +5 to +13
/**
* Request body for creating a new File Reference.
*/
@Data
public class AddFileReferenceRequest {
private String name; // Name of the reference
private String type; // Type of the reference (e.g., "file" or "asset")
private Long fileId; // ID of the file this reference points to
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Follow the project's code style for request models

@andrii-bodnar
Copy link
Member

Hi @SrishJ23, do you have an update on this yet?

@SrishJ23
Copy link
Author

SrishJ23 commented Nov 9, 2025

Hi @andrii-bodnar 👋
Hope you’re doing great! I just wanted to kindly follow up on this PR. I’ve made the requested changes, and everything looks good from my side.
I’d really appreciate it if you could take a moment to review or approve it when you get a chance — I’m just one PR away from completing my Hacktoberfest goals this year 😄

Thanks a lot for your time and guidance throughout! 🙏✨

@andrii-bodnar
Copy link
Member

Hi @SrishJ23, please address the unresolved discussions above

@andrii-bodnar andrii-bodnar marked this pull request as draft November 11, 2025 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for new File References API

2 participants