KtorGenVisibilityControl

annotation class KtorGenVisibilityControl(val visibilityModifier: KtorGenVisibility = KtorGenVisibility.DEFAULT, val classVisibilityModifier: KtorGenVisibility = KtorGenVisibility.DEFAULT, val constructorVisibilityModifier: KtorGenVisibility = KtorGenVisibility.DEFAULT, val factoryFunctionVisibilityModifier: KtorGenVisibility = KtorGenVisibility.DEFAULT)(source)

KtorGenExperimental Indicate the visibility modifier for all generated code (class, primary constructor, and extension functions)

Can be public or internal. Is not valid: private. By default, there is a visibility modifier of the interface.

Don't confuse the visibility of generated code with interface visibility. The interface can't be private

Combination of internal interface and public class is valid, but can lead to compilation errors if exposed something internal in public function. For advanced use cases, use internal modifier directly on the interface and manually write functions or only use constructor.

See also

Properties

Link copied to clipboard

Control the visibility modifier of the generated class only.

Link copied to clipboard

Control the visibility modifier of the generated primary constructor only.

Link copied to clipboard

Control the visibility modifier of the generated factory functions only.