Skip to content

Latest commit

 

History

History
27 lines (22 loc) · 1.2 KB

README.md

File metadata and controls

27 lines (22 loc) · 1.2 KB

Newtypes Tapir Example

The goal of this project is to showcase how we can use newtypes with tapir to:

  • Improve our domain model reasoning
  • Enhance type descriptions
  • Add a basic implementation of validation rules
  • Reference field types to external documentation

The used dependencies are monix/newtypes, tapir, http4s, cats, cats-effect & circe.

To run the project just do sbt run. You should see:

INFO  yyyy-MM-ddTHH:mm:ss.SSSZ o.h.b.c.n.NIO1SocketServerGroup - Service bound to address /127.0.0.1:9001 
INFO  yyyy-MM-ddTHH:mm:ss.SSSZ o.h.b.s.BlazeServerBuilder - http4s v0.23.6 on blaze v0.15.2 started at http://127.0.0.1:9001/ 
INFO  yyyy-MM-ddTHH:mm:ss.SSSZ busymachines.Main - Swagger at http://localhost:9001/api/public/swagger 
INFO  yyyy-MM-ddTHH:mm:ss.SSSZ busymachines.Main - Redoc at http://localhost:9001/api/public/redoc  

You can now check the documentation at localhost:9001/api/public/docs/index.html.