@Override
    public ObjectNode generateSchema() {
        SchemaGeneratorConfigBuilder configBuilder = new SchemaGeneratorConfigBuilder(SchemaVersion.DRAFT_2019_09, OptionPreset.PLAIN_JSON)
                .with(new JakartaValidationModule());
        SchemaGeneratorConfig config = configBuilder.build();
        // jakarta (and javax) validation constraints annotations are always inherited (INCLUDE_AND_INHERIT)
        // there are overrides being applied through the modules (INCLUDE_AND_INHERIT_IF_INHERITED)
        return new SchemaGenerator(config).generateSchema(Book.class);
    }
Example created in response to <a href="https://github.com/victools/jsonschema-generator/discussions/333">#333</a>.
<br>
Adapted after inheritance is supported out-of-the-box.
jsonschema-examples/src/main/java/com/github/victools/jsonschema/examples/AnnotationInheritanceExample.java