buildKotlinSourceFileContributions

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>(source)

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

Endpoints are grouped by source package and source file so each generated file can contribute members to a single merged endpoint contract.

Return

contributions grouped per generated Kotlin source file.

Parameters

endpoints

endpoint metadata to translate into source-file contributions.

endpointsSuffix

suffix appended to source-level enclosing endpoints interfaces.

generatedPackageName

package segment appended to source packages for generated sources.

aggregateInterfaceName

generates the aggregate interface name for a source file.

nestedInterfaceName

nested interface name exposed by every contributed endpoint member.

imports

supplies any generator-specific imports required for one source file.

endpointMemberContent

builds nested content for one endpoint and its shared contract model.

topLevelDeclarations

builds additional top-level declarations for one generated file.