visibilityModifier

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

Can be public or internal. Is not valid: private and protected. By default, is 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