Skip to content

Commit 719763f

Browse files
fix: Update client gen (#6)
Updates client generation to be on par with other places. Combines models and client files. Uses the updated spec.json from the clean up PR in the platform.
2 parents 3085c5b + 0415cdf commit 719763f

File tree

8 files changed

+26470
-25591
lines changed

8 files changed

+26470
-25591
lines changed

.github/workflows/gen-client.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,6 @@ jobs:
1616
run: |
1717
curl -H "Authorization: token ${{ secrets.GH_CQ_BOT }}" https://raw.githubusercontent.com/cloudquery/cloud/main/platform/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-
2519
- name: Set up Go 1.x
2620
uses: actions/setup-go@v5
2721
with:

Makefile

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,4 @@ lint:
88

99
.PHONY: gen-client
1010
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 ./...
11+
go generate ./...

0 commit comments

Comments
 (0)