rdc-schema

Define Entity, Collection, and Union schemas for API JSON responses.

2.0k|99|Updated Feb 15, 2019
One-click install
npx skills add https://github.com/reactive/data-client --skill rdc-schema
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rdc-schema
Source: https://github.com/reactive/data-client/tree/main/.cursor/skills/rdc-schema
Command: npx skills add https://github.com/reactive/data-client --skill rdc-schema

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Define a standardized way to model the JSON responses from APIs using entity, collection, and union schemas, enabling consistent normalization and deserialization.

Core Features & Use Cases

  • Object and Entity definitions to model single resources; new Union to represent polymorphic data; All, Invalidate, and Values for complex collections and maps; nested schemas and relational data support.
  • Use cases include modeling REST/GraphQL responses, building predictable data layers for frontend apps, and composing reusable schema primitives to drive normalization and client-side state.

Quick Start

Create a schema that defines a User entity, a collection of users, and a Union for different event types.

Frequently Asked Questions about rdc-schema

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I normalize nested API JSON responses for client-side state management?

You can model polymorphic API data using the Union schema primitive, which represents different event types within nested JSON responses to ensure consistent serialization and deserialization alongside Entity and Collection definitions.

What is the best way to model polymorphic data shapes in GraphQL responses?

You can model polymorphic API data using the Union schema primitive, which represents different event types within nested JSON responses to ensure consistent serialization and deserialization alongside Entity and Collection definitions.

How do I define a relational data schema to enforce consistent deserialization?

Yes, you can compose nested schemas by defining Entity, Collection, and Union primitives that map to single resources and polymorphic data, enabling normalization of deeply nested API JSON structures.

How do I set up schema normalization for REST and GraphQL APIs?

Set up schema normalization by creating schema definitions that model User entities, user collections, and Unions for event types, then apply these schemas to REST and GraphQL data to drive predictable client-side state.

Can I use schema primitives to handle complex collections and maps in API data?

Yes, you can use All, Invalidate, and Values schema primitives to model complex collections and maps, ensuring consistent serialization and data integrity when processing API JSON responses.

When should I use Union versus Entity schemas for API data modeling?

Use Entity schemas to model single API resources and Union schemas to represent polymorphic data shapes, combining both to handle nested and relational data structures during normalization.