Skip to content
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

[FEATURE]: Convert homebrew APIv2 interface to JSON:API standard #1018

Open
1 task
Tracked by #1008
rixvet opened this issue Oct 25, 2023 · 1 comment
Open
1 task
Tracked by #1008

[FEATURE]: Convert homebrew APIv2 interface to JSON:API standard #1018

rixvet opened this issue Oct 25, 2023 · 1 comment
Assignees
Labels
enhancement Enhancement of existing features / Small addition new feature New feature to be added server Hashtopolis API/Server related ui Hashtopolis UI related

Comments

@rixvet
Copy link
Collaborator

rixvet commented Oct 25, 2023

Re-write APIv2 interface to adhere to JSON:API 1.1 standard (https://jsonapi.org/) this will future-proof the APIv2 for new features and allow for more compact response.

Related to:

@rixvet rixvet self-assigned this Oct 25, 2023
@rixvet rixvet added enhancement Enhancement of existing features / Small addition new feature New feature to be added server Hashtopolis API/Server related ui Hashtopolis UI related labels Oct 25, 2023
@rixvet rixvet added this to the APIv2 Preview 3 milestone Oct 25, 2023
@zyronix
Copy link
Member

zyronix commented Mar 20, 2024

Also looks like there is a standard for this:
https://datatracker.ietf.org/doc/html/rfc5988

The current status of this item:

In the current dev branch there is some pagination, however the server will fetch all data even if you just request two pages.

Please see:
https://github.com/hashtopolis/server/blob/dev/src/inc/apiv2/common/AbstractModelAPI.class.php#L298

In the feature branch of this issue this already has been partially implemented:
https://github.com/hashtopolis/server/blob/feature/1018-convert-homebrew-apiv2-interface-to-jsonapi-standard/src/inc/apiv2/common/AbstractModelAPI.class.php#L345

https://github.com/hashtopolis/server/blob/feature/1018-convert-homebrew-apiv2-interface-to-jsonapi-standard/src/inc/apiv2/common/AbstractModelAPI.class.php#L353

This need to be synced with the current dev branch. There needs to be some implementation of 'start-from-filter' in the SQL queries.

Beside the pagination, fetching of related object should also be done with the json-api standard (include).

Summary:

Attached branch: https://github.com/hashtopolis/server/blob/feature/1018-convert-homebrew-apiv2-interface-to-jsonapi-standard

@zyronix zyronix assigned s3inlc and unassigned rixvet Mar 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement of existing features / Small addition new feature New feature to be added server Hashtopolis API/Server related ui Hashtopolis UI related
Projects
Status: 🏗 In progress
3 participants