Currently the error reporting for the generator is not helpful in identifying which location/path of the spec is invalid.
Validation of the spec should probably be a separate phase so that transformation functions can operate on the spec without having to worry about invalid data.