Skip to content

Add AlertManagementAlerts to OpenAPI documentation

Peter Leitzen requested to merge pl-openapi-alert-management into master

What does this MR do and why?

This MR adds API::AlertManagementAlerts to OpenAPI V2.

It also adjusted some example strings in the REST API documentation to match OpenAPI examples.

From the commit message:

* Add response codes for API endpoints
* Add field documentation for entities

This is needed to show examples nicely in Swagger UI. See screenshots 👇

Closes https://gitlab.com/gitlab-org/gitlab/-/issues/376862.

Screenshots or screen recordings

  1. Run bundle rake gitlab:openapi:generate
  2. Go to https://editor-next.swagger.io/
  3. Import doc/api/openapi/openapi_v2.yaml via File > Import File
  4. Wait for it
  5. Search for alert_management endpoints
  6. Expand endpoints
https://editor-next.swagger.io/ Screenshot_from_2022-11-16_11-43-29 Screenshot_from_2022-11-16_11-43-44 Screenshot_from_2022-11-16_11-44-01 Screenshot_from_2022-11-16_11-44-11 Screenshot_from_2022-11-16_11-44-22

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Peter Leitzen

Merge request reports