Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support resolving annotations for Kotlin's properties #55

Open
komu opened this issue Sep 25, 2019 · 0 comments
Open

Support resolving annotations for Kotlin's properties #55

komu opened this issue Sep 25, 2019 · 0 comments

Comments

@komu
Copy link
Member

komu commented Sep 25, 2019

When an annotation is directly specified for a property defined in Kotlin constructor, Apina does not find it. For example:

class Foo(val bar: String, @JsonIgnore val baz: String)

as a workaround, one can force the annotation for the getter:

class Foo(val bar: String, @get:JsonIgnore val baz: String)

Jackson itself supports the first form, and Apina should do support that as well. It's somewhat unclear where the annotation ends up in the bytecode and how it can be associated with the property, but it probably involves parsing Kotlin's own class metadata with kotlinx-metadata-jvm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant