Package-level declarations

Types

Link copied to clipboard
data class GeneratedQueryParameterTypeInfo(val nonNullableType: String, val renderedType: String, val hasDefault: Boolean, val hasNonNullDefault: Boolean)

Shared type information used when generators expose query parameters as Kotlin method arguments.

Link copied to clipboard
data class GeneratorConfiguration(val clientSuffix: String = "Client", val serverSuffix: String = "Server")

Generator-specific configuration shared across Tapik plugin frontends.

Link copied to clipboard
data class KotlinEndpointGenerationContext(val contractTypeName: String, val endpointReference: String, val methodName: String, val summaryLines: List<String>, val detailLines: List<String>, val response: KotlinEndpointResponseModel)

Shared naming and response-shape information exposed to Kotlin endpoint generators.

Link copied to clipboard
data class KotlinEndpointMemberContribution(val endpointPropertyName: String, val content: String)

Nested content that should be inserted into one generated endpoint contract interface.

Link copied to clipboard

Describes the generated public response type for a Kotlin endpoint contract.

Link copied to clipboard
data class KotlinSourceFileContribution(val packageName: String, val sourcePackageName: String, val sourceFile: String, val aggregateInterfaceName: String, val nestedInterfaceName: String, val imports: Set<String> = emptySet(), val endpointMembers: List<KotlinEndpointMemberContribution>, val topLevelDeclarations: List<String> = emptyList())

Integration-specific content for one generated Kotlin source file.

Link copied to clipboard

A generator that creates Markdown documentation from tapik endpoint definitions.

Link copied to clipboard
data class TapikCodeGenerationConfiguration(val outputDirectory: File, val generatedSourcesDirectory: File, val generatedPackageName: String = "generated", val endpointsSuffix: String = "Endpoints", val basePackage: String, val compiledClassesDirectory: File, val additionalClasspathDirectories: List<File>, val generatorConfigurations: Map<String, GeneratorConfiguration>)

Shared configuration for the Tapik code-generation engine.

Link copied to clipboard

Shared code-generation engine used by plugin frontends such as Gradle and Maven integrations.

Link copied to clipboard

Contract implemented by generators that directly emit artefacts during invocation.

Link copied to clipboard
interface TapikGenerator

Marker contract implemented by Tapik generators loaded at runtime.

Link copied to clipboard
data class TapikGeneratorContext(val outputDirectory: File, val generatedSourcesDirectory: File, val generatedPackageName: String = "generated", val endpointsSuffix: String = "Endpoints", val logger: TapikLogger, val generatorConfiguration: GeneratorConfiguration)

Carries directories and logging utilities that Tapik generators rely on.

Link copied to clipboard
data class TapikKotlinContribution(val sourceFiles: List<KotlinSourceFileContribution> = emptyList())

Contribution set emitted by a TapikKotlinEndpointGenerator.

Link copied to clipboard

Specialised Tapik generator that contributes nested Kotlin members to shared endpoint contract files.

Link copied to clipboard
interface TapikLogger

Logging callbacks used by the shared Tapik code-generation engine.

Functions

Link copied to clipboard
fun StringBuilder.appendGeneratedKdoc(summaryLines: List<String>, detailLines: List<String>, indentation: String)

Appends a KDoc block when summary or detail lines are available.

Link copied to clipboard
fun buildKotlinSourceFileContributions(endpoints: List<HttpEndpointMetadata>, endpointsSuffix: String, generatedPackageName: String, aggregateInterfaceName: (sourceFile: String) -> String, nestedInterfaceName: String, imports: (endpointsInFile: List<HttpEndpointMetadata>) -> Set<String> = { emptySet() }, endpointMemberContent: (endpoint: HttpEndpointMetadata, context: KotlinEndpointGenerationContext) -> String, topLevelDeclarations: (sourceFile: String, aggregateInterfaceName: String, endpointContexts: List<Pair<HttpEndpointMetadata, KotlinEndpointGenerationContext>>) -> List<String> = { _, _, _ -> emptyList() }): List<KotlinSourceFileContribution>

Builds source-file contribution DTOs for Kotlin generators from shared endpoint metadata.

Link copied to clipboard

Creates a Kotlin contribution result while handling the common empty-endpoint fast path and logging.

Link copied to clipboard

Escapes quotes and path separators so that the string can be safely embedded inside annotation arguments.

Link copied to clipboard

Escapes terminator sequences that would prematurely end a KDoc block.

Link copied to clipboard

Renders the receiver type as a Kotlin type literal, including generics and nullability information.

Link copied to clipboard

Returns the Kotlin value type exposed by generated code for the receiver body metadata.

Link copied to clipboard
fun sanitizeIdentifier(rawName: String?, fallback: String): String

Sanitises an arbitrary identifier so that it is safe to use as a Kotlin name.

Link copied to clipboard

Resolves the simple, unqualified name of the receiver type.

Link copied to clipboard
fun String.toGeneratedPackageName(generatedPackageName: String): String

Appends generatedPackageName to the receiver package unless the receiver is blank.

Link copied to clipboard

Resolves the Kotlin argument type information used by generated clients/controllers for a query parameter.

Link copied to clipboard

Generates a unique identifier by applying numeric suffixes until an unused variant is discovered.

Link copied to clipboard
fun writeMergedKotlinSourceFiles(endpoints: List<HttpEndpointMetadata>, sourceFiles: List<KotlinSourceFileContribution>, generatedSourcesDirectory: File, endpointsSuffix: String = "Endpoints", logWarn: (String, Throwable?) -> Unit = { _, _ -> }): Set<File>

Writes merged Kotlin endpoint contract files to generatedSourcesDirectory.