Skip to content

Add OpenApi documentation for API::Lint

Laura Montemayor requested to merge update-lint-endpoint-docs into master

What does this MR do and why?

This MR adds API::Lint to OpenAPI V2. Descriptions and details taken from the latest documentation: https://docs.gitlab.com/ee/api/lint.html

  • 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/376935

MR 1/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_16.56.21

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