silkapp / rest

Packages for defining APIs, running them, generating client code and documentation.

Home Page:http://silkapp.github.io/rest

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rest-gen: expose modules from rest-gen

ryskajakub opened this issue · comments

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:

  • Rest.Gen.Utils
  • Rest.Gen.Base.ActionInfo.Ident - this is partially reimported, but I also use the parts that are not reimported.

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

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?

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

  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.

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.

Thanks!