Refactor deprecated operations for OpenAPI

What does this MR do and why?

Refactor deprecated operations for OpenAPI. Follow-up to !214743 (comment 2929573371).

References

How to set up and validate locally

  1. In rails console, generate specification:
       Rails.application.eager_load!
       api_classes = API::Base.descendants
       entity_classes = Grape::Entity.descendants
       generator = Gitlab::GrapeOpenapi::Generator.new(api_classes: api_classes, entity_classes: entity_classes)
       File.write(Rails.root.join('tmp', 'myfile.json'), generator.generate.to_json)
  2. Use redocly to build documentation: redocly build-docs ~/gdk/gitlab/tmp/myfile.json
  3. Verify deprecations work as expected: e.g. /redoc-static.html#tag/CI-Minutes/operation/postApiV4NamespacesIdMinutes

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.

Related to #581045 (closed)

Merge request reports

Loading