-
Notifications
You must be signed in to change notification settings - Fork 221
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
ADT for Endpoint metadata #581
Comments
Do I understand correctly, that once we have such ADT (abstract data type, right?) we can easily implement Swagger support? |
@ilya-murzinov Yeah I believe we do ADT is about algebraic in this case 😃 |
For reference, Swagger support request is in #73. |
@vkostyukov Hi there The problem I've encountered during meditation about this issue a long time ago is an actual type of metadata. It could be something builded arounded Another way is to make a really simple ADT with underlying What do you think? |
I was thinking about something between the lines: + sealed trait Meta
+
+ object Meta {
+ final case class Method(method: String) extends Meta
+ final case class Path(segment: String) extends Meta
+ final case class Param(name: String) extends Meta
+ final case class Header(name: String) extends Meta
+ case object Body extends Meta
+
+ final case class Coproduct(metas: Seq[Meta])
+ final case class Product(metas: Seq[Meta])
+ final case class Mapped(meta: Meta, output: String)
+ } So we can build this |
I started a branch to implement this a few weeks back (sorry I probably should have mentioned it). I based it on the previous comment Hopefully I'll have some time in the next week or so to follow up on it. The recent changes to endpoint (especially the one that removes I have two outstanding questions as I pick it back up:
Also we've just are going through the whole "we want a self documenting API" thing at work. My coworkers should have some thoughts to share on the subject (especially in terms of incorporating it with Finch), which may or may not help to inform some decisions on #73. |
As discussed on Gitter, it would be great to have some handy ADT which contains endpoint's input/output(?) metadata
https://gitter.im/finagle/finch?at=56faf094e4a8384a1bbd0973
The text was updated successfully, but these errors were encountered: