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
Docker Remote API: Documentation is missing and misleading #7669
Comments
Here's another example, Inspect Container's {...
"OnBuild": []
...} |
My suggestion: you should provide the entire object model for those types you are returning in responses. Even a godoc.org link to those types would be super helpful in the API docs. |
Another example: In the response example for the "Get the history of an image" call (v1.13) there is no such fields called |
Another example: In the response example for "Inspect container" endpoint, quite a lot of endpoints are either do not appear at all or their type simply cannot be inferred from the example output (or my local
all those fields are missing from your example output. Docs are not complete in that sense. |
Thanks for looking at this! Would be awesome if you could make a PR to update the fields you found to be missing. Docs are in docs/sources/reference/api |
@cpuguy83 it simply won't fix if I add missing fields. There will be still a lot of misleading parameter descriptions, inconsistent response types, inconsistent naming, inconsistent URL routes. To solve this, the documentation needs a full description of its response types and clear statements of what parameters can take which values and which are mutually exclusive etc. This needs an entire API and docs update. I will try to come up with a proposal soon. |
I've noticed this problem as well. I often have to try and create containers, get them into the correct state, then make an API call to see what the API actually returns. I've also noticed that request parameters are often missing from the documentation, which is significantly harder to find. There are a couple tools used for this type of documentation that are starting to emerge as possible standards. I think the most popular is http://swagger.io/ which uses json schemas and comes with a lot of excellent tooling. (http://apiblueprint.org/ uses markdown and is probably also worth a mention). As a solution to this issue, I propose creating swagger schemas as the official remote API documentation. A swagger schema (with swagger ui) gives you not only excellent documentation, the swagger ui also provides a way to interactive with the docker remote directly from the browser. |
also see #2583 |
Closing this for the sake of #15188. |
Many fields in the response objects that I actually get in my local calls do not exist in Remote API v1.13 documentation.
And documentation is so bad that there are no types specified.
e.g. it just says:
what is the type of this field? It is just a null in JSON response.
That doesn't make sense. Docs are very vague and it's almost impossible to write a correctly working client without reading other clients and keep testing every single corner case (e.g. you gotta reproduce a case where portspecs is not null by creating a container etc).
This is crazy and will not help things move forward very well.
The text was updated successfully, but these errors were encountered: