Apicurio Registry - AVRO ref not working #4135
-
Hello, I am using apicurio/apicurio-registry-mem: latest release for understanding functionality of apicurio-registry. The AVRO schema which is referencing other schema is not uploading. Following are the sample AVRO schema files, uploaded in registry in the order listed below: Customer:
Pizza Item
I am trying to upload following schema which references above 2 schemas:
I get following error: schemaParseException: "com.pizza.model.Customer" is not a defined name. The type of the "customer" field must be a defined name or a {"type": ...} expression. Not sure how to resolve this error. I have made sure all the schemas which are referenced are already uploaded in the registry. Thanks for helping in advance. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
The Registry does support references from one Avro schema to other schemas, and you've got one part of it right (by making sure the What does this mean? It means that when you register Documentation on this can be found here: |
Beta Was this translation helpful? Give feedback.
The Registry does support references from one Avro schema to other schemas, and you've got one part of it right (by making sure the
Customer
andPizzaItem
schemas are already uploaded). But the missing bit is that when you register thePizzaOrder
schema you need to provide mappings to the references it includes.What does this mean? It means that when you register
PizzaOrder
you need to tell Registry wherecom.pizza.model.PizzaItem
exists and wherecom.pizza.model.Customer
exists. You do this by providing mappings from those names to coordinates in the Registry (groupId, artifactId, version).Documentation on this can be found here:
https://www.apicur.io/registry/docs/apicurio-registry/2.…