From 9c9a36d1a5c846a1e4e4b4cf4f20df0429a424f6 Mon Sep 17 00:00:00 2001 From: Mike Lueders Date: Mon, 1 Apr 2024 10:46:04 -0500 Subject: [PATCH] add test deps and makefile targets --- .gitignore | 5 ++++- .speakeasy/gen.yaml | 4 +++- Makefile | 6 ++++++ openapi.yaml | 13 +++++-------- 4 files changed, 18 insertions(+), 10 deletions(-) diff --git a/.gitignore b/.gitignore index 0c8d9c6..4c7ed85 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,7 @@ __pycache__/ .python-version .DS_Store .idea -*.iml \ No newline at end of file +*.iml +.venv +build +dist diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 9b434e2..19c18c3 100755 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -16,7 +16,9 @@ python: additionalDependencies: dependencies: {} extraDependencies: - dev: {} + dev: + pytest: ==8.1.1 + httpretty: ==1.1.4 author: Speakeasy clientServerStatusCodesAsErrors: true description: Python Client SDK Generated by Speakeasy diff --git a/Makefile b/Makefile index 7c26d87..64510bd 100644 --- a/Makefile +++ b/Makefile @@ -1,2 +1,8 @@ +init-venv: + if [ ! -d ".venv" ]; then python3 -m venv .venv; fi + +install: init-venv + source .venv/bin/activate; python3 -m pip install .[dev] + generate: speakeasy generate sdk -s openapi.yaml -o . -l python diff --git a/openapi.yaml b/openapi.yaml index 0549e41..346bd5f 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -11,19 +11,16 @@ paths: get: operationId: Example parameters: - - $ref: "#/components/parameters/ResultsPerPageQueryParam" + - $ref: "#/components/parameters/HeaderParam" responses: '200': description: example components: parameters: - ResultsPerPageQueryParam: + HeaderParam: description: The number of results to return per page (max 100) - in: query - name: results_per_page + in: header + name: header_param schema: - type: integer - format: int64 - maximum: 100 - default: 25 + type: string responses: {}