Skip to content

Commit a98a812

Browse files
authored
Merge pull request #14 from Escape-Technologies/feat/switch-to-openapi-generator
feat: switch to openapi-generator
2 parents 82de205 + 5800f65 commit a98a812

File tree

395 files changed

+72573
-238048
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

395 files changed

+72573
-238048
lines changed

.github/workflows/pr.yaml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Tests
2+
on:
3+
push:
4+
branches:
5+
- main
6+
pull_request:
7+
8+
env:
9+
GO_VERSION: "1.23.0"
10+
11+
jobs:
12+
go-mod:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
- uses: actions/setup-go@v5
17+
with:
18+
go-version: ${{ env.GO_VERSION }}
19+
- name: Check go mod
20+
run: |
21+
go mod tidy
22+
git diff --exit-code go.mod
23+
git diff --exit-code go.sum
24+
25+
golangci-lint:
26+
runs-on: ubuntu-latest
27+
steps:
28+
- uses: actions/checkout@v4
29+
- uses: actions/setup-go@v5
30+
with:
31+
go-version: ${{ env.GO_VERSION }}
32+
- name: lint
33+
uses: golangci/golangci-lint-action@v7.0.0
34+
with:
35+
version: latest
36+
37+
tests:
38+
strategy:
39+
matrix:
40+
os:
41+
- ubuntu-latest
42+
- ubuntu-24.04-arm
43+
- macos-latest
44+
golang:
45+
- "1.23"
46+
- "1.24"
47+
runs-on: ${{ matrix.os }}
48+
steps:
49+
- uses: actions/checkout@v4
50+
- uses: actions/setup-go@v5
51+
with:
52+
go-version: ${{ matrix.golang }}
53+
- name: Run tests
54+
run: go test ./...

.github/workflows/release-binary.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717

1818
- uses: actions/setup-go@v3
1919
with:
20-
go-version: 1.21.x
20+
go-version: "1.23.0"
2121

2222
- uses: docker/login-action@v2
2323
with:

.golangci.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
version: "2"
3+
linters:
4+
exclusions:
5+
generated: disable
6+
paths:
7+
- "pkg/api/v2/.*.go"
8+
rules:
9+
- path: "pkg/api/escape/.*.go"
10+
linters:
11+
- bodyclose
12+
enable:
13+
# https://golangci-lint.run/usage/linters/#disabled-by-default
14+
- gocyclo # Computes and checks the cyclomatic complexity of functions.
15+
- gocritic # Provides diagnostics that check for bugs, performance and style issues.
16+
# Extensible without recompilation through dynamic rules.
17+
# Dynamic rules are written declaratively with AST patterns, filters, report message and optional suggestion.
18+
- mnd # An analyzer to detect magic numbers.
19+
- revive # Fast, configurable, extensible, flexible, and beautiful linter for Go. Drop-in replacement of golint.
20+
- bodyclose # Checks whether HTTP response body is closed successfully.
21+
- durationcheck
22+
- containedctx
23+
- perfsprint
24+
- protogetter
25+
- spancheck
26+
- sloglint
27+
- noctx
28+
- exhaustive
29+
- contextcheck
30+
- whitespace
31+
- wrapcheck
32+
run:
33+
timeout: 5m

.goreleaser.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ builds:
2020
binary: "escape-cli"
2121
main: ./cmd/
2222
ldflags:
23-
- -s -w -X github.com/Escape-Technologies/cli/pkg/cli.version={{.Version}} -X github.com/Escape-Technologies/cli/pkg/cli.commit={{.ShortCommit}}
23+
- -s -w -X github.com/Escape-Technologies/cli/pkg/version.Version={{.Version}} -X github.com/Escape-Technologies/cli/pkg/version.Commit={{.ShortCommit}} -X github.com/Escape-Technologies/cli/pkg/version.BuildDate={{.BuildDate}}
2424

2525
kos:
2626
- repositories: [escapetech/cli]

.vscode/launch.json

Lines changed: 44 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,24 @@
88
"mode": "auto",
99
"program": "cmd/main.go",
1010
"envFile": "${workspaceFolder}/.env",
11-
"args": ["locations", "list"]
11+
"args": [
12+
"locations",
13+
"list"
14+
]
15+
},
16+
{
17+
"name": "Locations List -o json",
18+
"type": "go",
19+
"request": "launch",
20+
"mode": "auto",
21+
"program": "cmd/main.go",
22+
"envFile": "${workspaceFolder}/.env",
23+
"args": [
24+
"locations",
25+
"list",
26+
"--output",
27+
"json"
28+
]
1229
},
1330
{
1431
"name": "Locations Upsert",
@@ -17,7 +34,12 @@
1734
"mode": "auto",
1835
"program": "cmd/main.go",
1936
"envFile": "${workspaceFolder}/.env",
20-
"args": ["locations", "upsert", "test", "--new"]
37+
"args": [
38+
"locations",
39+
"upsert",
40+
"test",
41+
"--new"
42+
]
2143
},
2244
{
2345
"name": "Locations Start",
@@ -26,7 +48,25 @@
2648
"mode": "auto",
2749
"program": "cmd/main.go",
2850
"envFile": "${workspaceFolder}/.env",
29-
"args": ["locations", "start", "test"]
51+
"args": [
52+
"locations",
53+
"start",
54+
"test",
55+
"-vvvv"
56+
]
57+
},
58+
{
59+
"name": "Integrations Get",
60+
"type": "go",
61+
"request": "launch",
62+
"mode": "auto",
63+
"program": "cmd/main.go",
64+
"envFile": "${workspaceFolder}/.env",
65+
"args": [
66+
"integrations",
67+
"get",
68+
"438d2637-1cdf-47c7-983c-f46a580532ae"
69+
]
3070
}
3171
]
32-
}
72+
}

.vscode/settings.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
{
22
"yaml.schemas": {
33
"assets/oapi-configuration-schema.json": "pkg/api/config.yaml"
4-
}
4+
},
5+
"search.exclude": {
6+
"pkg/api/v2/**": true,
7+
"pkg/api/v1/**": true
8+
},
9+
"go.lintTool": "golangci-lint",
10+
"go.lintFlags": [],
511
}

0 commit comments

Comments
 (0)