Skip to content
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

Capture the name of the record or enum inside the schema #241

Closed
sviezypan opened this issue Apr 20, 2022 · 1 comment
Closed

Capture the name of the record or enum inside the schema #241

sviezypan opened this issue Apr 20, 2022 · 1 comment

Comments

@sviezypan
Copy link
Contributor

The same as Field[A] have a label, record and enums could have a name, so in the following example getName method would be able to return "Person" String with the help of Schema

case class Person(name: String, age:Int)
def getName[A](implicit i: Schema[A]) : String = ???

assertTrue(getName[Person] == "Person")
jdegoes pushed a commit that referenced this issue Aug 10, 2022
* capture the name of the record inside record schema

* captured singleton name of enum inside prism

* added type id to enumerations

* self review

* 2.13 compilation fix

* 2.13 compilation fix

* formatting

* stack overflow fix

* formatting

* implementation for scala 3

* 2.12 fix compilation of singleton types

* format

* fixed avro codec naming

* fmt
@sviezypan
Copy link
Contributor Author

Done in #246

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant