Git Product home page Git Product logo

Comments (12)

Strech avatar Strech commented on June 6, 2024

@fxn Hey, sorry for a long pause, got a bit sick. I might know what you mean. A type lookup over different files. I think avro_turf gem even allows you to split one schema into multiple files and assemble them into one for registration in a registry.

Let me try to fix it 🔥

from avrora.

Strech avatar Strech commented on June 6, 2024

Answering question

Is there a way to get that working?

Yes, you need to add schema definition of EventType to Event schema (at least once, better to the most top place of usage)

And may I ask you to post a sample of those maybe without extra fields, to get how you try to use it?

from avrora.

fxn avatar fxn commented on June 6, 2024

Wait, perhaps I am looking for something that doesn't square with Avro.

If you embed the type definition as you do in this fixture for io.confluent.Message, but in a different type you also have something of type io.confluent.Message, you have to duplicate the type definition there?

from avrora.

fxn avatar fxn commented on June 6, 2024

Guess I was using that feature in avro_turf without even noticing :).

from avrora.

Strech avatar Strech commented on June 6, 2024

@fxn Exactly, it works magically behind the scenes in avro_turf. I was postponing this feature till the last, but now I have an additional reason to work on it 😜

from avrora.

Strech avatar Strech commented on June 6, 2024

@fxn Good news, I manage to have a working draft, but with some differences from avro_turf end-result (compiled schema is more standardized than in ruby). I hope to publish something you can try in the closest weekends ✌️

from avrora.

fxn avatar fxn commented on June 6, 2024

That's awesome ❤️.

from avrora.

Strech avatar Strech commented on June 6, 2024

@fxn Hey, it took me a while (a bit of family travelling 🌴), but here you can check not fully finished (few optimizations are missing) inter-schema refefences feature #18

The not-so-optimal part is a N-read of the reference if it's reused in different schemas (so IO on a first read) but rest should work. Can you try it and give feedback?

Only one important thing – reference should be a full name = namespace + name, i.e

{
  "namespace": "io.confluent",
  "type": "record",
  "name": "Messenger",
  "fields": [
    {
      "name": "messages",
      "type": {
        "type": "array",
        "items": "io.confluent.Message" // <--- full name reference (namespace + name)
      }
    }
  ]
}

from avrora.

Strech avatar Strech commented on June 6, 2024

Hola @fxn, a new release with inter-schema references (now complete version) was published https://github.com/Strech/avrora/releases/tag/v0.8.0

Any feedback appreciated! Happy coding ❤️

from avrora.

fxn avatar fxn commented on June 6, 2024

Sorry for not responding earlier, thanks a lot for working on this, I'll run some tests and wil write back!

from avrora.

fxn avatar fxn commented on June 6, 2024

Modulus Christmas break, I have been using 0.8.0 since it was released without any issues. Have checked some cross-references to records and enums.

Thanks for working on this ❤️.

from avrora.

Strech avatar Strech commented on June 6, 2024

@fxn Woohooo, great news 😂

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.