Skip to content

Add OpenAPI documentation for Admin::Ci::Variables

Laura Montemayor requested to merge lm-api-admin-ci-variables into master

This MR adds API::Admin::Ci::Varialbes to OpenAPI V2.

  • Check the API::Lint class:
    • Check if the parameter documentation needs to be updated
    • Check if the description block needs to be updated. Ideally this should include a success entry.
      • [-] If the endpoint responds with an Array, use the is_array true helper.
    • Compare the parameters and description to the markdown documentation for this endpoint
  • Add the endpoint to the OpenApiV2 documentation by modifying lib/api/api.rb and moving mount Lint into the other namespace, next to add_open_api_documentation!
  • Run rake gitlab:openapi:generate
  • 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.
  • Please do not commit the changes in doc/api/openapi/openapi_v2.yaml. Many teams will work on this in parallel. To avoid conflicts, we will try to have only one MR modifying the file at a time. @elim-ext or

Related to https://gitlab.com/gitlab-org/gitlab/-/issues/376858

MR 2/5

How to set up and validate locally

  1. Run rake gitlab:openapi:generate
  2. Review changes in doc/api/openapi/openapi_v2.yaml
  3. Paste the content into https://editor.swagger.io/ and look for merge request section and review the content

Screenshot_2022-11-02_at_18.53.10

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 Laura Montemayor

Merge request reports

Loading