Comments (11)
Hi @adjivas ππΌ
Initially Avrora was designed to work with Record
schemas which allows you to have nested schemas of complex types. But there was no reason to register a primary type (also can't find that definition in Avro specs) yet.
Probably that type can be registered as a part of another Record
schema.
from avrora.
Hi @Strech, sorry for the late reply.
There you can found a official list and a documented example of Primitive Types from the Avro specs:
{"type": "string"}
Primitive Types exists to the side of Complex Types.
from avrora.
Sorry for a long pause, I will take a look @adjivas and drop a message of what we can do about it
from avrora.
I've re-read the documentation (also check the erlavro
source code). And the specification says https://avro.apache.org/docs/1.11.1/specification/#primitive-types
Primitive types have no specified attributes.
Primitive type names are also defined type names. Thus, for example, the schema βstringβ is equivalent to:{"type": "string"}
Then I checked the erlavro and their parsing mechanism
iex(1)> :avro_json_decoder.decode_schema(~s({"type":"string","name":"MyString"}), allow_bad_references: true)
{:avro_primitive_type, "string", []}
And the result is exactly as stated in the specification, primitive types can't have any attributes thus I don't see any in the output.
Here is another answer on that topic: https://stackoverflow.com/questions/66210730/aliases-for-primitive-types-in-avro
TL;DR You can't reference primitive type by alias (our new name perse)
If you have further question, feel free to drop them here
from avrora.
Related Issues (20)
- Empty user-agent in header when calling registry
- Support for registering schemas under custom subject HOT 8
- Avrora.Storage.File.get/1 rise argument error exception instead of a result HOT 1
- Rewrite schema registration mix task with new functionality
- Rework Mix task section
- 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
- 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.