Interface IJsonSchemaTransformer


public interface IJsonSchemaTransformer
A transformer that applies a series of transformation steps to a JSON schema. Create instances via IPromptJsonSchemaService.transformJsonSchema().
Since:
8.5.0
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    transform(Reader reader)
    Applies all configured transformation steps to the JSON schema read from the given reader, and returns the transformed JSON schema as a string.
    transform(String schema)
    Applies all configured transformation steps to the given JSON schema, and returns the transformed JSON schema as a string.
  • Method Details

    • transform

      String transform(Reader reader) throws JsonSchemaServiceException
      Applies all configured transformation steps to the JSON schema read from the given reader, and returns the transformed JSON schema as a string.
      Parameters:
      reader - The reader to read the JSON schema from.
      Returns:
      The transformed JSON schema as a string.
      Throws:
      JsonSchemaServiceException - If an error occurs during reading or transformation.
    • transform

      String transform(String schema) throws JsonSchemaServiceException
      Applies all configured transformation steps to the given JSON schema, and returns the transformed JSON schema as a string.
      Parameters:
      schema - THe JSON schema to transform.
      Returns:
      The transformed JSON schema as a string.
      Throws:
      JsonSchemaServiceException - If an error occurs during reading or transformation.