Redundant definition splitting with Option.DEFINITIONS_FOR_ALL_OBJECTS #337
-
Hello, I have a similar object model as described in #280 but where each subtype has additional properties which I'd like to be generated with definitions in the schema. When specifying Is there a way to get the desired effect of merging base and super types in the generated schema when Many thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Hi @roded, Can you perhaps provide an example code (representative type + your current configuration) and the desired (and potentially current) outcome? |
Beta Was this translation helpful? Give feedback.
HI @roded,
I finally got around to finalizing the new
JacksonOption.INLINE_TRANSFORMED_SUBTYPES
for this.I've added your example here:
https://github.com/victools/jsonschema-generator/blob/main/jsonschema-examples/src/main/java/com/github/victools/jsonschema/examples/JacksonSubtypeDefinitionExample.java
The output with the new
JacksonOption
looks like this:https://github.com/victools/jsonschema-generator/blob/main/jsonschema-examples/src/test/resources/com/github/victools/jsonschema/examples/JacksonSubtypeDefinitionExample-result.json
It'll be available with the next release then (4.30.0). 😃