jooby-project / jooby

The modular web framework for Java and Kotlin
https://jooby.io
Apache License 2.0
1.71k stars 197 forks source link

Swagger and Raml not working properly #378

Closed abitwise closed 8 years ago

abitwise commented 8 years ago

I tried to create API using Jooby, we have non-functional requirement to have Swagger or Raml for our APIs. For some reason Swagger and Raml are not working and no UI is displayed and it does not give out any errors. Looks like there are no definitions when looking at swagger.json, but definitions are there in /raml/api.raml.

I made very simple api to illustrate the problem: jooby-cat

jknack commented 8 years ago

Hi,

https://github.com/abitwise/jooby-cat is empty, also did you look at working demo: https://github.com/jooby-guides/route-spec?

Thanks

abitwise commented 8 years ago

I'm sorry, forgot to push, now it's there.

abitwise commented 8 years ago

I did look at the working demo and it works fine on my machine.

abitwise commented 8 years ago

Looks like it generates Swagger definition when I add this line inside get call: Cat cat = req.body().to(Cat.class); (and change next one to cat = new Cat();) Although this would render the API to non-working one, but it may help.

abitwise commented 8 years ago

If you remove put and post methods from the demo project, then you will get the same situation.

jknack commented 8 years ago

That's useful, will look later.

Don't forget to star our project and follow us at twitter: https://twitter.com/joobyproject