Annotation Type SchemaSwap

    • Required Element Summary

      Required Elements 
      Modifier and Type Required Element Description
      String fieldName
      Name of the field whose type is to be replaced.
      Class<?> originalType
      The owning class of the field whose type is to be replaced.
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      int depth
      For fields that may include a reference cycle, how many expansions to include in the output before including the targetType()
      Class<?> targetType
      The replacement schema that will be used for the fieldName() instead of its specified type
    • Element Detail

      • originalType

        Class<?> originalType
        The owning class of the field whose type is to be replaced.

        It is an error if the type is not used in the same schema hierarchy where the SchemaSwap is used.

      • fieldName

        String fieldName
        Name of the field whose type is to be replaced.

        The name should be specified exactly as defined in the Java class, before any renames and transformations (@JsonProperty and similar) take place.

        It is an error if the field does not exist on originalType()

      • targetType

        Class<?> targetType
        The replacement schema that will be used for the fieldName() instead of its specified type

        The default value of void.class causes the field to be skipped

        Default:
        void.class
      • depth

        int depth
        For fields that may include a reference cycle, how many expansions to include in the output before including the targetType()

        The default value of 0 replaces the field with the targetType() without any expansion

        Default:
        0