Skip to content

Resolve "Expand API: Render an arbitrary Markdown document"

What does this MR do?

Adds /api/v4/markdown API endpoint to render markdown text.

Parameter Type Required Description
text String Yes The markdown text to render
gfm Boolean No (optional) Render text using GitLab Flavored Markdown
project String No (optional) The full path of a project to use as the context when creating references using GitLab Flavored Markdown

Notes

  1. There is no option to chose a markdown engine. The common_mark is used because [we are migrating to CommonMark] (#43011 (closed)).
  2. The endpoint was added only to APIv4 because APIv3 is deprecated and about to be dropped.

Todo

  • add documentation
  • add specs
  • leave a comment in the issue when this MR is merged

Are there points in the code the reviewer needs to double check?

No.

Why was this MR needed?

Improve API

Screenshots (if relevant)

No.

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

Closes #19861 (closed)

Edited by blackst0ne

Merge request reports