Shouldn't this just be an entire Polyline object?  This way the user can specify all line-related properties?  You should be able to $ref the Polyline.jsonscheme and it should "just work"  At least I had that working at one point, I'm not sure if I ever submitted those changes to the code generator.