-
Notifications
You must be signed in to change notification settings - Fork 15
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
Could the server always return arrays of releases? #47
Comments
Hmm yeah, this seems like a bug... we should be able to fix it |
'Ello. Any movement on this? It's still causing the Java API test suite to fail. If this isn't going to change any time soon, I can probably update the Java API to be tolerant of receiving objects in addition to arrays. |
@io7m Can you try with the v2 API and see if that works for you? |
I've allowed the v1 implementation to accept objects in addition to arrays. I'm currently blocked on #75 as it's not possible to produce an API with equivalent functionality without that info. |
For specifically this issue, I believe any request to the v2 api that has the possibility to return more than 1 request will return an array. As for the v1 api, I dont think any more changes are going to go into it, so this issue should probably be closed |
OK closing this and we'll look at #75 |
Take a look at the output of https://api.adoptopenjdk.net/openjdk8-openj9/releases:
Now take a look at the output of https://api.adoptopenjdk.net/openjdk8/releases:
Note that the endpoint returns an array when there's more than one release. The problem with this is that if you think of the endpoint as a method call, then the type of the method changes based on how many releases there are... I feel like it'd be cleaner if the endpoint could commit to always returning an array, even if there's only a single element.
The text was updated successfully, but these errors were encountered: