ebowman / api-first-hand

API-First bootstrapping tool for building RESTful web services from a Swagger/OpenAPI spec
MIT License
142 stars 22 forks source link

x-api-first-handler is broken in 0.2.0 (see simple.petstore.api.yaml) #47

Closed zyv closed 7 years ago

zyv commented 7 years ago

Hi,

I appreciate that apparently it's not officially out yet (?!), because I can't see version 0.2.0 in releases of this repository (#42), but I would like to bring to your attention that x-api-first-handler seems to be broken in 0.2.0, which leads to inability to compile the simple.petstore.api.yaml example.

Specifically, it seems that play-routes-compiler no longer understands that it should generate class Routes using overridden controller names, instead of autogenerated names like simple.petstore.api.yaml.Routes, and this causes compilation errors.

Many thanks!

slavaschmidt commented 7 years ago

Thanks for the bug report! That's exactly the reason why we jumped to 0.20 but published it yet: it's not quite stable enough.

LappleApple commented 7 years ago

Hi @zyv: If you'd like to contribute a fix on this issue, that would be great. We'll take a look.

zyv commented 7 years ago

@LappleApple, unfortunately, in the end, we decided against building our APIs on top of API First Hand, so I won't be able to get time to offer a fix myself.

I'm totally convinced that the approach itself is awesome, but very sadly the code base doesn't seem to be nearly as mature as we'd like to see it, and it isn't maintained actively enough for us to be comfortable with depending on it as is (hint: check when I've filed this issue, then look at the calendar & consider progress made thus far / outlook for the next few months).

Too bad we don't have the resources at the moment to help with the development... :-/

LappleApple commented 7 years ago

@zyv Thanks for the feedback. We recently got a team from FoodPanda to come on board with maintaining this project, and are open to other maintainers joining so that Slava doesn't have to do all the work himself. Hopefully this will accelerate development. :)

slavaschmidt commented 7 years ago

This is actually bug in the activator template. The route files generated by the play in a way that we are not free in our choice of package for the router, it must be in the same package the controller is. Because of that the router should be accessed using the same package name as defined in the specification. We should fix the activator template to use the correct router package and change the readme to mention this nuance.