Resolve "/api/v4/todos returns 500 when has wiki todo"
What does this MR do and why?
This resolves a 500 error for listing Todos API endpoint when a wiki page todo is present.
Turns out we require an API entity for WikiPage::Meta
, because the endpoint logic tries to automagically build it for every todo target type based on the class name in API::Entities::Todo
. This MR adds it and some specs.
References
Screenshots or screen recordings
Before | After |
---|---|
How to set up and validate locally
- Mention yourself on a wiki comment to get a wiki todo.
- Get a list of todos through the REST API.
- It works with this MR's changes and returns a 500 without.
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Edited by Piotr Skorupa