Generating SDKs
Automatic OpenAPI Schema
Section titled “Automatic OpenAPI Schema”JustAPI generates an OpenAPI 3.1 schema at /openapi.json:
curl http://localhost:8000/openapi.jsonGenerate Python Client
Section titled “Generate Python Client”pip install openapi-generator-cli
openapi-generator-cli generate \ -i http://localhost:8000/openapi.json \ -g python \ -o ./clients/pythonGenerate TypeScript Client
Section titled “Generate TypeScript Client”openapi-generator-cli generate \ -i http://localhost:8000/openapi.json \ -g typescript-axios \ -o ./clients/typescriptAvailable Languages
Section titled “Available Languages”| Language | Generator |
|---|---|
| Python | python |
| TypeScript | typescript-axios |
| Go | go |
| Java | java |
| Ruby | ruby |
| C# | csharp |
| Swift | swift5 |
Custom ID Function
Section titled “Custom ID Function”Customize operation IDs for better SDK generation:
from justapi import JustAPIApp
def custom_id(operation): return f"{operation.tags[0]}_{operation.name}" if operation.tags else operation.name
app = JustAPIApp(generate_unique_id_function=custom_id)See Also
Section titled “See Also”- OpenAPI Callbacks & Webhooks — outbound schemas
- Additional Responses in OpenAPI — error docs
- Metadata & Docs URLs — app metadata