made Models optional

The code generation currently fails if an API listing has no models. This patch makes models an Option and fixes that use case.