Custom typeCustom type — Type system
A user-owned target-language type definition.
When to use
Define this contract before assigning it to stream valueType or keyType.
Behavior
- bindings supplies definitions for configured targets. Existing type inputs edit the corresponding binding without changing the controls. See native type bindings for Python and YAML examples.
Definition properties
Identity and representation
namestringCanonical named type referenced by streams and other types.
Requiredtypeint | uint | byte | char | boolean | unicode char | string | unicode string | float | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64 | any | error | array | map | struct | customDataType kind that controls generated representation, composition and serde behavior.
RequiredAllowed:int, uint, byte, char, boolean, unicode char, string, unicode string, float, double, int8, int16, int32, int64, uint8, uint16, uint32, uint64, any, error, array, map, struct, customdefinitionFormatNative | Protobuf | FlatBuffers | CapNProto | OpenAPISerialization or external definition format.
Allowed:Native, Protobuf, FlatBuffers, CapNProto, OpenAPIdescriptiontextGenerated type documentation.
Composition properties
Nested type references
keyTypeTypeMap key type.
map onlyvalueTypeTypeArray item or map value type.
array or mapCode generation properties
Sharing and target-language behavior
transferByValuebooleanUses value rather than pointer/reference signatures.
Default:falseuseAliasbooleanGenerates a named alias for a built-in scalar or runtime contract.
Default:falsepublicTypebooleanWhen true, the type is generated in the selected user-defined Module and can be shared across services.
moduleModuleName of a Module from the project-level modules collection. With publicType = true, this Module owns the generated type; its modulePath and repository layout determine the physical module directory and import identity.
publicType = truepackagestringOptional target-language package alias/compatibility metadata. Leave it empty unless external tooling explicitly consumes it. The current generator derives imports and physical placement from the resolved type path and from publicType + module; this field is not interpreted as a path such as folder/sub-folder.
emptybindingstarget -> { definition, import, package }Native type metadata keyed by template target. Userver and Coro have independent cppUserver and cppCoro entries; custom targets use their own keys.
Configuration example
name: Custom type
type: custom