How to generate API documentation with apipie & rspec
Vložit
- čas přidán 19. 04. 2021
- We picked the topic because it helps you write and maintain up-to-date API docs in your rails application by integrating apipie with rspec so you can generate API documentation by testing your APIs.
Here is the code demo we've showcased within the video github.com/Wolfpack-Digital/a...
✌️ You can always learn more from our team by checking our blog www.wolfpack-digital.com/blog... - Věda a technologie
Apipie works with minitest also?
What happens when we have controllers with same name? Apipie lists only one of the routes. How to solve that?
You need to set "config.namespaced_resources = true" in "app/config/initializers/apipie.rb"
@@wolfpackdigital7300 Thanks for your response. I know of this, but this changes the way how apipie lists the resources. MyNamespace::DetailsController will be named My namespacedetails, which is not great, so I was looking for some other solution.
does it work on the server?
Yes, it does. If you also want to record the examples, you need to make sure to build the examples before the deploy. This can be done by your CI/CD tool if you are using one.