How do we debug our APIs written using the Grape API?

I built my API using the Grape API, would like to know how to debug it ...

+4
source share
2 answers

1.Install RubyMine and go to 'run' β†’ 'edit configurations'. 2. Click on the plus sign in the left corner of the window and select the desired configuration. 3. Name your configuration in the "Name" text box at the top and edit all the default settings that you want to change. 4. Apply breakpoints and start the server in debug mode. You will go well :)

+1
source

You can write tests for the Grape APIs using Rack or Rails, which should help you verify that the result is what you expected.

https://github.com/intridea/grape#writing-tests

I'm not sure it works with Sinatra / Grape, but you can also add Simplecov to make sure you have covered your base.

If you have already written tests and still have a problem, can you provide more information about the error you are getting?

+2
source

Source: https://habr.com/ru/post/1436842/


All Articles