Author Build Commit PR
ayushn21 23385 2cf7fee n/a
Repo Branch
rails/rails main
Message
[RF-DOCS] Update the guide for using Rails as an API (#57573) - Changed the structure of the guide to be more general and less like a step-by-step tutorial. This is in keeping with the rest of the guides as they may not always be read or followed all the way from beginning to end. - Simplified the section on why we would use Rails as an API. It read like a feature-list for Rails. I've removed all that detail and replaced it with a simple pitch stating the majority of Rails still applies in API applications. I've also removed language which makes assumptions about the reader's opinions. - Added sections on JBuilder and Builder, as well as XML responses which, while not as popular as JSON, is still a valid API data-interchange format. - Updated the sections on Rack middleware and Action Controller modules. Some of the information was out of date — for example, the `ActionController::Caching` module is now included in `ActionController::API`. I considered adding a new section on authenticating HTTP requests for an API, but it's not suitable for a general Rails guide. It would make too many assumption about the internal authentication model of the application. Instead, I've linked the modules for HTTP authentication included in Rails which the developer can use to build their authentication system. Internal Audit ------------- This guide sometimes uses lowercase "api". I think it should always be "API". This guide is about a JSON API, where we don't mention GraphQL which is another popular API implementation. The Basic Configuration - Should this section be renamed to something like "Setting Up an Application as an API" or "Using Rails as an API". Choosing Middleware - Rack::Cache is described but it's not in the intro list of middlewares. Co-authored-by: Petrik de Heus Co-authored-by: alexkuebo Co-authored-by: Andy Co-authored-by: bhumi1102 Co-authored-by: Deepan Kumar

/api

Reference documentation

/guides

In-depth tutorials