Change default content_type in API from text/plain to application/json

6 years ago I put content_type :txt, "text/plain" in lib/api/api.rb as a temporary fix to the bug 3c742dad.

This causes a side effect of API endpoints to support .txt format whenever we want it or not. Since we don't encourage nor document this behavior, its time to change it to application/json.

Example of the non desired behavior can be endpoint like this: https://gitlab.com/api/v4/users/1.txt

Timeline:

  • Introduce a feature flag !42229 (merged)
  • Improve the feature flag !46133 (merged)
  • Track feature flag progress #270067 (closed)
Edited Mar 22, 2021 by Dmytro Zaporozhets (DZ)
Assignee Loading
Time tracking Loading