Class TitleSchemaFactoryWrapper

  • All Implemented Interfaces:
    com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitorWithSerializerProvider, com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitorWrapper, Visitor

    public class TitleSchemaFactoryWrapper
    extends SchemaFactoryWrapper
    Adds a title to every object schema, either root level or nested. Generally useful for writing additional properties to a schema.
    • Constructor Detail

      • TitleSchemaFactoryWrapper

        public TitleSchemaFactoryWrapper()
    • Method Detail

      • expectObjectFormat

        public com.fasterxml.jackson.databind.jsonFormatVisitors.JsonObjectFormatVisitor expectObjectFormat​(com.fasterxml.jackson.databind.JavaType convertedType)
        Specified by:
        expectObjectFormat in interface com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitorWrapper
        Overrides:
        expectObjectFormat in class SchemaFactoryWrapper
      • expectArrayFormat

        public com.fasterxml.jackson.databind.jsonFormatVisitors.JsonArrayFormatVisitor expectArrayFormat​(com.fasterxml.jackson.databind.JavaType convertedType)
        Specified by:
        expectArrayFormat in interface com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitorWrapper
        Overrides:
        expectArrayFormat in class SchemaFactoryWrapper
      • addTitle

        private void addTitle​(JsonSchema schema,
                              com.fasterxml.jackson.databind.JavaType type)
        Adds writes the type as the title of the schema.
        Parameters:
        schema - The schema who's title to set.
        type - The type of the object represented by the schema.