Skip to content

Commit

Permalink
Update local make client-generate command
Browse files Browse the repository at this point in the history
  • Loading branch information
awalker4 committed Sep 19, 2024
1 parent 54fd2eb commit 4d716d0
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ install:
python scripts/prepare-readme.py
poetry install

## install-speakeasy-cli: download the speakeasy cli tool
.PHONY: install-speakeasy-cli
install-speakeasy-cli:
curl -fsSL https://raw.githubusercontent.com/speakeasy-api/speakeasy/main/install.sh | sh

#################
# Test and Lint #
#################
Expand Down Expand Up @@ -48,16 +53,17 @@ lint:
# Speakeasy #
#############

## client-generate: Pull the openapi spec from the free hosted API and generate the SDK
.PHONY: client-generate
client-generate:
wget -nv -q -O openapi.json https://api.unstructured.io/general/openapi.json
speakeasy overlay validate -o ./overlay_client.yaml
speakeasy overlay apply -s ./openapi.json -o ./overlay_client.yaml > ./openapi_client.json
speakeasy generate sdk -s ./openapi_client.json -o ./ -l python

## client-generate-local: Generate the SDK using a local copy of openapi.json
.PHONY: client-generate-local
client-generate-local:
wget -nv -q -O openapi.json http://localhost:5000/general/openapi.json
speakeasy overlay validate -o ./overlay_client.yaml
speakeasy overlay apply -s ./openapi.json -o ./overlay_client.yaml > ./openapi_client.json
speakeasy generate sdk -s ./openapi_client.json -o ./ -l python
Expand Down

0 comments on commit 4d716d0

Please sign in to comment.