Interface SchemaParser<S,​U>


  • public interface SchemaParser<S,​U>
    Author:
    Fabian Martinez
    • Method Detail

      • artifactType

        io.apicurio.registry.types.ArtifactType artifactType()
      • parseSchema

        S parseSchema​(byte[] rawSchema)
      • getSchemaFromData

        ParsedSchema<S> getSchemaFromData​(Record<U> data)
        In some artifact types, such as AVRO, it is possible to extract the schema from the java object. But this can be easily extended to other formats by using a custom Record implementation that adds additional fields that allows to build a ParsedSchema
        Parameters:
        data -
        Returns:
        the ParsedSchema, containing both the raw schema (bytes) and the parsed schema. Can be null.
      • supportsExtractSchemaFromData

        default boolean supportsExtractSchemaFromData()
        Flag that indicates if getSchemaFromData(Record) is implemented or not.