Skip to content

Commit

Permalink
add schema for uri
Browse files Browse the repository at this point in the history
  • Loading branch information
fmeriaux committed Apr 11, 2024
1 parent 09550ec commit 2ce95de
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions core/src/main/scala/sttp/tapir/Schema.scala
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,7 @@ object Schema extends LowPrioritySchema with SchemaCompanionMacros {
implicit val schemaForJBigInteger: Schema[JBigInteger] = Schema(SInteger())
implicit val schemaForFile: Schema[TapirFile] = Schema(SBinary())
implicit val schemaForUri: Schema[Uri] = Schema(SString())
.encodedExample(Uri("https", "example.com"))

implicit def schemaForOption[T: Schema]: Schema[Option[T]] = implicitly[Schema[T]].asOption
implicit def schemaForArray[T: Schema]: Schema[Array[T]] = implicitly[Schema[T]].asArray
Expand Down

0 comments on commit 2ce95de

Please sign in to comment.