![JAR search and dependency download from the Maven repository](/logo.png)
com.ancientlightstudios.quarkus.kotlin.openapi.parser.SchemaCollector.kt Maven / Gradle / Ivy
package com.ancientlightstudios.quarkus.kotlin.openapi.parser
import com.ancientlightstudios.quarkus.kotlin.openapi.models.hints.OriginPathHint.originPath
import com.ancientlightstudios.quarkus.kotlin.openapi.models.transformable.TransformableSchema
import com.ancientlightstudios.quarkus.kotlin.openapi.utils.pop
class SchemaCollector {
private val collectedReferences = mutableMapOf()
private val unresolvedSchema = mutableSetOf()
fun registerSchema(contextPath: String) = collectedReferences.getOrPut(contextPath) {
TransformableSchema("")
.apply {
originPath = contextPath
}.also {
unresolvedSchema.add(it)
}
}
val nextUnresolvedSchema: TransformableSchema?
get() = unresolvedSchema.pop()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy