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
However from your code snippet, I assume you are using Kotlin.
If that is the case, you are most likely affected by the same curious Kotlin behaviour as described on #358
If you annotate a field just with:
@NotNull
val field:String
The compiled Java code (that is being analysed by this jsonschema-generator library here), will treat the annotation as being present in a different place.
Instead, you would have to add an explicit prefix to indicate where the annotation shall be added in the compiled Java code, e.g.
@field:NotNull
val field:String
I would expect your configuration to work as expected then.
Hey! Wondering if it's possible to generate a schema with 'required' attribute like in the following output:
If so, what option/setting should I use?
I was trying to do so by using
withRequiredCheck
(even added NotNull JetBrains annotations:)), but no luck:The text was updated successfully, but these errors were encountered: