@Override
    public ObjectNode generateSchema() {
        SchemaGeneratorConfigBuilder configBuilder = new SchemaGeneratorConfigBuilder(SchemaVersion.DRAFT_2020_12, OptionPreset.PLAIN_JSON);
        configBuilder.forTypesInGeneral().withTypeAttributeOverride(new SchemaConditionAttributeOverride());
        SchemaGeneratorConfig config = configBuilder.build();
        SchemaGenerator generator = new SchemaGenerator(config);
        return generator.generateSchema(TestType.class);
    }
Example created in response to <a href="https://github.com/victools/jsonschema-generator/discussions/328">#328</a>.
<br/>
Creating "if"/"then"/"else" blocks via custom annotations, leveraging the Swagger @Schema annotation.
jsonschema-examples/src/main/java/com/github/victools/jsonschema/examples/IfThenElseExample.java