t

sttp.tapir

Tapir

trait Tapir extends TapirExtensions with TapirComputedInputs with TapirStaticContentEndpoints with ModifyMacroSupport

Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Tapir
  2. ModifyMacroSupport
  3. ModifyMacroFunctorSupport
  4. TapirStaticContentEndpoints
  5. TapirComputedInputs
  6. TapirExtensions
  7. AnyRef
  8. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. type TapirFile = File
    Definition Classes
    TapirExtensions
  2. final class WebSocketBodyBuilder[REQ, REQ_CF <: CodecFormat, RESP, RESP_CF <: CodecFormat] extends AnyRef
  3. implicit class ModifyEach[F[_], T] extends AnyRef
    Definition Classes
    ModifyMacroFunctorSupport
  4. trait ModifyFunctor[F[_], A] extends AnyRef
    Definition Classes
    ModifyMacroFunctorSupport
  5. implicit class ModifyEachMap[F[_, _], K, T] extends AnyRef
    Definition Classes
    ModifyMacroSupport
  6. trait ModifyMapAtFunctor[F[_, _], K, T] extends AnyRef
    Definition Classes
    ModifyMacroSupport

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def anyFromStringBody[T, CF <: CodecFormat](codec: Codec[String, T, CF], charset: Charset): Body[String, T]

    A body in any format, read using the given codec, from a raw string read using charset.

  5. def anyFromUtf8StringBody[T, CF <: CodecFormat](codec: Codec[String, T, CF]): Body[String, T]

    A body in any format, read using the given codec, from a raw string read using UTF-8.

  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def auth: TapirAuth.type

    Inputs which describe authentication credentials with metadata.

  8. def binaryBody[R, T](implicit arg0: Binary[R], arg1: Codec[R, T, OctetStream]): Body[R, T]
  9. def byteArrayBody: Body[Array[Byte], Array[Byte]]
  10. def byteBufferBody: Body[ByteBuffer, ByteBuffer]
  11. def clientIp: EndpointInput[Option[String]]
    Definition Classes
    TapirComputedInputs
  12. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native() @HotSpotIntrinsicCandidate()
  13. def cookie[T](name: String)(implicit arg0: Codec[Option[String], T, TextPlain]): Cookie[T]
  14. def cookies: Header[List[Cookie]]
  15. def customJsonBody[T](implicit arg0: JsonCodec[T]): Body[String, T]

    Requires an implicit Codec.JsonCodec in scope.

    Requires an implicit Codec.JsonCodec in scope. Such a codec can be created using Codec.json.

    However, json codecs are usually derived from json-library-specific implicits. That's why integrations with various json libraries define jsonBody methods, which directly require the library-specific implicits.

    Unless you have defined a custom json codec, the jsonBody methods should be used.

  16. val emptyOutput: Empty[Unit]

    An empty output.

  17. def emptyOutputAs[T](value: T): Basic[T]

    An empty output.

    An empty output. Useful if one of the oneOf branches of a coproduct type is a case object that should be mapped to an empty body.

  18. val endpoint: PublicEndpoint[Unit, Unit, Unit, Any]
  19. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  20. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  21. def extractFromRequest[T](f: (ServerRequest) ⇒ T): ExtractFromRequest[T]

    Extract a value from a server request.

    Extract a value from a server request. This input is only used by server interpreters, it is ignored by documentation interpreters and the provided value is discarded by client interpreters.

  22. def fileBody: Body[FileRange, TapirFile]
  23. def fileGetServerEndpoint[F[_]](path: EndpointInput[Unit])(systemPath: String): ServerEndpoint[Any, F]

    A server endpoint, which exposes a single file from local storage found at systemPath, using the given path.

    A server endpoint, which exposes a single file from local storage found at systemPath, using the given path.

    fileGetServerEndpoint("static" / "hello.html")("/home/app/static/data.html")
    Definition Classes
    TapirStaticContentEndpoints
  24. def fileRangeBody: Body[FileRange, FileRange]
  25. def fileServerEndpoints[F[_]](prefix: EndpointInput[Unit])(systemPath: String): List[ServerEndpoint[Any, F]]

    Create pair of endpoints (head, get) for particular file

    Create pair of endpoints (head, get) for particular file

    Definition Classes
    TapirStaticContentEndpoints
  26. def filesGetEndpoint(prefix: EndpointInput[Unit]): PublicEndpoint[StaticInput, StaticErrorOutput, StaticOutput[FileRange], Any]
    Definition Classes
    TapirStaticContentEndpoints
  27. def filesGetServerEndpoint[F[_]](prefix: EndpointInput[Unit])(systemPath: String): ServerEndpoint[Any, F]

    A server endpoint, which exposes files from local storage found at systemPath, using the given prefix.

    A server endpoint, which exposes files from local storage found at systemPath, using the given prefix. Typically, the prefix is a path, but it can also contain other inputs. For example:

    filesGetServerEndpoint("static" / "files")("/home/app/static")

    A request to /static/files/css/styles.css will try to read the /home/app/static/css/styles.css file.

    Definition Classes
    TapirStaticContentEndpoints
  28. def filesHeadServerEndpoint[F[_]](prefix: EndpointInput[Unit])(systemPath: String): ServerEndpoint[Any, F]

    A server endpoint, used to verify if sever supports range requests for file under particular path Additionally it verify file existence and returns its size

    A server endpoint, used to verify if sever supports range requests for file under particular path Additionally it verify file existence and returns its size

    Definition Classes
    TapirStaticContentEndpoints
  29. def formBody[T](charset: Charset)(implicit arg0: Codec[String, T, XWwwFormUrlencoded]): Body[String, T]
  30. def formBody[T](implicit arg0: Codec[String, T, XWwwFormUrlencoded]): Body[String, T]
  31. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  32. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  33. def header(name: String, value: String): FixedHeader[Unit]
  34. def header(h: Header): FixedHeader[Unit]
  35. def header[T](name: String)(implicit arg0: Codec[List[String], T, TextPlain]): Header[T]
  36. def headers: Headers[List[Header]]
  37. val htmlBodyUtf8: Body[String, String]
  38. val infallibleEndpoint: PublicEndpoint[Unit, Nothing, Unit, Any]
  39. def inputStreamBody: Body[InputStream, InputStream]
  40. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  41. def isWebSocket: EndpointInput[Boolean]
    Definition Classes
    TapirComputedInputs
  42. implicit def mapModifyFunctor[M[KT, TT] <: Map[KT, TT], K, T](implicit cbf: CanBuildFrom[M[K, T], (K, T), M[K, T]]): ModifyMapAtFunctor[M, K, T]
    Definition Classes
    ModifyMacroSupport
  43. def multipartBody[T](implicit multipartCodec: MultipartCodec[T]): Body[Seq[RawPart], T]
  44. val multipartBody: Body[Seq[RawPart], Seq[Part[Array[Byte]]]]
  45. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  46. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  47. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  48. def oneOf[T](firstVariant: OneOfVariant[_ <: T], otherVariants: OneOfVariant[_ <: T]*): OneOf[T, T]

    An output which contains a number of variant outputs.

    An output which contains a number of variant outputs.

    All possible outputs must have a common supertype (T). Typically, the supertype is a sealed trait, and the variants are implementing case classes.

    When encoding to a response, the first matching output is chosen, using the following rules:

    1. the variant's appliesTo method, applied to the output value (as returned by the server logic) must return true.
    2. when a fixed content type is specified by the output, it must match the request's Accept header (if present). This implements content negotiation.

    When decoding from a response, the first output which decodes successfully is chosen.

    The outputs might vary in status codes, headers (e.g. different content types), and body implementations. However, for bodies, only replayable ones can be used, and they need to have the same raw representation (e.g. all byte-array-base, or all file-based).

    Note that exhaustiveness of the variants (that all subtypes of T are covered) is not checked.

  49. def oneOfDefaultVariant[T](output: EndpointOutput[T]): OneOfVariant[T]

    Create a fallback variant to be used in oneOf output descriptions.

    Create a fallback variant to be used in oneOf output descriptions. Multiple such variants can be specified, with different body content types.

  50. def oneOfVariant[T](code: StatusCode, output: EndpointOutput[T])(implicit arg0: ClassTag[T], arg1: ErasureSameAsType[T]): OneOfVariant[T]

    Create a one-of-variant which uses output if the class of the provided value (when interpreting as a server) matches the runtime class of T.

    Create a one-of-variant which uses output if the class of the provided value (when interpreting as a server) matches the runtime class of T. Adds a fixed status-code output with the given value.

    This will fail at compile-time if the type erasure of T is different from T, as a runtime check in this situation would give invalid results. In such cases, use oneOfVariantClassMatcher, oneOfVariantValueMatcher or oneOfVariantFromMatchType instead.

    Should be used in oneOf output descriptions.

  51. def oneOfVariant[T](output: EndpointOutput[T])(implicit arg0: ClassTag[T], arg1: ErasureSameAsType[T]): OneOfVariant[T]

    Create a one-of-variant which uses output if the class of the provided value (when interpreting as a server) matches the runtime class of T.

    Create a one-of-variant which uses output if the class of the provided value (when interpreting as a server) matches the runtime class of T.

    This will fail at compile-time if the type erasure of T is different from T, as a runtime check in this situation would give invalid results. In such cases, use oneOfVariantClassMatcher, oneOfVariantValueMatcher or oneOfVariantFromMatchType instead.

    Should be used in oneOf output descriptions.

  52. def oneOfVariantClassMatcher[T](code: StatusCode, output: EndpointOutput[T], runtimeClass: Class[_]): OneOfVariant[T]

    Create a one-of-variant which uses output i the class of the provided value (when interpreting as a server) matches the given runtimeClass.

    Create a one-of-variant which uses output i the class of the provided value (when interpreting as a server) matches the given runtimeClass. Note that this does not take into account type erasure. Adds a fixed status-code output with the given value.

    Should be used in oneOf output descriptions.

  53. def oneOfVariantClassMatcher[T](output: EndpointOutput[T], runtimeClass: Class[_]): OneOfVariant[T]

    Create a one-of-variant which uses output if the class of the provided value (when interpreting as a server) matches the given runtimeClass.

    Create a one-of-variant which uses output if the class of the provided value (when interpreting as a server) matches the given runtimeClass. Note that this does not take into account type erasure.

    Should be used in oneOf output descriptions.

  54. def oneOfVariantExactMatcher[T](code: StatusCode, output: EndpointOutput[T])(firstExactValue: T, rest: T*)(implicit arg0: ClassTag[T]): OneOfVariant[T]

    Create a one-of-variant which uses output if the provided value exactly matches one of the values provided in the second argument list.

    Create a one-of-variant which uses output if the provided value exactly matches one of the values provided in the second argument list. Adds a fixed status-code output with the given value.

    Should be used in oneOf output descriptions.

  55. def oneOfVariantExactMatcher[T](output: EndpointOutput[T])(firstExactValue: T, rest: T*)(implicit arg0: ClassTag[T]): OneOfVariant[T]

    Create a one-of-variant which output if the provided value exactly matches one of the values provided in the second argument list.

    Create a one-of-variant which output if the provided value exactly matches one of the values provided in the second argument list.

    Should be used in oneOf output descriptions.

  56. def oneOfVariantFromMatchType[T](code: StatusCode, output: EndpointOutput[T])(implicit arg0: MatchType[T]): OneOfVariant[T]

    Experimental!

    Experimental!

    Create a one-of-variant which uses output if the provided value matches the target type, as checked by MatchType. Instances of MatchType are automatically derived and recursively check that classes of all fields match, to bypass issues caused by type erasure. Adds a fixed status-code output with the given value.

    Should be used in oneOf output descriptions.

  57. def oneOfVariantFromMatchType[T](output: EndpointOutput[T])(implicit arg0: MatchType[T]): OneOfVariant[T]

    Experimental!

    Experimental!

    Create a one-of-variant which uses output if the provided value matches the target type, as checked by MatchType. Instances of MatchType are automatically derived and recursively check that classes of all fields match, to bypass issues caused by type erasure.

    Should be used in oneOf output descriptions.

  58. def oneOfVariantValueMatcher[T](code: StatusCode, output: EndpointOutput[T])(matcher: PartialFunction[Any, Boolean]): OneOfVariant[T]

    Create a one-of-variant which uses output if the provided value (when interpreting as a server matches the matcher predicate.

    Create a one-of-variant which uses output if the provided value (when interpreting as a server matches the matcher predicate. Adds a fixed status-code output with the given value.

    Should be used in oneOf output descriptions.

  59. def oneOfVariantValueMatcher[T](output: EndpointOutput[T])(matcher: PartialFunction[Any, Boolean]): OneOfVariant[T]

    Create a one-of-variant which uses output if the provided value (when interpreting as a server matches the matcher predicate.

    Create a one-of-variant which uses output if the provided value (when interpreting as a server matches the matcher predicate.

    Should be used in oneOf output descriptions.

  60. implicit def optionModifyFunctor[A]: ModifyFunctor[Option, A]
    Definition Classes
    ModifyMacroFunctorSupport
  61. def path[T](name: String)(implicit arg0: Codec[String, T, TextPlain]): PathCapture[T]
  62. def path[T](implicit arg0: Codec[String, T, TextPlain]): PathCapture[T]
  63. def pathBody: Body[FileRange, Path]
    Definition Classes
    TapirExtensions
  64. def paths: PathsCapture[List[String]]
  65. def plainBody[T](charset: Charset)(implicit arg0: Codec[String, T, TextPlain]): Body[String, T]
  66. def plainBody[T](implicit arg0: Codec[String, T, TextPlain]): Body[String, T]
  67. def query[T](name: String)(implicit arg0: Codec[List[String], T, TextPlain]): Query[T]
  68. def queryParams: QueryParams[QueryParams]
  69. def rawBinaryBody[R](implicit arg0: Binary[R], codec: Codec[R, R, OctetStream]): Body[R, R]
  70. def resourceGetServerEndpoint[F[_]](prefix: EndpointInput[Unit])(classLoader: ClassLoader, resourcePath: String, useGzippedIfAvailable: Boolean = false): ServerEndpoint[Any, F]

    A server endpoint, which exposes a single resource available from the given classLoader at resourcePath, using the given path.

    A server endpoint, which exposes a single resource available from the given classLoader at resourcePath, using the given path.

    resourceGetServerEndpoint("static" / "hello.html")(classOf[App].getClassLoader, "app/data.html")
    Definition Classes
    TapirStaticContentEndpoints
  71. def resourcesGetEndpoint(prefix: EndpointInput[Unit]): PublicEndpoint[StaticInput, StaticErrorOutput, StaticOutput[InputStream], Any]
    Definition Classes
    TapirStaticContentEndpoints
  72. def resourcesGetServerEndpoint[F[_]](prefix: EndpointInput[Unit])(classLoader: ClassLoader, resourcePrefix: String, useGzippedIfAvailable: Boolean = false): ServerEndpoint[Any, F]

    A server endpoint, which exposes resources available from the given classLoader, using the given prefix.

    A server endpoint, which exposes resources available from the given classLoader, using the given prefix. Typically, the prefix is a path, but it can also contain other inputs. For example:

    resourcesGetServerEndpoint("static" / "files")(classOf[App].getClassLoader, "app")

    A request to /static/files/css/styles.css will try to read the /app/css/styles.css resource.

    Definition Classes
    TapirStaticContentEndpoints
  73. def setCookie(name: String): Header[CookieValueWithMeta]
  74. def setCookieOpt(name: String): Header[Option[CookieValueWithMeta]]
  75. def setCookies: Header[List[CookieWithMeta]]
  76. def statusCode(statusCode: StatusCode): FixedStatusCode[Unit]

    An fixed status code output.

  77. def statusCode: StatusCode[StatusCode]

    An output which maps to the status code in the response.

  78. def streamBinaryBody[S](s: Streams[S]): StreamBodyIO[BinaryStream, BinaryStream, S]

    Creates a stream body with a binary schema.

    Creates a stream body with a binary schema. The application/octet-stream media type will be used by default, but can be later overridden by providing a custom Content-Type header value.

    s

    A supported streams implementation.

  79. def streamBody[S, T](s: Streams[S])(schema: Schema[T], format: CodecFormat, charset: Option[Charset] = None): StreamBodyIO[BinaryStream, BinaryStream, S]

    Creates a stream body with a text schema.

    Creates a stream body with a text schema.

    s

    A supported streams implementation.

    schema

    Schema of the body. This should be a schema for the "deserialized" stream.

    format

    The media type to use by default. Can be later overridden by providing a custom Content-Type header.

    charset

    An optional charset of the resulting stream's data, to be used in the content type.

  80. def streamTextBody[S](s: Streams[S])(format: CodecFormat, charset: Option[Charset] = None): StreamBodyIO[BinaryStream, BinaryStream, S]

    Creates a stream body with a text schema.

    Creates a stream body with a text schema.

    s

    A supported streams implementation.

    format

    The media type to use by default. Can be later overridden by providing a custom Content-Type header.

    charset

    An optional charset of the resulting stream's data, to be used in the content type.

  81. def stringBody(charset: Charset): Body[String, String]
  82. def stringBody(charset: String): Body[String, String]
  83. def stringBody: Body[String, String]
  84. implicit def stringToPath(s: String): FixedPath[Unit]
  85. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  86. def toString(): String
    Definition Classes
    AnyRef → Any
  87. implicit def traversableModifyFunctor[F[_], A](implicit cbf: CanBuildFrom[F[A], A, F[A]], ev: (F[A]) ⇒ TraversableLike[A, F[A]]): ModifyFunctor[F, A]
    Definition Classes
    ModifyMacroSupport
  88. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  89. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  90. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  91. def webSocketBody[REQ, REQ_CF <: CodecFormat, RESP, RESP_CF <: CodecFormat]: WebSocketBodyBuilder[REQ, REQ_CF, RESP, RESP_CF]

    REQ

    The type of messages that are sent to the server.

    REQ_CF

    The codec format (media type) of messages that are sent to the server.

    RESP

    The type of messages that are received from the server.

    RESP_CF

    The codec format (media type) of messages that are received from the server.

  92. def webSocketBodyRaw[S](s: Streams[S]): WebSocketBodyOutput[Pipe[WebSocketFrame, WebSocketFrame], WebSocketFrame, WebSocketFrame, Pipe[WebSocketFrame, WebSocketFrame], S]
  93. def xmlBody[T](implicit arg0: XmlCodec[T]): Body[String, T]

    Requires an implicit Codec.XmlCodec in scope.

    Requires an implicit Codec.XmlCodec in scope. Such a codec can be created using Codec.xml.

Deprecated Value Members

  1. def anyJsonBody[T](implicit arg0: JsonCodec[T]): Body[String, T]
    Annotations
    @deprecated
    Deprecated

    (Since version 0.18.0) Use customJsonBody

  2. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] ) @Deprecated
    Deprecated
  3. def oneOfDefaultMapping[T](output: EndpointOutput[T]): OneOfVariant[T]
    Annotations
    @deprecated
    Deprecated

    (Since version 0.19.0) Use oneOfDefaultVariant

  4. def oneOfMapping[T](code: StatusCode, output: EndpointOutput[T])(implicit arg0: ClassTag[T], arg1: ErasureSameAsType[T]): OneOfVariant[T]
    Annotations
    @deprecated
    Deprecated

    (Since version 0.19.0) Use oneOfVariant

  5. def oneOfMappingClassMatcher[T](code: StatusCode, output: EndpointOutput[T], runtimeClass: Class[_]): OneOfVariant[T]
    Annotations
    @deprecated
    Deprecated

    (Since version 0.19.0) Use oneOfVariantClassMatcher

  6. def oneOfMappingExactMatcher[T](code: StatusCode, output: EndpointOutput[T])(firstExactValue: T, rest: T*)(implicit arg0: ClassTag[T]): OneOfVariant[T]
    Annotations
    @deprecated
    Deprecated

    (Since version 0.19.0) Use oneOfVariantExactMatcher

  7. def oneOfMappingFromMatchType[T](code: StatusCode, output: EndpointOutput[T])(implicit arg0: MatchType[T]): OneOfVariant[T]
    Annotations
    @deprecated
    Deprecated

    (Since version 0.19.0) Use oneOfVariantFromMatchType

  8. def oneOfMappingValueMatcher[T](code: StatusCode, output: EndpointOutput[T])(matcher: PartialFunction[Any, Boolean]): OneOfVariant[T]
    Annotations
    @deprecated
    Deprecated

    (Since version 0.19.0) Use oneOfVariantValueMatcher

Inherited from ModifyMacroSupport

Inherited from ModifyMacroFunctorSupport

Inherited from TapirComputedInputs

Inherited from TapirExtensions

Inherited from AnyRef

Inherited from Any

Ungrouped