-
Notifications
You must be signed in to change notification settings - Fork 2
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
Fix RPDE implementation #141
Comments
This should be ready for testing at http://lr-api.staging.phoenixdigital.agency/public/v1/rides/ |
Just looking at these pages, in order:
Note that the Also the second page of the feed returns And this page returns an error. These indicate that the query has not been implemented correctly. Please check: --include WHERE clause only if @afterTimestamp and @afterId provided
WHERE (modified = @afterTimestamp
AND id > @afterId)
OR (modified > @afterTimestamp)
ORDER BY modified,
id |
Sorry @nickevansuk , I've tweaked this now, let me know if it's resolved? |
That's great, and the validator now works for this since your fix too! http://validator.openactive.io/rpde?url=http://lr-api.staging.phoenixdigital.agency/public/v1/rides/ Note the issue in the validator relating to the last page - still one to fix there |
Hi @nickevansuk . This is the final issue to fix I think! Our final page returns the message 'No ride data found' as a string, which is incorrect. How should we be rendering an empty page of data? Or, should we be excluding the "next" link on a page that has no valid "next" page? |
If you check our the video in the earlier comment the last page stuff is explained near the end :) Basically just has zero length array for items and the next page URL equal to the current page |
Should be working now I think @nickevansuk ? |
Just had a quick look... still errors... try running the validator and looking at the bottom of the list of errors? http://validator.openactive.io/rpde?url=http://lr-api.staging.phoenixdigital.agency/public/v1/rides/ It looks like the last page still doesn't conform (e.g. http://api.letsride.co.uk/public/v1/rides?afterTimestamp=1536246355&afterId=27) Also if you make the limit of items on items returned in each page 500 you'll get less warnings in the validator too. |
I can't replicate this @nickevansuk , I only see warnings and no errors. Is it definitely throwing an error for you if you re-run a full validation? |
Sorry I think you've found another bug in the validator, will investigate that... Also this page returns an error, but should look like a last page: |
That second link is the live site @nickevansuk , we've fixed it on UAT (http://lr-api.staging.phoenixdigital.agency/public/v1/rides?afterTimestamp=1536246355&afterId=27). I've also fixed the issue found by the validator above. |
Excellent! Were you able to adjust the page size to 500 too? |
The feed should now be returning 500 items per page @nickevansuk |
http://lr-api.staging.phoenixdigital.agency/public/v1/rides?afterTimestamp=1526246355&afterId=27 Found this just now too... |
Seems to be resolved |
Applying rules:
afterTimestamp
andmodified
must be integer ( afterTimestamp and modified must be integer developer-microsite#31 )Please do check the underlying query is being implemented correctly: https://www.openactive.io/realtime-paged-data-exchange/#sql-query-example-for-timestamp-id:
Not like this:
Like this:
Note that the
next
URL must include theid
and themodified
values from the last item in the current page (see here for more details: https://www.openactive.io/realtime-paged-data-exchange/#modified-timestamp-and-id)The text was updated successfully, but these errors were encountered: