private JsonNode populateMethodSchema(MethodScope method) {
        List<ResolvedType> typeOverrides = this.generatorConfig.resolveTargetTypeOverrides(method);
        if (typeOverrides == null && !method.isVoid()) {
            typeOverrides = this.generatorConfig.resolveSubtypes(method.getType(), this);
        }
        List<MethodScope> methodOptions;
        if (Util.isNullOrEmpty(typeOverrides)) {
            methodOptions = Collections.singletonList(method);
        } else {
            methodOptions = typeOverrides.stream()
                    .map(method::withOverriddenType)
                    .collect(Collectors.toList());
        }
        // consider declared type (instead of overridden one) for determining null-ability
        boolean isNullable = method.isVoid()
                || (!method.isFakeContainerItemScope() || this.generatorConfig.shouldAllowNullableArrayItems())
                && this.generatorConfig.isNullable(method);
        if (methodOptions.size() == 1) {
            return this.createMethodSchema(new MemberDetails<>(methodOptions.get(0), isNullable, false, null));
        }
        return this.createMemberSchemaWithMultipleOptions(methodOptions, isNullable, this::createMethodSchema);
    }
Preparation Step: create a node for a schema representing the given method's associated return type.

@param method method to populate the schema node for
@return schema node representing the given method's return type
jsonschema-generator/src/main/java/com/github/victools/jsonschema/generator/impl/SchemaGenerationContextImpl.java