apicollective / apibuilder

Simple, Comprehensive Tooling for Modern APIs
https://www.apibuilder.io/
MIT License
567 stars 83 forks source link

Model's package name should be pulled from the model's namespace in the JSON #16

Closed arbjerg closed 10 years ago

arbjerg commented 10 years ago

When the name space is specified in the JSON for a model it should be used as the package name for its case class.

mbryzek commented 10 years ago

As of right now, we don't have support to specify a namespace (see http://www.apidoc.me/doc/apiJson)

I've been reluctant to introduce attributes to api.json that do not directly benefit the API itself - namespace would be there just for code generation. Similarly we have avoided adding "nickname" or other hints to what the code generated method name should be... the overarching philosophy is that this is for API documentation first and foremost.

Perhaps we can prompt for a namespace when actually generating the client - would like to think about the best way to support this (but agree with the goal of having a well defined package name for clients)

mbryzek commented 10 years ago

See https://github.com/gilt/apidoc/issues/86 for plans to support this