Documentation for personal snippets lists wrong parameter (code instead of content)
There is confusion over whether code
or content
is the right parameter for snippets. Internally, the database stores content
. However:
- Project snippets use
code
: https://docs.gitlab.com/ee/api/project_snippets.html#create-new-snippet. This gets remapped here tocontent
: https://gitlab.com/gitlab-org/gitlab-ce/blob/de385eee8507a35f1c01ca784ba9aab9bc38e11d/lib/api/project_snippets.rb#L63 - Personal snippets use
content
: https://docs.gitlab.com/ee/api/snippets.html#create-new-snippet
@NikolayS @eread I think the documentation in https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/28571 is incorrect. I think you meant to use the first version, but updated the documentation in the second.
I think we should:
- Revert back to using
content
->code
in the second case - Consider standardizing everything around
content
.
Edited by Stan Hu