Consider using Apipie gem twice
Before implementing an API in Rails using the Apipie gem, make sure you understand several concerns. Apipie is a popular gem for documenting APIs in Ruby on Rails, but it has some limitations that make it less suitable for larger, more complex applications.
Lack of advanced type constraints
Apipie does not support more advanced type constraints, such as exactly_one_of
, all_or_none_of
, or at_least_one_of
, which can be essential for ensuring the validity of incoming data.
Limited support for OpenAPI documentation
While Apipie provides basic support for OpenAPI, it does not provide full support, making it difficult to integrate with other tools that rely on OpenAPI for documentation and testing (output examples).
Limited documentation of output examples section
Apipie does not provide support for multiple examples with different descriptions, making it difficult to clearly communicate expected behaviour for different HTTP responses. So you can add example output from a specific endpoint, but you cannot add a description for each output.
In conclusion, while Apipie is a good option for simple projects, you should consider alternative options for documenting and parsing APIs, such as the Grape gem, which offers more advanced features and better support for OpenAPI.