One contract, generated packages
Every Dataset API SDK is generated from openapi/dataset-api-v1.json with the framework’s pinned OpenAPI Generator. Endpoint methods, models, authentication, base URLs, and package versions therefore move with the canonical API contract instead of a hand-maintained copy.
The package pages below are read from the generated Dataset API manifest. A stale OpenAPI snapshot or generated file causes the SDK checks to fail.
| Artifact | Guarantee |
|---|---|
| GENERATION.json | Binds the package to the OpenAPI version, specification SHA-256, and generator version |
| SDK_VERIFICATION_PLAN.json | Lists contract-derived operations and required checks |
| FAKE_API.md | Documents the shared product-aware fake endpoint and demo credential |
| manifest.json | Records every generated file hash and all 22 language targets |
TypeScript against fake data
npm install ./sdks/generated/dataset-api/typescriptimport { Configuration, DatasetsApi } from "@datasetapi/sdk";
const config = new Configuration({
basePath: "http://localhost:3000/api/fake/dataset-api/v1",
accessToken: process.env.DATASET_API_KEY,
});
const catalog = await new DatasetsApi(config).listDatasets({ xAPIVersion: "1" });
console.log(catalog.data[0].latest_release);Python against fake data
python -m pip install ./sdks/generated/dataset-api/pythonimport asyncio
import os
import dataset_api
async def main():
config = dataset_api.Configuration(
host="http://localhost:3000/api/fake/dataset-api/v1",
access_token=os.environ["DATASET_API_KEY"],
)
async with dataset_api.ApiClient(config) as client:
catalog = await dataset_api.DatasetsApi(client).list_datasets(x_api_version="1")
print(catalog.data[0].latest_release)
asyncio.run(main())Deterministic fake API
Run the Dataset API site locally, set DATASET_API_KEY to a disposable local test credential, then use http://localhost:3000/api/fake/dataset-api/v1. The HTTP fake is backed by the same Dataset Builder adapter as the preview UI and exposes catalog, release, query, build, cancellation, download, and health operations with stable fixtures.
The fake is for integration development, examples, and SDK verification. It is not a substitute for sandbox performance or production data-quality testing.
npm run sdk:fake:reset -- --product dataset-apiRegenerate and verify
- 1Change the canonical OpenAPI contract
- 2Run npm run sdk:generate to regenerate every configured product and language package
- 3Run npm run sdk:check to prove committed output is current
- 4Run npm run sdk:e2e -- --product dataset-api --language typescript and repeat for Python
- 5Run the operation E2E suite before publishing a package