You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: generated-doc/out/endpoint/customtypes.md
+3-1
Original file line number
Diff line number
Diff line change
@@ -104,7 +104,7 @@ Two policies enable to choose the way custom types are derived:
104
104
105
105
Case classes, traits and their children are recursively derived by Magnolia.
106
106
107
-
Importing `sttp.tapir.generic.auto._` enables fully automatic derivation for `Schema`:
107
+
Importing `sttp.tapir.generic.auto._`(or extending the `SchemaDerivation` trait) enables fully automatic derivation for `Schema`:
108
108
109
109
```scala
110
110
importsttp.tapir.Schema
@@ -120,6 +120,8 @@ implicitly[Schema[Parent]]
120
120
If you have a case class which contains some non-standard types (other than strings, number, other case classes,
121
121
collections), you only need to provide schemas for them. Using these, the rest will be derived automatically.
122
122
123
+
Note that when using [datatypes integrations](integrations.md), respective codecs must also be imported to enable the derivation, e.g. for [newtype](integrations.md#newtype-integration) you'll have to add `import sttp.tapir.codec.newtype._` or extend `TapirCodecNewType`.
124
+
123
125
### Semi-automatic derivation
124
126
125
127
Semi-automatic derivation can be done using `Schema.derived[T]`.
Then, `import sttp.tapir.codec.newtype`, or extends the `sttp.tapir.codec.enumeratum.TapirCodecNewType` trait to bring the implicit values into scope.
84
+
Then, `import sttp.tapir.codec.newtype._`, or extend the `sttp.tapir.codec.enumeratum.TapirCodecNewType` trait to bring the implicit values into scope.
85
85
86
86
## Derevo integration
87
87
@@ -90,7 +90,7 @@ For details refer to [derevo documentation](https://github.com/tofu-tf/derevo#in
0 commit comments