net.nemerosa.ontrack.kdsl.spec.ValidationStampExtensions.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ontrack-kdsl Show documentation
Show all versions of ontrack-kdsl Show documentation
Ontrack module: ontrack-kdsl
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