For type safety, it would be nice not to use raw strings for the content types in 'consumes' and 'produces'.
Likewise, schemes could be strongly typed too.
For type safety, it would be nice not to use raw strings for the content types in 'consumes' and 'produces'.
Likewise, schemes could be strongly typed too.
Thanks for the quick response. I haven't had too much trouble with IntelliJ and its autocomplete for ContentTypes. I have the latest Community Edition and just recently refactored a fair amount of akka-http code. Great project btw. I maintain the swagger-akka-http project but I do like your approach.
Cheers, appreciate the feedback. I will have a play around using the Akka-Http media types in place of Strings. If I don't commit anything immediately it's because I am letting feedback filter in after I did a v0.5 release yesterday.
Yes, I take your point. The reason I originally used strings comes from my frustration at intellij's refusal to auto-complete the Akka-Http media types (
application-jsonetc). I did not want swakka's users to face similar pain. Maybe there is an approach that retains type safety and keeps intellij ticking over.