alloy.Nullable.scala Maven / Gradle / Ivy
package alloy
import smithy4s.Hints
import smithy4s.Schema
import smithy4s.ShapeId
import smithy4s.ShapeTag
import smithy4s.schema.Schema.constant
/** Use this trait to mark some field as nullable. This is to make
* a distinction between an optional field that is missing and one
* that's explicitly set to null.
*/
final case class Nullable()
object Nullable extends ShapeTag.Companion[Nullable] {
val id: ShapeId = ShapeId("alloy", "nullable")
val hints: Hints = Hints(
smithy.api.Documentation("Use this trait to mark some field as nullable. This is to make\na distinction between an optional field that is missing and one\nthat\'s explicitly set to null."),
smithy.api.Trait(selector = Some(":not([trait|trait])"), structurallyExclusive = None, conflicts = None, breakingChanges = None),
).lazily
implicit val schema: Schema[Nullable] = constant(Nullable()).withId(id).addHints(hints)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy