silkapp / rest

Packages for defining APIs, running them, generating client code and documentation.
http://silkapp.github.io/rest
390 stars 52 forks source link

Rest-gen: expose modules from rest-gen #134

Closed ryskajakub closed 9 years ago

ryskajakub commented 9 years ago

I have tweaked the Haskell client generator so it creates a Fay client make for my needs. I'm using some internal modules just as the Haskell client code generator does, namely:

Could you please, export those modules from the rest-gen, so I doesn't need to maintain my patch?

bergmark commented 9 years ago

It feels wrong to me to expose the Utils module since it doesn't really have anything to do with the package itself. Which functions are you using from it?

bergmark commented 9 years ago

Also, super cool! I've been wanting fay client generation, will you publish this package?

ryskajakub commented 9 years ago
  1. I'm using the same as the Haskell.hs file does, namely downFirst and upFirst - as I look at them I could maybe just copypaste those, it's just a few lines, but I would still want the Ident to be exposed.
  2. Currently, it just works for my api, it won't generate the client correctly for all the apis. I might make it works for all the cases, and also make factor out the code shared with Haskell.hs.
bergmark commented 9 years ago

I think it would be nicer to exposed hsName etc from the Haskell module instead of Util. If you end up factoring out code we will probably have a better picture of what should be exported.

For now I exposed the Ident module in rest-gen-0.17.1.

ryskajakub commented 9 years ago

Thanks!