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 1616 run : |
1717 curl -H "Authorization: token ${{ secrets.GH_CQ_BOT }}" https://raw.githubusercontent.com/cloudquery/cloud/main/internal/servergen/spec.json -o spec.json
1818
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+
1925 - name : Set up Go 1.x
2026 uses : actions/setup-go@v3
2127 with :
Original file line number Diff line number Diff line change 66lint :
77 golangci-lint run
88
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