liveBook · Manning

Superset arrangement

As explained in API Design Patterns

A superset arrangement represents a polymorphic resource with fields covering the information required by all of its individual subtypes.

A superset arrangement models a polymorphic resource with fields covering the information required by every subtype. A Message can represent text, photo, audio, or video content while retaining shared fields such as id, sender, and type. section 16.3.2

Messages with typed content

A Message declares type as text, photo, audio, or video. Text may use a string content value, while media may use a structure containing contentUri and contentType. Interpret content according to type.

How API Design Patterns covers it

How deep it goes
Compares separate fields, shared fields, and structured values, stopping at practical representation guidance.
Examples
Uses Message variants and Shape dimensions to contrast text, media, radius, length, base, and height.
What it assumes
Assumes familiarity with resources and interfaces while teaching how polymorphic variants store differing information.
What you can do after
Evaluate and design subtype representations by choosing explicit fields or practical shared abstractions.
How it connects
Connects polymorphic resources with type fields, interfaces, media content, and resource structure.

This explainer was generated by Manning's knowledge graph from the text of API Design Patterns. The section links point to the parts of the book it draws on.