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
Kotlin: Some of my properties are ignored #858
Comments
@Tomucha Hi! I fixed bug with lost properties. About |
Great, thanks! About the underscore ... unfortunately I'm not familiar with inner clockwork of Micronaut, but in general it seems to me, that users' annotation should be "sacred", once there is an explicit annotation, no matter how seemingly rediculous, it MUST be applied as is. I understand that in this specific case I might be forced to place such annotation in my class, but once it's here ... Do you think there is a workaround, or should I just rename it? Underscore here signalizes a "virtual/transient nature" of the property. |
@Tomucha As I wrote in the previous message - this is a bug, a bug in the core, not in this project. I fixed it here micronaut-projects/micronaut-core#8435. But, if you don't want to wait until the changes are released, just rename the field and replace the first character with some letter |
Oh, ok, I didn't know that the core is fixed too. Great, I'll wait, thanks! |
@Tomucha You didn't know about it because no one knew and made a fix a few minutes ago :-))))) You found 2 bugs :-) - in the core and here |
Changed processing logic for inheritance. Fixed #858
Expected Behavior
I have two Kotlin classes, one extends the other.
Resulting openapi scheme should contain all these properties, expect entityType, which is hidden.
Actual Behaviour
But this is the result. property with name starting with underscore is omited, and page and pageSize which are inherited from the parent object are missing too:
I can see that some field:Scheme annotations are applied correctly (
@field:Schema(hidden = true) val entityType: String?
), but some are completely ignored:@field:Schema(name = "_viewDataPath", description = "Určení custom dat ...") val _viewDataPath: Array<String>?,
Steps To Reproduce
I'm trying this with:
<micronaut.version>3.7.4</micronaut.version>
<micronaut.openapi.version>4.7.1</micronaut.openapi.version>
My controller looks like this:
Environment Information
No response
Example Application
No response
Version
3.7.4
The text was updated successfully, but these errors were encountered: