Interface WithExampleSchema<T>

Type Parameters:
T - The type of the example.
All Known Implementing Classes:
CrestAnySchema, CrestArraySchema, CrestBooleanSchema, CrestObjectSchema

public interface WithExampleSchema<T>
Extension for CREST and OpenAPI schemas to express an example value.
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets example JSON Schema field.
    void
    setExample(String example)
    Sets example JSON Schema field.
  • Method Details

    • getExample

      T getExample()
      Gets example JSON Schema field.
      Returns:
      The example value, or null if not defined.
    • setExample

      void setExample(String example) throws IOException
      Sets example JSON Schema field.
      Parameters:
      example - The example value.
      Throws:
      IOException - When the type of schema cannot be parsed from the String value.