Git Product home page Git Product logo

Comments (3)

Strech avatar Strech commented on May 26, 2024

@FrancescoPessina Hey, thanks for bringing it up. In short – Avrora supports Inter-Schema references, so you can refer to nested schemas.

In case when a writer has local schema files it should be possible to find it. And in the case when a reader gets the schema the nested one should be present inside the top-level schema.

I didn't read how does that new CSR functionality work yet.

As I understand the issue happens when you receive a message encoded with a schema containing the reference, which schema is not present in the message schema, right?

from avrora.

FrancescoPessina avatar FrancescoPessina commented on May 26, 2024

@Strech Hello and thanks for your response.

The new CSR functionality enables the "reference" from an Avro schema to another, without "copying" it entirely into the schema.
Now CSR, when a schema with references is requested via API, returns a json like this:

{
    "subject": "org.schema_registry_test_app.avro.AvroTest",
    "version": 1,
    "id": 20,
    "references": [
        {
            "name": "org.schema_registry_test_app.avro.Result",
            "subject": "org.schema_registry_test_app.avro.Result",
            "version": 1
        }
    ],
    "schema": "{
  \"namespace\": \"org.schema_registry_test_app.avro\",
  \"type\": \"record\",
  \"name\": \"AvroTest\",
  \"fields\": [
    {
      \"name\": \"id\",
      \"type\": {
        \"name\": \"Uuid\",
        \"type\": \"fixed\",
        \"size\": 16
      }
    },
    {
      \"name\": \"results\",
      \"type\": {
        \"type\": \"array\",
        \"items\": \"org.schema_registry_test_app.avro.Result\"
      }
    }
  ]
}"
}

So when Avrora finds the items with type org.schema_registry_test_app.avro.Result fails because is not a recognized type.

I pushed a PR which solves this, pulling the reference schema from CSR and inserting it into the parent schema json.
I'm a newbie with Elixir and this is my very first contribution, so I may have made some mistakes, sorry for that.
Looking at the PR I think you could also understand better the problem and how I solved it :)

from avrora.

Strech avatar Strech commented on May 26, 2024

Closed via #50

from avrora.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.