private void createSubtypeDefinitionForWrapperObjectTypeInfo(SubtypeDefinitionDetails details) {
        details.getDefinition().put(details.getKeyword(SchemaKeyword.TAG_TYPE), details.getKeyword(SchemaKeyword.TAG_TYPE_OBJECT));
        ObjectNode propertiesNode = details.getDefinition()
                .putObject(details.getKeyword(SchemaKeyword.TAG_PROPERTIES));
        ObjectNode nestedSubtypeSchema = this.createNestedSubtypeSchema(details.getJavaType(), details.getContext());
        if (details.getAttributesToInclude() == null || details.getAttributesToInclude().isEmpty()) {
            propertiesNode.set(details.getTypeIdentifier(), nestedSubtypeSchema);
        } else {
            propertiesNode.putObject(details.getTypeIdentifier())
                    .withArray(details.getKeyword(SchemaKeyword.TAG_ALLOF))
                    .add(nestedSubtypeSchema)
                    .add(details.getAttributesToInclude());
        }
        details.getDefinition().withArray(details.getKeyword(SchemaKeyword.TAG_REQUIRED)).add(details.getTypeIdentifier());
    }
Create the custom schema definition for the given subtype, considering the {@link JsonTypeInfo#include()} setting.

@param scope targeted subtype
@param typeInfoAnnotation annotation for looking up the type identifier and determining the kind of inclusion/serialization
@param subTypesAnnotation annotation specifying the mapping from super to subtypes (potentially including the discriminator values)
@param context generation context
@return created custom definition (or {@code null} if no supported subtype resolution scenario could be detected
jsonschema-module-jackson/src/main/java/com/github/victools/jsonschema/module/jackson/JsonSubTypesResolver.java