Open tejainece opened 6 years ago
Generally there two mode with Swagger :) either it's generated from the backend side on the fly depending on server implementation (introspection) or the swagger first approach (I consider it the best ^^) where people write manually the Swagger specification and from it generate models (for backend/frontend/mobile) but can also generate directly the retrofit implementation.
Would be nice to be able to work with those two mode :) But I don't think it should belong to retrofit, should mainly belong the jaguar server
My two cents ^^
Retrofit specification is basically swagger spec. It is much harder on Jaguar server side unless we go swagger first.
Problem is that your swagger definition might not be exhaustive then, because it just depends on what you implement frontend side and not what's implemented server side. And it force you to build the front part to provide backend documentation which look weird to me.
What I've done with nodeJS is Swagger first approach, generate models from swagger definition, then when the server start, it:
And my plan was to add:
To put in place swagger first support it's a big work, but once it's done you gain a lot because basically all the stuff is done just by writing your swagger file, then you just need to implement your business logic and your backend side is ready. It's very powerful
Generate swagger specification from Retrofit.