aglio-theme-bluecase

Generate Scala case classes from Api-Blueprint specifications


Keywords
scala, aglio, protagonist, case class, code generation, api-blueprint, api
License
MIT
Install
npm install aglio-theme-bluecase@1.0.4

Documentation

Build Status

aglio-theme-bluecase

An Aglio Blueprint Renderer theme to generate Scala case classes from object datastructure entries found in api-blueprint specifications.

Optionally generate spray.io json DefaultJsonProtocol support for case classes with --theme-spray-json true

STATUS

Works for my initial specific apib file. That apib file is moderately complex with several dozen object and array types with some types composed by referencing other types defined in the same apib file. I have not tested bluecase on any apib files in the wild, yet, except for api-blueprint examples.

INSTALL

via npmjs.org:

  1. npm install -g aglio
  2. npm install -g aglio-theme-bluecase

USE

  • aglio -i tmp/mystructs.apib -t bluecase -o -
  • aglio -i tmp/myapi.md -t bluecase -o tmp/MyGreatCases --theme-superclass MyGreatCases --theme-doubles lat,lon
  • aglio -i ../../test/example3.md -t bluecase -o src/main/scala/onextent/bluecase/examples/ex1/TxnerStuff.scala --theme-super-class TxnerStuff --theme-scala-package onextent.bluecase.examples.ex1 --theme-spray-json true

example image

License

Copyright (c) 2016 Ed Sweeney

http://dgt.mit-license.org/