-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Swagger schema #10
Swagger schema #10
Conversation
case AvroSchema.TFixed(_, _, _, _) => | ||
case AvroF.TEnum(name, _, _, _, symbols) => TSum(name, symbols) | ||
case AvroF.TUnion(options) => TCoproduct(options) | ||
case AvroF.TFixed(_, _, _, _) => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The documentation on the fixed
in the Avro docs is sparse. However, if it is intended to represent byte arrays, then scodec offers support for that. On the other hand, the refined allows restricting the length of a string. However, I would be wary of bringing too many libraries.
In any case, if we do not support them, we should add a more explicit message or exception, saying that skeuomorph
library does not have support for Avro fixed types.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My initial idea was to drop Fixed from our ADT, but using refined seems interesting. I kinda discard scodec because one can't use fixed length BitVectors/ByteVectors there, right?
I'll create an issue to remind me to implement fixed usign refined using Array[Byte] Refined MaxSize[N]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great stuff 👌
This PR:
droste.contrib
file with stuff that potentially can be backported to droste