--
You received this message because you are subscribed to the Google Groups "Play Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to play-framework+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/play-framework/c817f4f9-1d00-4f48-ba7e-759190d4b393%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hi,It's a great initiative to provide a basic REST sample.I would like to make you some feedback to improve the sample:- You should follow the official scala style guide.
- I doesn't know any REST API that works with form-urlencoded to post data (OK, actually I know some one...). But JSON is much a much more common and "modern" use case.
- Sometimes you use "logger.isTraceEnabled())", sometimes no. Lightbend has a good lib for that: https://github.com/typesafehub/scala-logging ;)
- The Singleton is defined two times for PostRepository (module and implem)
- Your RequestHandler seems very tied to a specific use case, common REST API doesn't need that.
- I know this is controversial, but compile time DI is really easy to use with this use case, no reason to depends on runtime DI
Starting with Play for a REST API, what I'd like is a guide for Java as well, and covering Json Binding, Error Handling, Bean Validation and Swagger.I also wonder about binding using the Form class. That one seems to be intended to be used for HTML forms, so using it for mere http data binding looks like abuse.
--
You received this message because you are subscribed to the Google Groups "Play Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to play-framework+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/play-framework/4010f2ce-bba7-4983-ba46-8c6aad8e760a%40googlegroups.com.
I think there's a couple of different Swagger modules, and that's not core Play functionality, but a module you add on top.
On Wed, Mar 29, 2017 at 10:06 AM, Will Sargent <will.s...@lightbend.com> wrote:
On Tue, Mar 28, 2017 at 5:04 PM, 'Thibault Kruse' via Play Framework <play-fr...@googlegroups.com> wrote:
Starting with Play for a REST API, what I'd like is a guide for Java as well, and covering Json Binding, Error Handling, Bean Validation and Swagger.I also wonder about binding using the Form class. That one seems to be intended to be used for HTML forms, so using it for mere http data binding looks like abuse.
--
You received this message because you are subscribed to the Google Groups "Play Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to play-framewor...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to play-framework+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/play-framework/f6af82cf-fa49-4fab-a0a2-fa56cb03c0e3%40googlegroups.com.