summaryrefslogtreecommitdiff
path: root/doc/api/lint.md
diff options
context:
space:
mode:
Diffstat (limited to 'doc/api/lint.md')
-rw-r--r--doc/api/lint.md4
1 files changed, 3 insertions, 1 deletions
diff --git a/doc/api/lint.md b/doc/api/lint.md
index 48a7be13a28..867a5e54663 100644
--- a/doc/api/lint.md
+++ b/doc/api/lint.md
@@ -13,6 +13,8 @@ info: To determine the technical writer assigned to the Stage/Group associated w
Checks if CI/CD YAML configuration is valid. This endpoint validates basic CI/CD
configuration syntax. It doesn't have any namespace specific context.
+Access to this endpoint requires authentication.
+
```plaintext
POST /ci/lint
```
@@ -23,7 +25,7 @@ POST /ci/lint
| `include_merged_yaml` | boolean | no | If the [expanded CI/CD configuration](#yaml-expansion) should be included in the response. |
```shell
-curl --header "Content-Type: application/json" "https://gitlab.example.com/api/v4/ci/lint" --data '{"content": "{ \"image\": \"ruby:2.6\", \"services\": [\"postgres\"], \"before_script\": [\"bundle install\", \"bundle exec rake db:create\"], \"variables\": {\"DB_NAME\": \"postgres\"}, \"types\": [\"test\", \"deploy\", \"notify\"], \"rspec\": { \"script\": \"rake spec\", \"tags\": [\"ruby\", \"postgres\"], \"only\": [\"branches\"]}}"}'
+curl --header "Content-Type: application/json" --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/ci/lint" --data '{"content": "{ \"image\": \"ruby:2.6\", \"services\": [\"postgres\"], \"before_script\": [\"bundle install\", \"bundle exec rake db:create\"], \"variables\": {\"DB_NAME\": \"postgres\"}, \"types\": [\"test\", \"deploy\", \"notify\"], \"rspec\": { \"script\": \"rake spec\", \"tags\": [\"ruby\", \"postgres\"], \"only\": [\"branches\"]}}"}'
```
Be sure to paste the exact contents of your GitLab CI/CD YAML configuration because YAML