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

RPDE feed not serialized correctly for empty pages #48

Closed
nathansalter opened this issue May 21, 2020 · 1 comment
Closed

RPDE feed not serialized correctly for empty pages #48

nathansalter opened this issue May 21, 2020 · 1 comment

Comments

@nathansalter
Copy link
Contributor

Currently when serializing an RPDE feed with an empty page the items key is blank.

Example code:

$feedPage = RpdeBody::createFromModifiedId(
    'http://example.com',
    1585574114067820,
    'c8de7e8b-f035-4a1f-a588-4c788176a0e7',
    []
);
$serialized = RpdeBody::serialize($feedPage);

Expected response:

{
  "next": "\/api\/open-active\/individual-facility-uses?afterTimestamp=1585574114067820&afterId=c8de7e8b-f035-4a1f-a588-4c788176a0e7",
  "license": "https:\/\/creativecommons.org\/licenses\/by\/4.0\/",
  "items": []
}

Actual response:

{
  "next": "\/api\/open-active\/individual-facility-uses?afterTimestamp=1585574114067820&afterId=c8de7e8b-f035-4a1f-a588-4c788176a0e7",
  "license": "https:\/\/creativecommons.org\/licenses\/by\/4.0\/"
}
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

No branches or pull requests

1 participant