Translation pending — read in English.
Voir la référence API →Translation pending — read in English.
Translation pending — read in English.
Translation pending — read in English.
TypeScript / JavaScript
openapi-typescript + openapi-fetch
Type-only client and a fetch wrapper that pins the path/method/return-type tuple at compile time.
Python
openapi-python-client
Generates a httpx-based async/sync client with typed models. Active maintenance.
Go
oapi-codegen
Codegen for net/http and chi. Generates server stubs too if you ever proxy the API.
Translation pending — read in English.
Translation pending — read in English.
# Generate a typed client from the OpenAPI spec npx openapi-typescript public/openapi.yaml -o ./gen/api.ts # Install the lightweight fetch wrapper npm i openapi-fetch
Translation pending — read in English.
import createClient from "openapi-fetch";
import type { paths } from "./gen/api";
const client = createClient<paths>({
baseUrl: "https://api.gaflight.io",
headers: {
Authorization: `Bearer ${process.env.GAF_API_KEY}`,
"X-Org-Id": process.env.GAF_ORG_ID!,
},
});
const { data, error } = await client.GET("/api/v1/public/pilots", {});
if (error) throw error;
console.log(data);Translation pending — read in English.
Translation pending — read in English.
# pip install openapi-python-client
openapi-python-client generate --path public/openapi.yaml
# Then in your code:
from your_generated_client import Client
client = Client(
base_url="https://api.gaflight.io",
headers={
"Authorization": f"Bearer {API_KEY}",
"X-Org-Id": ORG_ID,
},
)# Generate Go bindings via oapi-codegen go install github.com/deepmap/oapi-codegen/cmd/oapi-codegen@latest oapi-codegen -package gaflight openapi.yaml > gaflight/client.gen.go
Translation pending — read in English.
Translation pending — read in English.
curl https://api.gaflight.io/api/v1/public/pilots \ -H "Authorization: Bearer gaf_pk_<your-token>" \ -H "X-Org-Id: <your-organization-uuid>"
Translation pending — read in English.
Translation pending — read in English. /openapi.yaml