Output options
Output options change what the generated code looks like and which libraries it uses. Open a language in SDK Studio and choose Output. Each option shows a preview in that language, so you can see the effect before you build.
Most options are set per language. Where it makes sense, Apply to every language copies one across. For names and structure, such as client style, namespaces and folder layout, see client shape.
Each option below names its key for octri sdk settings set. Every key is also in the settings reference.
Libraries
HTTP enginechoiceThe library that makes requests. Two languages offer a choice:
| Language | Values | Default |
|---|---|---|
| TypeScript | fetch, axios | fetch |
| Kotlin | okhttp, ktor | okhttp |
The other eight use one library each: httpx in Python, net/http in Go, java.net.http in Java, cURL in PHP, ureq in Rust, Net::HTTP in Ruby, dart:io in Dart and URLSession in Swift.
httpEngine, such as {"typescript": "axios"}
Data Model FrameworkchoicePython only: what the response models are.
| Value | Models are |
|---|---|
pydantic | Pydantic models, validated as they're parsed |
dataclass | Standard library dataclasses, with no extra dependency |
typeddict | TypedDict classes: responses stay plain dicts, typed for editors |
Choose Pydantic if your users already validate data with it. See Python.
style, such as {"python": "dataclass"}
How calls run
SDK typechoiceTypeScript only.
| Value | Studio label | Methods |
|---|---|---|
async | Async (Promises) | Return Promises |
callback | Callbacks | Also take a Node-style callback |
outputByLang.typescript.sdkType
SDK type (Kotlin)choiceKotlin only.
| Value | Studio label | Methods |
|---|---|---|
disabled | Blocking | Block until the response arrives |
enabled | Coroutines | Are suspend functions, for kotlinx coroutines |
outputByLang.kotlin.coroutines
Synchronous companionschoice| Value | Studio label | What it does |
|---|---|---|
omit | Async only | Ships the asynchronous methods only |
include | Include sync | Adds synchronous companions. Asynchronous methods stay available |
This changes the package in TypeScript, Dart and Swift, which add …Sync methods, and in Python, which adds a blocking client. In the other languages, methods already block.
syncMethods
Argument stylechoiceHow a method takes its parameters: one object, or positional arguments in order. See client shape, where both are shown in each language.
outputByLang.<language>.argumentStyle
Compatibility
Enum valueschoiceYour API may add an enum value after a customer has installed your SDK. This decides what their code does when it sees one.
| Value | Studio label | What it does |
|---|---|---|
open | Forward-compatible | Keeps unknown server values, and keeps known values easy to discover |
strict | Strict | Rejects enum values the current schema doesn't declare |
enumStrategy
With Strict, adding a value to your API can break customers on an older SDK.
What ships in the package
Generated unit testschoice| Value | What it does |
|---|---|
include | Ships deterministic native tests derived from your API schema |
omit | Leaves generated test sources out of the package |
unitTests
File headerchoice| Value | Studio label | What it does |
|---|---|---|
include | Include Octri branding | Marks every generated file with an Octri DO NOT EDIT banner |
omit | Remove branding | Generates files without the banner |
Removing it needs the Enterprise plan. On other plans a build with omit is refused.
fileHeader
Comments and samples
Doc commentschoicefull documents every method and field from your spec. minimal keeps comments short. See output detail.
outputByLang.<language>.docComments
Usage examplechoicefull shows setup and the call in generated samples, and concise shows the call alone.
outputByLang.<language>.usageExample
Examples
Axios in TypeScript, dataclasses in Python, and no generated tests:
octri sdk settings set httpEngine.typescript axios
octri sdk settings set style.python dataclass
octri sdk settings set unitTests omitCoroutines in Kotlin:
octri sdk settings set outputByLang.kotlin.coroutines enabledA dotted key changes one field and keeps the rest. Passing JSON to outputByLang itself replaces every language's entry.
When changes take effect
Like everything in SDK Studio, these are drafts. They go into your next build when you publish.
Related
- Settings reference: every SDK setting in one place.
- Client shape: names, namespaces and argument style.
octri sdk settings: the same settings from a terminal.