-
Notifications
You must be signed in to change notification settings - Fork 450
Open
Milestone
Description
Tapir version: 0.18.0-M4
Scala version: 2.12.13
Describe the bug
Schema derived for parametrized case classes is always fixed to a random parameter
How to reproduce?
final case class Items[A](items: List[A], total: Int)
object Items {
implicit def schema[A: Schema]: Schema[Items[A]] = Schema.derived[Items[A]]
implicit def validator[A: Schema]: Validator[Items[A]] = schema.validator
}
Results in the following openapi spec:
Items_A:
required:
- total
type: object
properties:
items:
type: array
items:
$ref: '#/components/schemas/TransactionInfo'
total:
type: integer
And then Items_A
is referenced not only where Items[TransactionInfo]
is used but everywhere Items[X]
appears.
Additional information
PawelJ-PL and AvaPL
Metadata
Metadata
Assignees
Labels
No labels