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

io.github.fomin.oasgen.Writer.kt Maven / Gradle / Ivy

There is a newer version: 0.2.2
Show newest version
package io.github.fomin.oasgen

enum class OutputFileType {
    DTO, ROUTE
}

data class OutputFile(
        val path: String,
        val content: String,
        val type: OutputFileType
)

abstract class TypedFragment {
    abstract val fragment: Fragment
    abstract val parent: TypedFragment?
    override fun toString() = "${javaClass.simpleName}(${fragment.reference})"
    override fun equals(other: Any?): Boolean {
        if (this === other) return true
        if (javaClass != other?.javaClass) return false

        other as TypedFragment

        if (fragment != other.fragment) return false
        if (parent != other.parent) return false

        return true
    }

    override fun hashCode(): Int {
        var result = fragment.hashCode()
        result = 31 * result + (parent?.hashCode() ?: 0)
        return result
    }

}

interface Writer {
    fun write(
            items: Iterable
    ): List
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy