Package-level declarations
Core Annotations
This section documents the core annotations used to define options and how the compiler interprets them. These annotations control how Ktorgen scans interfaces, generates client factories, and connects them to Ktor’s HTTP client.
More information, see Core Annotations.
Types
Each generated class, function, and files is annotated with this to identify them if they need to be excluded, for instance, by static analysis tools.
Annotation used to generate client implementations for Ktor client interfaces.
This annotation provides fine-grained control over how annotations from the original interface method are handled and propagated to the generated implementation.
Whether to generate a create(client) extension function of interface's companion object.
Experimental API, the processor can omit the annotation, or generated code has errors.
Indicates that a method within a @KtorGen-annotated interface should participate in code generation.
An annotation used to mark an expect factory function for multi-platform support in KSP running on each platform.
Whether to generate an extension function on HttpClient to instantiate the API.
An annotation used to mark an expect factory function for multi-platform support in KSP running on each platform.
Whether to generate a top-level function in the same package as the interface.
Visibility modifier for generated code. Use with @KtorGenVisibilityControl()
KtorGenExperimental Indicate the visibility modifier for all generated code (class, primary constructor, and extension functions)