data-client-schema
Installation
SKILL.md
1. Defining Schemas
Define schemas to represent the JSON returned by an endpoint. Compose these to represent the data expected.
Object
- Entity - represents a single unique object (denormalized)
- EntityMixin - turn any pre-existing class into an Entity
- new Union(Entity) - polymorphic objects (A | B)
{[key:string]: Schema}- immutable objects- new Invalidate(Entity|Union) - to delete an Entity
- new Lazy(() => Schema) - break circular imports / defer deep recursive denormalization
List
- new Collection([Schema]) - mutable/growable lists
[Schema]- immutable lists- new All(Entity|Union) - list all Entities of a kind