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
- There is no option to chose a markdown engine. The
common_mark
is used because [we are migrating to CommonMark] (#43011 (closed)). - 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?
-
Changelog entry added, if necessary -
Documentation created/updated -
API support added -
Tests added for this feature/bug - Review
-
Has been reviewed by UX -
Has been reviewed by Frontend -
Has been reviewed by Backend -
Has been reviewed by Database
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Squashed related commits together -
Internationalization required/considered -
End-to-end tests pass ( package-and-qa
manual pipeline job)
What are the relevant issue numbers?
Closes #19861 (closed)
Edited by blackst0ne