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

de.lancom.openapi.jackson.ReferenceParser.kt Maven / Gradle / Ivy

Go to download

This open-source project provides an OpenAPI 3.0 Parser implemented in Kotlin, utilizing immutable data classes

There is a newer version: 2.1.1
Show newest version
package de.lancom.openapi.jackson

import de.lancom.openapi.field.Field
import de.lancom.openapi.refs.ReferenceOrInstance
import de.lancom.openapi.refs.Referenceable

// TODO?
interface ReferenceParser : Parser {
    fun parseReferenceOrEntity(
        wrapper: Wrapper
    ): Field> {
        return wrapper.getReferenceOrEntity(::parseWrapper)
    }

    fun parseReferenceOrEntityOpt(
        wrapper: Wrapper
    ): Field?> {
        return wrapper.getNullOrElse {
            parseReferenceOrEntity(wrapper)
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy