Skip to content

Conversation

@UserEstrella
Copy link

Closes _____

Summary

This pull request implements the BibEntryResource as described in issue #13588.

Since the issue was created some time ago, several structural changes occurred in the project. Therefore, some of the initial instructions were no longer applicable, and adjustments were made accordingly.

Changes Made

  • Worked mainly within the jabsrv module.
  • Created a new file:
    jabref/jabsrv/src/main/java/org/jabref/http/server/resources/BibEntryResource.java
  • Moved all relevant methods from LibraryResource.java that contained the @PathParam("id") parameter — except the one annotated with @Path("entries/pdffiles") — into BibEntryResource.java.
  • Copied additional helper methods from LibraryResource that were required for these methods to work properly.
  • Updated the startServer() method in the Server class to include a reference to the new BibEntryResource.
  • Created a corresponding test class:
    jabref/jabsrv/src/test/java/org/jabref/http/server/BibEntryResourceTest.java,
    based on the existing LibraryResourceTest.java.

Steps to test

To verify the implementation:

  1. Start the GUI project (jabgui).
  2. Launch the server with:
    ./gradlew :jabsrv-cli:run
    

Mandatory checks

  • I own the copyright of the code submitted and I license it under the MIT license
  • I manually tested my changes in running JabRef (always required)
  • I added JUnit tests for changes (if applicable)
  • [/] I added screenshots in the PR description (if change is visible to the user)
  • I described the change in CHANGELOG.md in a way that is understandable for the average user (if change is visible to the user)
  • [/] I checked the user documentation: Is the information available and up to date? If not, I created an issue at https://github.com/JabRef/user-documentation/issues or, even better, I submitted a pull request updating file(s) in https://github.com/JabRef/user-documentation/tree/main/en.

@github-actions
Copy link
Contributor

Hey @UserEstrella!

Thank you for contributing to JabRef! Your help is truly appreciated ❤️.

We have automatic checks in place, based on which you will soon get automated feedback if any of them are failing. We also use TragBot with custom rules that scans your changes and provides some preliminary comments, before a maintainer takes a look. TragBot is still learning, and may not always be accurate. In the "Files changed" tab, you can go through its comments and just click on "Resolve conversation" if you are sure that it is incorrect, or comment on the conversation if you are doubtful.

Please re-check our contribution guide in case of any other doubts related to our contribution workflow.

@UserEstrella
Copy link
Author

Error BibEntryResource.java is not recognized in Server.java

@UserEstrella
Copy link
Author

JBang build not passing, don't recognize BibEntryResource, need to fix structure and retry

@Siedlerchr Siedlerchr reopened this Nov 18, 2025
@palukku
Copy link
Member

palukku commented Nov 18, 2025

JBang build not passing, don't recognize BibEntryResource, need to fix structure and retry

In order for jbang to work you need to add the class to the https://github.com/JabRef/jabref/blob/main/.jbang/JabSrvLauncher.java file as a source

Copy link
Member

@koppor koppor left a comment

Choose a reason for hiding this comment

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

Please also adapt jabsrv/src/test/rest-api.http and try out your new API.

Gson gson;

/**
* At http://localhost:23119/libraries/{id}
Copy link
Member

Choose a reason for hiding this comment

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

I think, this is comment wrong, we are at the BibEntry resource

Copy link
Author

Choose a reason for hiding this comment

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

Thank you for your feedback! Do you mean we should create a new specific end-point for the BibEntry resource? Something like this : <http://localhost:23119/librairies/demo/entries/{id}>?

@github-actions github-actions bot added the status: changes-required Pull requests that are not yet complete label Nov 19, 2025
@github-actions github-actions bot removed the status: changes-required Pull requests that are not yet complete label Nov 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants