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

de.lancom.openapi.entity.SecurityScheme.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.entity

import de.lancom.openapi.jackson.ReferenceParser
import de.lancom.openapi.jackson.Wrapper
import de.lancom.openapi.refs.Referenceable

sealed interface SecurityScheme : Referenceable {
    val type: SecuritySchemeType

    companion object : ReferenceParser {
        override fun parseWrapper(wrapper: Wrapper): SecurityScheme {
            val securitySchemeType = wrapper["type"]
                .getEnum(SecuritySchemeType::valueOf)
                .getOrError()

            return securitySchemeType.parser.parseWrapper(wrapper)
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy