Skip to content
Merged
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
10 changes: 8 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ define generate_client
./scripts/generate_client.sh gooddata-$(1)-client -f "/local/schemas/gooddata-$(1)-client.json"
endef

.PHONY: api-client
api-client: download
.PHONY: _api-client-generate
_api-client-generate:
rm -f schemas/gooddata-api-client.json
cat schemas/gooddata-*.json | jq -S -s 'reduce .[] as $$item ({}; . * $$item) + { tags : ( reduce .[].tags as $$item (null; . + $$item) | unique_by(.name) ) }' | sed '/\u0000/d' > "schemas/gooddata-api-client.json"
$(call generate_client,api)
Expand All @@ -69,6 +69,12 @@ api-client: download
sed -i.bak 's/\^\[\^\]\*\$$/^[^\\x00]*$$/g' {} + && \
find gooddata-api-client/gooddata_api_client -name '*.py.bak' -delete

.PHONY: api-client
api-client: download _api-client-generate

.PHONY: api-client-local
api-client-local: _api-client-generate

.PHONY: download
download:
$(call download_client,afm)
Expand Down
Loading