Add error message for code generation

- Useful to show valid targets
commit generated models and json in API

- just using for Code and CodeError. need to refactor some of the existing
  code, before it can use generated models.

- generate code that uses scala.collection.Seq instead of
  scala.collection.immutable.Seq. The one in immutable is
  a subclass of Seq