Skip to content

Refactor API response to use top-level 'data' attribute for consistency#524

Open
Alsrory wants to merge 5 commits into
opcodesio:mainfrom
Alsrory:fix-json-api-response
Open

Refactor API response to use top-level 'data' attribute for consistency#524
Alsrory wants to merge 5 commits into
opcodesio:mainfrom
Alsrory:fix-json-api-response

Conversation

@Alsrory

@Alsrory Alsrory commented Jun 9, 2026

Copy link
Copy Markdown

This PR refactors the API response structure to use a top-level data attribute for the folders list.

Reason: This ensures consistency with standard API patterns and provides a clean namespace for future metadata (e.g., meta, links) without causing breaking changes or frontend parsing issues.

Changes: Updated FoldersController to wrap the resource collection, and adjusted the frontend axios response handler to parse data.data.

I have verified the changes locally, and the data is correctly received and parsed by the frontend.

@arukompas arukompas left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

  1. Missing test coverage for the change
  2. UI needs to be backwards compatible, as publishing updated UI assets is optional.
  3. Formatting is out of place

@Alsrory

Alsrory commented Jun 11, 2026 via email

Copy link
Copy Markdown
Author

@Alsrory

Alsrory commented Jun 19, 2026

Copy link
Copy Markdown
Author

Hi @arukompas,

I have updated the PR to address the consistency of the API response structure while maintaining full backward compatibility by keeping the original keys.

I have manually verified the changes by running the full test suite locally, and all 329 tests are passing successfully.

Also, I have resolved the merge conflicts to ensure the branch is up-to-date with the latest main. Looking forward to your review!

@Alsrory

Alsrory commented Jun 24, 2026

Copy link
Copy Markdown
Author

Hi @arukompas,

I have updated the PR to resolve all merge conflicts and synced it with the latest main. I have also verified everything locally, and all tests are passing.

Regarding the workflow status: I have enabled the actions in my fork, but it seems they are still awaiting approval on the main repository side. Could you please approve the workflow run so we can verify the changes against the CI/CD pipeline?

I am ready to make any further adjustments if needed. Thank you!

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.

2 participants