Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions .github/workflows/gen-client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,6 @@ jobs:
run: |
curl -H "Authorization: token ${{ secrets.GH_CQ_BOT }}" https://raw.githubusercontent.com/cloudquery/cloud/main/platform/internal/servergen/spec.json -o spec.json

- name: Format Specs File
run: |
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
cp .generated/openapi.json spec.json
sudo rm -rf .generated

- name: Set up Go 1.x
uses: actions/setup-go@v5
with:
Expand Down
11 changes: 1 addition & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,4 @@ lint:

.PHONY: gen-client
gen-client:
@command -v openapi-generator >/dev/null 2>&1 || { \
echo "Error: 'openapi-generator' command not found. Please install it before running convert-spec."; \
echo "On MacOS you can use Homebrew: brew install openapi-generator"; \
echo "You can install it by following the instructions at: https://github.com/OpenAPITools/openapi-generator?tab=readme-ov-file#1---installation"; \
exit 1; \
}
openapi-generator generate -g openapi -i spec.json -o .openapi-tmp
mv .openapi-tmp/openapi.json spec.json
rm -rf .openapi-tmp
go generate ./...
Comment on lines -11 to -20

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's keep this? I think it was there to prevent a run of this wiping out your local changes to yaml files that you forgot to include in a path

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

go generate only generates (client|models).gen.go and doesn't touch any files otherwise I think.
The wiping happens with redocly.

go generate ./...
Loading