Skip to content

Client SDKs

mozrin edited this page Nov 18, 2026 · 2 revisions

Client SDK generation

The bundled OpenAPI contract targets Python, Dart Dio and TypeScript Axios. Presets supply package names, source version and owner metadata. Generated clients call the consuming Laravel application.

From a package source checkout, execute these commands with OpenAPI Generator 7.27.0:

openapi-generator-cli validate -i openapi.yaml
openapi-generator-cli generate -i openapi.yaml -g python -c sdk/presets/python.yaml -o build/sdk/python
openapi-generator-cli generate -i openapi.yaml -g dart-dio -c sdk/presets/dart-dio.yaml -o build/sdk/dart-dio
openapi-generator-cli generate -i openapi.yaml -g typescript-axios -c sdk/presets/typescript-axios.yaml -o build/sdk/typescript-axios

These are commands to execute, not source scripts. The generator needs its documented Java runtime or isolated official CLI container; it is not a PHP runtime dependency. Keep generated dependencies and build output out of package source. Run language-specific dependency installation and compilation after generation. Dart Dio's built_value models require dart run build_runner build. TypeScript enables ES6 output to work with current compilers instead of the deprecated ES5 default.

Set each generated client's base URL to your Laravel application's configured route prefix. Host authentication credentials/interceptors are application choices; no API key is invented by the package. Match the SDK version to the contract served by that installation. When distributing generated clients, preserve the package's LICENSE and exact NOTICE as well as generator and third-party notices; generating code is not publication or dataset redistribution clearance.

For 0.2.0, generation was validated with OpenAPI Generator 7.27.0. Python 3.13/Pydantic 2 and Dart 3.14/built_value models parsed actual PHP search/reverse responses; TypeScript 6 on Node 24 compiled CommonJS and ES module output. Dart analysis reported four generator-produced unused import/field warnings and no errors. Generated SDKs are not published artifacts of this repository.

Artisan wrapper availability and other unfinished product work are listed in coverage and roadmap.

For 0.3.0, all three targets were regenerated successfully with OpenAPI Generator 7.27.0 after adding API-root discovery. The model compilation/deserialization evidence above applies to 0.2.0; no new SDK compilation run is implied by regeneration. The checked-in presets are authoritative for package metadata.

Documentation home

by-dolly

Clone this wiki locally