Skip to content

Update project snippet API docs to use content parameter

Stan Hu requested to merge sh-snippet-content-docs into master

There was some confusion over whether code or content is the right parameter for snippets. Internally, the database stores content. However:

  1. Project snippets use code. code gets remapped in content in lib/api/project_snippets.rb.

  2. Personal snippets use content.

In GitLab 12.3, gitlab-foss!32296 (merged) standardized the APIs to use content while allowing the deprecated code field to be used for project snippets.

Edited by 🤖 GitLab Bot 🤖

Merge request reports