mirror of
https://github.com/kubernetes-sigs/external-dns.git
synced 2025-08-06 01:26:59 +02:00
fix review comments and switch to spectral linter
This commit is contained in:
parent
36c6da990d
commit
0a1c52b1c5
12
.github/workflows/lint.yaml
vendored
12
.github/workflows/lint.yaml
vendored
@ -29,14 +29,14 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
go-version-file: go.mod
|
go-version-file: go.mod
|
||||||
|
|
||||||
- name: Lint
|
- name: Lint go code
|
||||||
uses: golangci/golangci-lint-action@v6
|
uses: golangci/golangci-lint-action@v6
|
||||||
with:
|
with:
|
||||||
args: --timeout=30m
|
args: --timeout=30m
|
||||||
version: v1.60
|
version: v1.60
|
||||||
|
|
||||||
shell: bash
|
# Run Spectral
|
||||||
- name: Run Vacuum
|
- name: Lint OpenAPI spec
|
||||||
run: |
|
uses: stoplightio/spectral-action@2ad0b9302e32a77c1caccf474a9b2191a8060d83 # v0.8.11
|
||||||
go run github.com/daveshanley/vacuum@latest lint -d api/webhook.yaml
|
with:
|
||||||
shell: bash
|
file_glob: 'api/*.yaml'
|
||||||
|
1
.spectral.yaml
Normal file
1
.spectral.yaml
Normal file
@ -0,0 +1 @@
|
|||||||
|
extends: ["spectral:oas"]
|
3
Makefile
3
Makefile
@ -60,8 +60,9 @@ licensecheck:
|
|||||||
exit 1; \
|
exit 1; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Requires to install spectral. See https://github.com/stoplightio/spectral
|
||||||
oas-lint:
|
oas-lint:
|
||||||
go run github.com/daveshanley/vacuum@latest lint -d api/webhook.yaml
|
spectral lint api/*.yaml
|
||||||
|
|
||||||
# Run all the linters
|
# Run all the linters
|
||||||
.PHONY: lint
|
.PHONY: lint
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
---
|
---
|
||||||
openapi: "3.0.0"
|
openapi: "3.0.0"
|
||||||
info:
|
info:
|
||||||
version: 0.14.0
|
version: v0.15.0
|
||||||
title: External DNS Webhook Server
|
title: External DNS Webhook Server
|
||||||
description: >-
|
description: >-
|
||||||
Implements the external DNS webhook endpoints.
|
Implements the external DNS webhook endpoints.
|
||||||
@ -44,7 +44,7 @@ paths:
|
|||||||
- example.com
|
- example.com
|
||||||
'500':
|
'500':
|
||||||
description: |
|
description: |
|
||||||
Failed to provide the list of domains we serve.
|
Negociation failed.
|
||||||
|
|
||||||
/records:
|
/records:
|
||||||
get:
|
get:
|
||||||
|
@ -162,6 +162,7 @@ func TestAdjustEndpoints(t *testing.T) {
|
|||||||
}
|
}
|
||||||
j, _ := json.Marshal(endpoints)
|
j, _ := json.Marshal(endpoints)
|
||||||
w.Write(j)
|
w.Write(j)
|
||||||
|
|
||||||
}))
|
}))
|
||||||
defer svr.Close()
|
defer svr.Close()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user