Code generation reference
module != package != functionPackageModule, package, and functionPackage
Three similarly named fields control ownership, type alias metadata, and function placement at different levels.
When to use
Use this page when choosing package fields or locating generated types and functions.
Behavior
moduleselects a user-defined project Module and therefore the repository/module that owns a public artifact.- Data Type
packageis optional package-alias metadata. It does not choose a filesystem directory. functionPackageselects placement below a generated functions root.functionModulechanges the owning Module only for a public function; otherwise the service owns it.
Which field should I use?
- To share a type: set
publicType = trueand selectmodule. - To override type import alias metadata: set Data Type
package; normally leave it empty. - To organize function source files: set
functionPackage. - To move a public function into another Module: set
publicFunction = trueand selectfunctionModule.
Fields properties
Ownership and placement controls must be interpreted together.
PropertyTypeDescription
publicTypebooleanMakes a Data Type module-owned and shareable.
Default:falsemoduleModuleUser-defined owner selected from StreamApp.modules.
packagestringOptional type package/import alias metadata.
Default:empty (inferred alias)publicFunctionbooleanSelects the public functions root instead of the service-internal root.
Default:falsefunctionModuleModuleOptional owner of a public function.
Used when publicFunction is true.functionPackagerelative pathPlacement below the selected functions root.
Default:empty (functions root)Configuration example
publicType: true
module: model
package: ""
publicFunction: false
functionPackage: domain/orders