mirror of
https://github.com/LukeHagar/speakeasy-playground.git
synced 2025-12-06 04:21:21 +00:00
add test deps and makefile targets
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -6,3 +6,6 @@ __pycache__/
|
|||||||
.DS_Store
|
.DS_Store
|
||||||
.idea
|
.idea
|
||||||
*.iml
|
*.iml
|
||||||
|
.venv
|
||||||
|
build
|
||||||
|
dist
|
||||||
|
|||||||
@@ -16,7 +16,9 @@ python:
|
|||||||
additionalDependencies:
|
additionalDependencies:
|
||||||
dependencies: {}
|
dependencies: {}
|
||||||
extraDependencies:
|
extraDependencies:
|
||||||
dev: {}
|
dev:
|
||||||
|
pytest: ==8.1.1
|
||||||
|
httpretty: ==1.1.4
|
||||||
author: Speakeasy
|
author: Speakeasy
|
||||||
clientServerStatusCodesAsErrors: true
|
clientServerStatusCodesAsErrors: true
|
||||||
description: Python Client SDK Generated by Speakeasy
|
description: Python Client SDK Generated by Speakeasy
|
||||||
|
|||||||
6
Makefile
6
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:
|
generate:
|
||||||
speakeasy generate sdk -s openapi.yaml -o . -l python
|
speakeasy generate sdk -s openapi.yaml -o . -l python
|
||||||
|
|||||||
13
openapi.yaml
13
openapi.yaml
@@ -11,19 +11,16 @@ paths:
|
|||||||
get:
|
get:
|
||||||
operationId: Example
|
operationId: Example
|
||||||
parameters:
|
parameters:
|
||||||
- $ref: "#/components/parameters/ResultsPerPageQueryParam"
|
- $ref: "#/components/parameters/HeaderParam"
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: example
|
description: example
|
||||||
components:
|
components:
|
||||||
parameters:
|
parameters:
|
||||||
ResultsPerPageQueryParam:
|
HeaderParam:
|
||||||
description: The number of results to return per page (max 100)
|
description: The number of results to return per page (max 100)
|
||||||
in: query
|
in: header
|
||||||
name: results_per_page
|
name: header_param
|
||||||
schema:
|
schema:
|
||||||
type: integer
|
type: string
|
||||||
format: int64
|
|
||||||
maximum: 100
|
|
||||||
default: 25
|
|
||||||
responses: {}
|
responses: {}
|
||||||
|
|||||||
Reference in New Issue
Block a user