Skip to content

sauldhernandez/sbt-swagger-spraygen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Swagger code generation for Spray

Build Status

Overview

This plugins helps you develop swagger-defined REST services with Spray.

Currently, the plugin only reads the definitions section from the swagger YAML file, and generates case classes and implicit jsonFormats for them.

Compatibility

The plugins was designed to take a file that complies with the Swagger 2.0 spec. If jsonFormat generation is enabled, the generated formats can be used with spray-json 1.3 and up.

Usage

  • Add the plugin in your plugins.sbt:
addSbtPlugin("com.sauldhernandez" % "sbt-swagger-spraygen" % "1.1.2")
  • This plugin is an AutoPlugin, so you must add it to your project in build.sbt:
lazy val root = (project in file(".")).enablePlugins(SpraySwaggerGenPlugin)
  • Add the plugin to your sourceGenerators:
sourceGenerators in Compile <+= spraygen in Compile
  • Modify the plugin settings to fit your needs.

About

SBT Plugin for code generation for Spray

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages