Skip to content

Add Pages to OpenAPI docs

What does this MR do and why?

Contributes to https://gitlab.com/gitlab-org/gitlab/-/issues/376953

  • Add field documentation for Grape::Entity
  • Add response codes for API endpoints

Screenshots or screen recordings

image

How to set up and validate locally

Documentation source: https://docs.gitlab.com/ee/api/pages.html

  1. Run rake gitlab:openapi:generate
  2. Review changes in doc/api/openapi/openapi_v2.yaml. You can check the content of the file by pasting it into https://editor.swagger.io. Errors will be shown on the left side.

MR acceptance checklist

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

Merge request reports