diff --git a/doc/endpoint/integrations.md b/doc/endpoint/integrations.md index 32d5ee1f38..8b9cc1d0d1 100644 --- a/doc/endpoint/integrations.md +++ b/doc/endpoint/integrations.md @@ -3,7 +3,7 @@ ```eval_rst .. note:: - Note that the codecs defined by the tapir integrations are used only when the specific types (e.g. enumerations0 are + Note that the codecs defined by the tapir integrations are used only when the specific types (e.g. enumerations) are used at the top level. Any nested usages (e.g. as part of a json body), need to be separately configured to work with the used json library. ``` diff --git a/doc/endpoint/schemas.md b/doc/endpoint/schemas.md index c74ec3402f..e37b014ea5 100644 --- a/doc/endpoint/schemas.md +++ b/doc/endpoint/schemas.md @@ -9,6 +9,9 @@ implicit scope during codec derivation, as well as when using [json](json.md) or Implicit schemas for basic types (`String`, `Int`, etc.), and their collections (`Option`, `List`, `Array` etc.) are defined out-of-the box. They don't contain any meta-data, such as descriptions or example values. +There's also a number of [datatype integrations](integrations.md) available, which provide schemas for various +third-party libraries. + For case classes and sealed hierarchies, `Schema[_]` values can be derived automatically using [Magnolia](https://github.com/softwaremill/magnolia), given that implicit schemas are available for all the case class's fields, or all of the implementations of the `enum`/`sealed trait`/`sealed class`. @@ -18,6 +21,10 @@ Two policies of custom type derivation are available: * automatic derivation * semi automatic derivation +Finally, schemas can be provided by hand, e.g. for Java classes, or other custom types. As a fallback, you can also +always use `Schema.string[T]` or `Schema.binary[T]`, however this will provide only basic documentation, and won't +perform any [validation](validation.md). + ## Automatic derivation Schemas for case classes, sealed traits and their children can be recursively derived. Importing `sttp.tapir.generic.auto._`