smithy.api.ExternalDocumentation.scala Maven / Gradle / Ivy
package smithy.api
import smithy4s.Hints
import smithy4s.Newtype
import smithy4s.Schema
import smithy4s.ShapeId
import smithy4s.schema.Schema.bijection
import smithy4s.schema.Schema.map
import smithy4s.schema.Schema.recursive
/** Provides a link to additional documentation. */
object ExternalDocumentation extends Newtype[Map[NonEmptyString, NonEmptyString]] {
val id: ShapeId = ShapeId("smithy.api", "externalDocumentation")
val hints: Hints = Hints(
smithy.api.Documentation("Provides a link to additional documentation."),
smithy.api.Trait(selector = None, structurallyExclusive = None, conflicts = None, breakingChanges = None),
).lazily
val underlyingSchema: Schema[Map[NonEmptyString, NonEmptyString]] = map(NonEmptyString.schema, NonEmptyString.schema).withId(id).addHints(hints).validated(smithy.api.Length(min = Some(1L), max = None))
implicit val schema: Schema[ExternalDocumentation] = recursive(bijection(underlyingSchema, asBijection))
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy