From 10e8acb646bca02d7e4ca3e793cc6779d1a41d66 Mon Sep 17 00:00:00 2001
From: Jakob Moser <moser@cl.uni-heidelberg.de>
Date: Thu, 26 Sep 2024 18:14:21 +0000
Subject: [PATCH] Add linter for OpenAPI

---
 .gitlab-ci.yml | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index c4bee32..ad3a6d6 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,10 +1,9 @@
-# * `.gitlab-ci.yml` file copied and modified from the GitLab Documentation (as of 2021-01-10, the contents of the script seem to have changed by now)
+# This snippet is copied and modified from the GitLab Documentation (as of 2021-01-10, the contents of the script seem to have changed by now)
 #   * Title of the documentation page: "Building a Docker image with kaniko"
 #   * Author: (c) 2011-present GitLab B.V.
 #   * URL: https://docs.gitlab.com/ee/ci/docker/using_kaniko.html#building-a-docker-image-with-kaniko
 #   * License: CC BY-SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0)
-
-docker-build:
+build-docker:
     image:
         name: gcr.io/kaniko-project/executor:debug
         entrypoint: [""]
@@ -17,3 +16,12 @@ docker-build:
         - /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG
     only:
         - master
+# End of adapted snippet
+
+lint-openapi:
+    image:
+        name: redocly/cli
+        entrypoint: [""]
+    stage: test
+    script: openapi lint portal/static/docs/api/v0/openapi-spec.yaml
+    allow_failure: true
-- 
GitLab