-
-
Notifications
You must be signed in to change notification settings - Fork 3k
feat(jabsrc): add endpoint for adding an entry to the currently opened library #13905
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…ng a new entry to currently opened library
try { | ||
if (jsonInput == null || jsonInput.trim().isEmpty()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The try block covers too many statements, which can make it harder to identify which specific statement caused an exception.
} | ||
} | ||
|
||
// Helper class for error responses |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use three slashes 😅
import org.slf4j.Logger; | ||
import org.slf4j.LoggerFactory; | ||
|
||
@Path("libraries/latest") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think, this won't work...
REST works differently... a) redirect to path where this is stored -- I don't know how the client works or b) direct handling in LibraryResource
.
Conflicts with @Path("libraries/{id}")
at libraries
REST background: ROA -> https://en.wikipedia.org/wiki/Resource-oriented_architecture - everything is a resource, not a command endpoint (if possible)
i will dive into later
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, ideal:
- Fetch
/libraries?sort_by=date&sort_direction=desc
/libraries/#{libraries[0].id}
@trag-bot didn't find any issues in the code! ✅✨ |
Your code currently does not meet JabRef's code guidelines. We use Checkstyle to identify issues. You can see which checks are failing by locating the box "Some checks were not successful" on the pull request page. To see the test output, locate "Source Code Tests / Checkstyle (pull_request)" and click on it. In case of issues with the import order, double check that you activated Auto Import. You can trigger fixing imports by pressing Ctrl+Alt+O to trigger Optimize Imports. Please carefully follow the setup guide for the codestyle. Afterwards, please run checkstyle locally and fix the issues, commit, and push. |
Closes https://github.com/JabRef/jabref-issue-melting-pot/issues/676
Steps to test
Mandatory checks
CHANGELOG.md
in a way that is understandable for the average user (if change is visible to the user)