public static String generateJsonSchemaForField(String fieldPath, DataType fieldType) {
        var schema = Json.Builder.newObject()
                .set("type", "object");

        var properties = schema.setObject("properties");
        Json.Builder.Object fieldValue;
        
        try {
            fieldValue = generateJsonSchemaForFieldValue(fieldType);
        } catch (IllegalArgumentException e) {
            throw new IllegalArgumentException("Failed to generate schema for field %s of type %s"
                    .formatted(fieldPath, fieldType.getName()), e);
        }
        
        properties.set(fieldPath, fieldValue);

        var required = schema.setArray("required");
        required.add(fieldPath);
        schema.set("additionalProperties", false);

        return schema.build().toJson(true);
    }
Generates JSON schema for a document field based on it's path and data type that corresponds 
to a JSON format {"[fieldPath]": fieldValue} where [fieldPath] is [document type name].[field name].
model-integration/src/main/java/ai/vespa/llm/generation/FieldGeneratorUtils.java