Skip to content

Conversation

@chemitaxis
Copy link
Contributor

This PR solves #527

I have added a new optional parameter on options to enable add metadata, it looks like:

{
      jsonapi: { version: '1.1' },
      links: {
        self: 'http://localhost/api/user',
        first: 'http://localhost/api/user?page%5Blimit%5D=5',
        last: 'http://localhost/api/user?page%5Boffset%5D=0',
        prev: null,
        next: null
      },
      data: [
        {
          type: 'user',
          id: 'user1',
          attributes: [Object],
          links: [Object],
          relationships: [Object]
        },
        {
          type: 'user',
          id: 'user2',
          attributes: [Object],
          links: [Object],
          relationships: [Object]
        }
      ],
      meta: { total: 2 }
    }

Copy link
Member

@ymc9 ymc9 left a comment

Choose a reason for hiding this comment

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

Thanks a lot for the contribution @chemitaxis !

@ymc9 ymc9 changed the base branch from main to dev July 1, 2023 00:20
@ymc9
Copy link
Member

ymc9 commented Jul 1, 2023

Btw, there're conflicts in the pnpm-lock.yaml file, I guess cause by the latest changes in the "dev" branch and also a mismatch in the pnpm version. You can just revert the changes to that file and the CI should pass then.

@chemitaxis
Copy link
Contributor Author

@ymc9 changes applied! 👍

@ymc9 ymc9 enabled auto-merge (squash) July 1, 2023 10:23
@ymc9
Copy link
Member

ymc9 commented Jul 1, 2023

@ymc9 changes applied! 👍

Thanks! Looking good now. I'll merge when I get back to my laptop. It'll be included in the next release landing in a day or two.

@ymc9 ymc9 disabled auto-merge July 1, 2023 14:28
@ymc9 ymc9 merged commit 53621c8 into zenstackhq:dev Jul 1, 2023
@ymc9
Copy link
Member

ymc9 commented Jul 1, 2023

Fixes #527

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.

3 participants