File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -89,3 +89,25 @@ publish:
8989.PHONY : run-jupyter
9090run-jupyter :
9191 PYTHONPATH=$(realpath .) JUPYTER_PATH=$(realpath .) jupyter-notebook --NotebookApp.token=' ' --NotebookApp.password=' '
92+
93+ # # download-openapi-specs: Download the openapi specs from the Serverless and Platform APIs
94+ .PHONY : download-openapi-specs
95+ download-openapi-specs :
96+ wget -nv -q -O openapi_serverless.json https://api.unstructured.io/general/openapi.json
97+ wget -nv -q -O openapi_platform_api.json https://platform.unstructuredapp.io/openapi.json
98+
99+ # # client-merge-serverless-platform: Merge the Serverless and Platform APIs into a single schema
100+ .PHONY : client-merge-serverless-platform
101+ client-merge-serverless-platform :
102+ speakeasy merge -s ./openapi_serverless.json -s ./openapi_platform_api.json -o ./openapi_merged.yaml
103+
104+ # # client-generate-unified-sdk-local: Generate the SDK using merged schemas
105+ .PHONY : client-generate-unified-sdk-local
106+ client-generate-platform-local :
107+ speakeasy overlay validate -o ./overlay_client.yaml
108+ speakeasy overlay apply -s ./openapi_merged.yaml -o ./overlay_client.yaml > ./openapi_platform_serverless_client.yaml
109+ speakeasy generate sdk -s ./openapi_platform_serverless_client.yaml -o ./ -l python
110+
111+ # # client-generate-sdk: Do all the steps to generate the SDK
112+ .PHONY : client-generate-sdk
113+ client-generate-sdk : download-openapi-specs client-merge-serverless-platform client-generate-unified-sdk-local
You can’t perform that action at this time.
0 commit comments