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

net.nemerosa.ontrack.kdsl.spec.ValidationStampExtensions.kt Maven / Gradle / Ivy

There is a newer version: 4.4.5
Show newest version
package net.nemerosa.ontrack.kdsl.spec

import net.nemerosa.ontrack.json.asJson
import net.nemerosa.ontrack.kdsl.connector.Connected
import net.nemerosa.ontrack.kdsl.connector.graphql.schema.fragment.ValidationStampFragment


/**
 * Creates a [ValidationStamp] from a GraphQL [ValidationStampFragment].
 */
fun ValidationStampFragment.toValidationStamp(connected: Connected) = ValidationStamp(
    connector = connected.connector,
    id = id().toUInt(),
    name = name()!!,
    description = description(),
    dataType = dataType()?.descriptor()?.id(),
    dataTypeConfig = dataType()?.config()?.asJson(),
)




© 2015 - 2024 Weber Informatics LLC | Privacy Policy