Skip to main content
The generate-types command creates type definition files in a given language for all enabled SuprSend schemas from a specified workspace.

Syntax

suprsend generate-types <language> --output-file <output-file> [flags]
Arguments:
ArgumentDescription
<language>The programming language to generate types for. Supported languages - typescript, go, python, java, kotlin, swift, dart
--output-filePath to the output file where types will be generated (required)

Flags

FlagDescriptionDefault
-h, --helpShow help for the command
--output-file stringOutput file for generated types
--build-flags stringFlags to generate types in a certain way (e.g. --zod for TypeScript)
--mode stringMode of schema to fetch (draft, live)live
--workspace stringWorkspace to get schemas fromstaging

Example

# Generate TypeScript types from all enabled schemas in staging workspace
suprsend generate-types python --output-file suprsend-types.py

# Generate Python types with Pydantic in production workspace
suprsend generate-types python --pydantic --workspace production