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
Note: I'm not completely sure if in general this is a valid use-case for encodedName, because in Tapir-documentation it's only mentioned as an annotation for class-fields, but it does not say anything about classes themselves.
Describe the bug
When annotating a sealed trait with encodedName - the encoded name is applied to both the parent trait and all it's sub-types, unless they have their own encodedName.
As you can see in the example below - the trait has 3 sub-types Foo/Bar/Baz.
The root type and one of sub-types are annotated with custom encoded name.
The resulting derived schema has correct encoded names for MyType and Foo, however Bar and Baz are both named as their parent "CustomMyType", which probably also resulted in replacing Bar with Baz in the list of subtypes.
Tapir version: 1.9.5
Scala version: 2.13
Note: I'm not completely sure if in general this is a valid use-case for
encodedName
, because in Tapir-documentation it's only mentioned as an annotation for class-fields, but it does not say anything about classes themselves.Describe the bug
When annotating a sealed trait with
encodedName
- the encoded name is applied to both the parent trait and all it's sub-types, unless they have their ownencodedName
.As you can see in the example below - the trait has 3 sub-types Foo/Bar/Baz.
The root type and one of sub-types are annotated with custom encoded name.
The resulting derived schema has correct encoded names for
MyType
andFoo
, howeverBar
andBaz
are both named as their parent "CustomMyType", which probably also resulted in replacingBar
withBaz
in the list of subtypes.How to reproduce?
The text was updated successfully, but these errors were encountered: