Is the ListRepositories Example JSON Correct?


#1

https://developer.github.com/v3/integrations/installations/

Is this document correct? There’s almost certainly a redundant wrapping here.

Expected:
The body should be an object with the array of repositories stored as the “repositories” property, alongside the “total_count” property.

Documentation:
The documentation shows a body which has the repositories array wrapped in an object (which is expected). HOwever the unexpected part is that the object is wrapped in another array. The outer array seems to be erroneous or redundant, and should not exist.

Below is the format from the documentation, (irrelevant properties left out for brevity):

[
{
“total_count”: 1,
“repositories”: [
{
“id”: 1296269,
“full_name”: “octocat/Hello-World”,
“description”: “This your first repo!”,
“private”: false,
}
]
}
]


#2

I just did my own test, the documentation is incorrect. It returns an object, not an array.

Actual
{ “total_count”:1, “repositories”:[{ “id”:00000000}]}}


#3

:wave: Hi @solvingJ

Yep - it seems to be a typo in our documentation. We’re looking into the fix now. Thanks for reporting this!


#4