Skip to content

[Rubocop] Ensure all Grape APIs have a detail field

Overview

To ensure consistency across our Grape API definitions, we should ensure that there is a set of fields defined for every single MR. This will ensure that generated OpenAPI documentation is clear and consistent.

Note: There is already a cop that checks the detail field is a string, but doesn't appear to check for its existence.

Implementation plan

  • Add a new rubocop which checks all API endpoints for a detail field which is over 20 characters.
  • For all instances where this cop fails, either add a detail field (where its content is obvious), or create an issue for the product team in question to add it.
Edited by Max Woolf