Document generation of Akka-HTTP using Swagger


Hello All,

In this blog we are using Swagger to generate document of Akka-HTTP.

For Swagger you can get more information from  Introduction to Swagger .

For Akka you can get more information from Introduction to Akka-Http

You can find complete code here.

build.sbt file of the project contains all dependency.

build

SwaggerDocService.scala

swaggerdoc

AkkaSwagger.Scala

route

Get the Json in response by hitting localhost:8080/api-docs/swagger.json

swaggerjsonresponse

 

You can get the document by pasting json on http://editor.swagger.io/#/

output

Resources

Swagger

Thanks !!!

 

KNOLDUS-advt-sticker

This entry was posted in Akka, akka-http, Scala, Swagger and tagged , , , . Bookmark the permalink.

3 Responses to Document generation of Akka-HTTP using Swagger

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s