File tree Expand file tree Collapse file tree 5 files changed +7907
-9229
lines changed Expand file tree Collapse file tree 5 files changed +7907
-9229
lines changed Original file line number Diff line number Diff line change 16
16
run : |
17
17
curl -H "Authorization: token ${{ secrets.GH_CQ_BOT }}" https://raw.githubusercontent.com/cloudquery/cloud/main/internal/servergen/spec.json -o spec.json
18
18
19
+ - name : Format Specs File
20
+ run : |
21
+ docker run --rm -v $(pwd):/local openapitools/openapi-generator-cli:v7.5.0 generate -i /local/spec.json -g openapi --skip-validate-spec -o /local/.generated
22
+ cp .generated/openapi.json spec.json
23
+ sudo rm -rf .generated
24
+
19
25
- name : Set up Go 1.x
20
26
uses : actions/setup-go@v3
21
27
with :
Original file line number Diff line number Diff line change 6
6
lint :
7
7
golangci-lint run
8
8
9
+ .PHONY : gen-client
10
+ gen-client :
11
+ @command -v openapi-generator > /dev/null 2>&1 || { \
12
+ echo " Error: 'openapi-generator' command not found. Please install it before running convert-spec." ; \
13
+ echo " On MacOS you can use Homebrew: brew install openapi-generator" ; \
14
+ echo " You can install it by following the instructions at: https://github.com/OpenAPITools/openapi-generator?tab=readme-ov-file#1---installation" ; \
15
+ exit 1; \
16
+ }
17
+ openapi-generator generate -g openapi -i spec.json -o .openapi-tmp
18
+ mv .openapi-tmp/openapi.json spec.json
19
+ rm -rf .openapi-tmp
20
+ go generate ./...
You can’t perform that action at this time.
0 commit comments