Skip to content

Sample project using Play Framework + Tapir

License

Notifications You must be signed in to change notification settings

gaeljw/tapir-play-sample

Repository files navigation

tapir-play-sample

Sample project using Play Framework + Tapir (including OpenAPI documentation).

Contributions are welcomed! If you find this project useful but think it could contain more useful examples (and it sure could ;)), please open an issue or a pull request.

Note: consider this project as a showcase. You can structure things differently for a real-life project.

📖 Guided tour

For a guided tour of how to use Tapir with Play Framework, you can read the following article: https://medium.com/@gaeljw/using-tapir-in-a-play-framework-application-d75a93d85030

🚀 Try it!

sbt run

And go to http://localhost:9000/docs/.

✅ Content

  • Basic endpoints with shared logic, see BookEndpoints
    • Reading input body
    • Reading input authentication headers and shared authentication logic
    • Sending output body and errors
    • Streaming request/response
      • With multiple formats for output and supporting complex Accept headers
  • Swagger Documentation, see ApiDocumentation

📜 Changelog

See here.