All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.community.flock.wirespec.plugin.CompilerArguments.kt Maven / Gradle / Ivy

There is a newer version: 0.10.17
Show newest version
package community.flock.wirespec.plugin

import community.flock.wirespec.compiler.core.Value
import kotlin.jvm.JvmInline

data class CompilerArguments(
    val operation: Operation,
    val input: Input,
    val output: Output?,
    val languages: Set,
    val packageName: PackageName,
    val shared: Boolean,
    val strict: Boolean,
    val debug: Boolean,
)

sealed interface Operation {
    data object Compile : Operation
    data class Convert(val format: Format) : Operation
}

enum class Format {
    OpenApiV2, OpenApiV3;

    companion object {
        override fun toString() = entries.joinToString()
    }
}

@JvmInline
value class PackageName(override val value: String) : Value

fun PackageName?.toDirectory() = let { (it)?.value }
    ?.split(".")
    ?.joinToString("/")
    ?: ""




© 2015 - 2024 Weber Informatics LLC | Privacy Policy