Section Definitions
Section definitions are the component library — reusable types that templates reference by type.
What lives in a definition
A section definition combines:
- A type identifier (e.g.
HeroSection) that templates reference. - A list of settings — typed inputs the admin UI renders (text, color, number, select, etc.).
- A list of block schemas — child component types the section may contain.
- Optional presets — pre-configured combinations of settings + blocks for quick creation.
- A list of target platforms (any combination of
WEB,MOBILE,TABLET;["ALL"]matches all). - A lifecycle status:
ACTIVE,DRAFT,DEPRECATED.
Setting types
| Type | Description | Example use |
|---|---|---|
TEXT | Single-line text | Title, label |
TEXTAREA | Multi-line text | Description |
RICHTEXT | HTML content | Body text |
NUMBER | Integer/decimal | Column count |
RANGE | Slider | Opacity |
CHECKBOX | Boolean toggle | Show/hide |
SELECT | Dropdown (uses options) | Style variant |
COLOR | Color picker | Background |
IMAGE | Image URL | Banner image |
VIDEO | Video URL | Background video |
URL | Link URL | CTA link |
HTML | Raw HTML | Embed code |
Each setting can carry constraints (min, max, step, unit, options, placeholder, info, defaultValue) — applicability depends on the type.
Lifecycle status
| Status | Meaning |
|---|---|
ACTIVE | Available in the template editor; rendered at runtime. |
DRAFT | Hidden from the picker; safe place to iterate. |
DEPRECATED | Still renders existing templates, but hidden from new template creation. |
How rendering composes settings
When a template references a section by type, the renderer merges layers:
- Section definition setting
defaultValues. - Template-level overrides on the section instance.
- Per-block defaults from the block schema, then per-block-instance overrides.
Disabled sections and blocks are dropped before rendering. See Templates for the merge details.
Schema reference
Field-level shape (request bodies, response bodies, enums) is documented in the OpenAPI spec — that is the source of truth and stays in sync with the Java model.
- OpenAPI spec (committed):
docs/openapi/pms.json— search forCreateSectionDefRequest,UpdateSectionDefRequest,SectionDefDto,SettingDefinition,BlockSchema,Preset. - Live Swagger UI (when the admin-api is running):
/swagger-ui.html, raw JSON at/v3/api-docs. - Java model classes (authoritative):
The pms.json spec is regenerated from the running app via npm run gen-specs (in docs/).
Endpoints
The full request/response details (including examples) are auto-rendered under the PMS API → SDUI Section Definitions sidebar group, generated from docs/openapi/pms.json.