@Override
        public CustomDefinition provideCustomSchemaDefinition(ResolvedType javaType, SchemaGenerationContext context) {
            if (!javaType.getTypeParameters().isEmpty()) {
                return null;
            }
            SchemaKeyword jsonSchemaTypeValue = SimpleTypeModule.this.fixedJsonSchemaTypes.get(javaType.getErasedType());
            if (jsonSchemaTypeValue == null) {
                return null;
            }
            // create fixed JSON schema definition, containing only the corresponding "type" attribute
            ObjectNode customSchema = context.getGeneratorConfig().createObjectNode();
            if (jsonSchemaTypeValue != SchemaKeyword.TAG_TYPE_NULL) {
                customSchema.put(context.getKeyword(SchemaKeyword.TAG_TYPE), context.getKeyword(jsonSchemaTypeValue));
            }
            if (this.shouldAddFormatTag(javaType, context.getGeneratorConfig())) {
                String formatValue = SimpleTypeModule.this.formatValues.get(javaType.getErasedType());
                if (formatValue != null) {
                    customSchema.put(context.getKeyword(SchemaKeyword.TAG_FORMAT), formatValue);
                }
            }
            return new CustomDefinition(customSchema, CustomDefinition.DefinitionType.INLINE, CustomDefinition.AttributeInclusion.YES);
        }
Implementation of the {@link CustomDefinitionProviderV2} interface for applying fixed schema definitions for simple java types.
jsonschema-generator/src/main/java/com/github/victools/jsonschema/generator/impl/module/SimpleTypeModule.java