An awesome api, in the minds have following characterstics:
- Excellent docs with success and failure sample response
- A standard authorization mechanism
- Consistent response body and codes
However, being an api developer in addition to that, I would like to have an automated tool that would help me to make sure that docs are always upto date with the api and I would like to use the latest and adopted authentication mechanism.
I would like to share my story of api development with Rails-api, Rspec, Rspec-api-documentation and JSON Web Token(JWT).
This is not a long tutorial about getting started with rails-devise-jwt, there is already lots of articles about what and why JWT and using JWT with ruby and rails. This is a blueprint of an end-to-end solution I adopted for development of an api.
The sample app is available here at github.
The commit in the speaks itself for steps that were done.