Giter Club home page Giter Club logo

Comments (7)

ImFlog avatar ImFlog commented on June 24, 2024

Hello,
Thank you for using the plugin.

Can you elaborate on what's in the original subject and what's in the local subject (redacted) ? In the example it is referenced twice (as output and as reference) :
subject('ccc.SomeItem', 'src/main/avro/SomeItem.avsc', 'AVRO').addLocalReference('SomeItem', 'src/main/avro/SomeItem.avsc')
It would help me reproduce and then fix.
Thank you.

from schema-registry-plugin.

emmeblm avatar emmeblm commented on June 24, 2024

Hi,

I am getting the exact same error on version 1.9.0.

Here's an example of my setup:

subject("com.example.some.task.tasks-value",
        "src/main/avro/task.avsc",
        "AVRO")
.addLocalReference("Recurrence", 
                   "src/main/avro/recurrence.avsc")

from schema-registry-plugin.

ImFlog avatar ImFlog commented on June 24, 2024

@emmeblm, is your localReference used twice in "task.avsc" ?
If so I think this is the same issue as #130. I am fairly close to solve the issue right now but you can stick to 1.8.0 for now.

Sorry for the long response I thought that I had sent this message 😅

from schema-registry-plugin.

emmeblm avatar emmeblm commented on June 24, 2024

Hello!
Sorry for the very late reply.
Sadly no. My local reference is only used once. Here's how they look in essence:

task.avsc

{
  "type": "record",
  "name": "Task",
  "namespace": "com.org.my.custom.task.model",
  "doc": "Some doc",
  "fields": [
    {
      "name": "id",
      "doc": "Some doc",
      "type": "string"
    },
    {
      "name": "version",
      "type": "int"
    },
    {
      "name": "aField",
      "doc": "Some doc",
      "type": "string"
    },
    {
      "name": "anotherField",
      "doc": "Some doc",
      "type": "string"
    },
    {
      "name": "recurrence",
      "doc": "Some doc",
      "type": "com.org.my.custom.task.model.Recurrence"
    },
    {
      "name": "arrayField",
      "doc": "Some doc",
      "type": {
        "type": "array",
        "items": "string"
      }
    },
    {
      "name": "someOtherField",
      "doc": "Some doc",
      "type": "string"
    }
  ]
}

recurrence.avsc

{
  "type": "record",
  "name": "Recurrence",
  "namespace": "com.org.my.custom.task.model",
  "doc": "Some doc",
  "fields": [
    {
      "name": "aField",
      "doc": "Some doc",
      "type": "string"
    },
    {
      "name": "anotherField",
      "doc": "Some doc",
      "type": [
        "null",
        "int"
      ],
      "default": null
    },
    {
      "name": "yetAnotherField",
      "doc": "Some doc",
      "type": "string"
    },
    {
      "name": "yetYetAnotherField",
      "doc": "Some doc",
      "type": [
        "null",
        "string"
      ],
      "default": null
    }
  ]
}

Hope this helps troubleshoot the issue!

from schema-registry-plugin.

ImFlog avatar ImFlog commented on June 24, 2024

Hello @martinformi and @emmeblm. I've just released the version 1.11.1. Can you try with this version to see if the issue was related ?
NB: It requires to add Jitpack in the build repository (see README) because we are now using a custom Avro version to allow us to handle correctly local + remote dependency mixing in Avro.
Thanks

from schema-registry-plugin.

emmeblm avatar emmeblm commented on June 24, 2024

Hi @ImFlog

Version 1.11.1 seems to have solved the issue for me. Thanks!

from schema-registry-plugin.

ImFlog avatar ImFlog commented on June 24, 2024

I'm closing this then, if anything still fail for you @martinformi do not hesitate to reopen an issue.

from schema-registry-plugin.

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.