Croods Rails

Croods Rails

  • Introduction
  • Installation

›Core features

Getting Started

  • Introduction
  • Installation
  • Usage

Core features

  • Authentication
  • Authorization
  • Request and Response validation
  • Search
  • Sorting
  • Pagination
  • Multi-tenancy

Request and Response validation

JSON schema

We use JSON schema to strong-type the API from a protocol point of view. Endpoints and their parameters are validated before even reaching the controller. This way, we don't need to write a lot of code to validate param types, presence, etc. Rails doesn't even see requests that are badly formatted.

To debug a resource's JSON schema, you can use the console. For a resource called Foo:

> Foo::Resource.json_schema

Or, to make it more readable:

> ap Foo::Resource.json_schema
← AuthorizationSearch →
Croods Rails
Docs
Getting Started (or other categories)Guides (or other categories)API Reference (or other categories)
Community
User ShowcaseStack OverflowProject ChatTwitter
More
BlogGitHubStar
Facebook Open Source
Copyright © 2022 Seasoned Software