Comments (1)
I tried a bit to update the plugin but it's pretty hard to maintain as I cannot cleanly add a new piece of code without being impacted by the changes in Avro code.
So I got a new idea 💡
We could treat the schema as a string and not as a Json Schema object. And thus:
- Search for local reference names in the schema (in reverse, starting with the top level references)
- For each one, replace by the content of the local reference schema
⚠️ Do we need to do some kind of check before replacing ? For instance that it's atype
or anarray
?
-> Probably because else we could also replacename
values for instance
💡 We could use a regexp to find the local reference and then check if it's atype
or anarray
or anunion
? => Might be hard if everything is on the same line
-> This is only 3 cases, we can find 3 regexp that match. Maybe we can prettify the schema before to make it easier to find the local reference. - If the local reference is not found, we could throw an error
- Then classic schema registry parsing
Need to POC this to see if it works. What's cool is that we already have the tests written so it's pretty simple to try.
from schema-registry-plugin.
Related Issues (20)
- JSON local reference HOT 4
- Support for attaching @Nullable annotation on nullable fields HOT 2
- SchemaParseException during testSchemasTask HOT 2
- Dependency "com.github.ImFlog.avro:avro:1.11.2" not resolvable HOT 1
- Fat jar all the thing ? HOT 1
- Support Gradle 8.X.X
- DownloadTask should download all referenced schemas HOT 7
- Ability to toggle pretty-print of outputted schema files for Avro/JSON formats HOT 6
- NoSuchMethodError with openapi generator since 1.12.0 HOT 12
- Support for IDL language(`.avdl`) HOT 1
- Issues registering schema via gradle 8.2.1 HOT 3
- Recursively download schema references
- Configure registry client with a map HOT 2
- Does the "name" argument to "addReference" and "addLocalReference" do anything when using Avro schemas? HOT 2
- Add new Kafka versions to the test matrix in Github Action
- Support for AVDL HOT 1
- Support custom root dir for Protobuf local references
- downloadSchemasTask is always executed even when inputs don't change HOT 2
- Unable to reuse subjects HOT 1
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 schema-registry-plugin.