Avrora.Utils.Registrar.register_schema

You're seeing just the function register_schema, go back to Avrora.Utils.Registrar module for more information.
Link to this function

register_schema(schema, opts \\ [])

View Source

Specs

register_schema(Avrora.Schema.t(), as: String.t(), force: boolean()) ::
  {:ok, Avrora.Schema.t()} | {:error, term()}

Register schema in the Schema Registry.

This function relies on a Memory store before taking action. The most complete schema name will be looked at the store, i.e if the schema contains version then full_name + version will be used in prior just a full_name.

Options

  • :as - the name which will be used to register schema (i.e subject).
  • :force - the flag enforcing registration when schema was found in the Memory store (false by default).

Examples

...> {:ok, schema} = Avrora.Resolver.resolve("io.confluent.Payment")
...> {:ok, schema} = Avrora.Utils.Registrar.register_schema(schema, as: "NewName", force: true)
...> schema.full_name
"io.confluent.Payment"