openapi
Package openapi generates clients for a given OpenAPI specification
load("openapi@beta", ...)
openapi
load("openapi@beta", "openapi")
Functions
client(spec: Bytes, base_url: String, http_client: http.Client)
Example:
spec = fs.read("openapi.json")
client = openapi.client(spec=spec, base_url="https://api.example.com", http_client=http.client())
resp = client.my_operation(param="value")
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
spec | Bytes | ✓ | |
base_url | String | ✓ | |
http_client | http.Client | ✓ |
Returns: Client