Toward a roadmap for our API

Hello, nice, sounds like progress.
I havent followed the details here but I can add there’s some test coverage to the current api endpoints (it’s not very complete but it’s a very good start). We should use any new API project to start using request specs instead of controller specs for the API: RSpec 3.5 has been released!
For non tech people: the current rest api has decent amount of tests but we need to improve if we want external users to use the API. As we do this we should write the tests in a slightly different and improved way called request specs (instead of the old style way we currently use called controller specs).

Oh, and one more thing, the existing request spec for the orders endpoint was built by Steve with a gem called rswag that generates the swagger file (docs) automatically from the spec! It’s not perfect and requires a bit of work but something to explore. If we use rswag as in spec/requests/api/orders_spec.rb we get free swagger file (swagger/v1/swagger.yaml) otherwise we need to keep the swagger file manually updated like we do on the swagger.yaml on the root of the project.

3 Likes