Draft
Conversation
e569fd4 to
fe58fab
Compare
Strech
commented
Apr 26, 2024
| assert encoded == "59B02128" | ||
| end | ||
|
|
||
| test "when payload is matching the Union schema and schema is resolvable" do |
9eba871 to
a07dd77
Compare
a07dd77 to
ca7842c
Compare
Strech
commented
Jul 16, 2024
lib/avrora/schema/encoder.ex
Outdated
| """ | ||
| @spec reference_lookup(String.t()) :: {:ok, String.t()} | {:error, term()} | ||
| def reference_lookup(_), do: {:ok, ~s({})} | ||
| @spec reference_lookup(String.t()) :: {:error, term()} |
Owner
Author
There was a problem hiding this comment.
This spec is not complete!
ca7842c to
5c884cb
Compare
5c884cb to
b7e2619
Compare
b7e2619 to
7340ef8
Compare
Strech
commented
Jul 31, 2024
| alias Avrora.Schema.ReferenceCollector | ||
|
|
||
| @type reference_lookup_fun :: (String.t() -> {:ok, String.t()} | {:error, term()}) | ||
| @undefined_name :undefined |
Strech
commented
Jul 31, 2024
| do: SchemaEncoder.from_json(body, &read_schema_file_by_name/1) | ||
| with {:ok, schema_name} <- Name.parse(key), | ||
| {:ok, body} <- read_schema_file_by_name(key) do | ||
| SchemaEncoder.from_json(body, name: schema_name.name, reference_lookup_fun: &read_schema_file_by_name/1) |
Owner
Author
There was a problem hiding this comment.
We need a refactoring here, nested calls generate too much lookup table. Considering unnamed types, we need to overhaul how we store lookup tables and how we work with them.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #95
This PR will add support for unnamed types. All codecs are going to support it. The only new limitation comes from Registry storage.
To "name" an unnamed type, we need its subject name and to get it we send a request to endpoint
/schemas/ids/{id}/versionswhich exists only starting Confluent Schema Registry version5.5.0.TODO
io.confluentnamespace withio.acmeconfluentnaming update into mainRegistraralso works