Octri

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 enginechoicedefault: fetch for TypeScript, okhttp for Kotlin

The library that makes requests. Two languages offer a choice:

LanguageValuesDefault
TypeScriptfetch, axiosfetch
Kotlinokhttp, ktorokhttp

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 Frameworkchoicedefault: pydantic

Python only: what the response models are.

ValueModels are
pydanticPydantic models, validated as they're parsed
dataclassStandard library dataclasses, with no extra dependency
typeddictTypedDict 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 typechoicedefault: async

TypeScript only.

ValueStudio labelMethods
asyncAsync (Promises)Return Promises
callbackCallbacksAlso take a Node-style callback

outputByLang.typescript.sdkType

SDK type (Kotlin)choicedefault: disabled

Kotlin only.

ValueStudio labelMethods
disabledBlockingBlock until the response arrives
enabledCoroutinesAre suspend functions, for kotlinx coroutines

outputByLang.kotlin.coroutines

Synchronous companionschoicedefault: include for Python, omit elsewhere
ValueStudio labelWhat it does
omitAsync onlyShips the asynchronous methods only
includeInclude syncAdds 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 stylechoicedefault: object for TypeScript, Go and Java; positional elsewhere

How 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 valueschoicedefault: open

Your API may add an enum value after a customer has installed your SDK. This decides what their code does when it sees one.

ValueStudio labelWhat it does
openForward-compatibleKeeps unknown server values, and keeps known values easy to discover
strictStrictRejects enum values the current schema doesn't declare

enumStrategy

Forward-compatible is the safer choice

With Strict, adding a value to your API can break customers on an older SDK.

What ships in the package

Generated unit testschoicedefault: include
ValueWhat it does
includeShips deterministic native tests derived from your API schema
omitLeaves generated test sources out of the package

See what's in the package.

unitTests

File headerchoicedefault: include
ValueStudio labelWhat it does
includeInclude Octri brandingMarks every generated file with an Octri DO NOT EDIT banner
omitRemove brandingGenerates files without the banner

Removing it needs the Enterprise plan. On other plans a build with omit is refused.

fileHeader

Comments and samples

Doc commentschoicedefault: full

full documents every method and field from your spec. minimal keeps comments short. See output detail.

outputByLang.<language>.docComments

Usage examplechoicedefault: full

full 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:

bash
octri sdk settings set httpEngine.typescript axios
octri sdk settings set style.python dataclass
octri sdk settings set unitTests omit

Coroutines in Kotlin:

bash
octri sdk settings set outputByLang.kotlin.coroutines enabled

A 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.