json-schema-serialization icon indicating copy to clipboard operation
json-schema-serialization copied to clipboard

small fixes

Open NikkyAI opened this issue 4 years ago • 0 comments

with additionalProperties = false properties that do not belong into the class are recognized as errors

passing annotations from lists into its elements allows things like

  @StringEnum(["a", "b", "c"])
  val list: List<String> = listOf()

to works correctly

for maps it seems like there is some ways to pattern the keys in a object but it would need some workarounds (and annotations are a pain)

so i decided to just ally them to the values

having Description, Definition and NoDefinition on the collection and its elements might be a small issue however so i filtered them out for example having Definition on there would lead to self reference and recursion iu am not sure this is enough safeguarding yet

and i did not feel like duplicating all annotations for targeting collection values (also doubly nested collections and distinguishing thing there)

too bad GENERIC_TYPE annotation target is still WIP

NikkyAI avatar Nov 22 '20 12:11 NikkyAI