Protocol overview
CommonBenefits is a TypeSpec-defined protocol for describing benefits programs. It provides reusable types, fields, filters, and response shapes that any benefits API can implement.
Each entry shows:
- A table of the schema’s properties (or enum values), with cross-links to related schemas.
- An Example generated from the TypeSpec
@exampledecorators (usingopenapi-samplerto fill in references). - The compiled JSON Schema YAML.
- The original TypeSpec source (when the schema is defined in
lib/core).
Sections
Section titled “Sections”- String, Numeric, Date, Other — primitive scalar types used throughout the protocol.
- Fields: Address, Phone, Email, Name, Money, File, Event, System metadata, Custom fields.
- Filters: Operators, String, Numeric, Date, Money.
- Responses: Error, Success.
- Pagination and Sorting — narrative explanations of those conventions.
To add a new schema, define it in lib/core/lib/, register it in website/src/lib/protocol-catalog.ts (under an existing page or a new one), and the corresponding page is generated automatically.