Comments (3)
@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.
@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.
Closed via #50
from avrora.
Related Issues (20)
- Empty user-agent in header when calling registry
- schema evolution support HOT 7
- hook to skip certain fields. HOT 2
- Fix warnings introduced in elixir 1.15 HOT 2
- logicalType: date HOT 5
- Allow mix task to accept a Client to be used for registration
- Drop unnecessary configuration options
- Remove plain format from decode/2 and encode/2
- Warnings on compilation HOT 4
- Maintain a CHANGELOG? HOT 5
- Dialyzer issues with private clients HOT 2
- "Messages encoded with OCF are wrapped in a List" what for? HOT 1
- Allow 3 named types to be used as root schemas
- Get schema name on decode HOT 3
- Add deprecation warning for encode with plain format
- Private clients hardcode schemas path at compile time HOT 6
- Any way to configure the registry_url at startup? HOT 8
- Option for decoding with tagged union values HOT 7
- unnamed_type error with primary type schema HOT 11
- Add option to enable SSL verification of registry requests
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from avrora.