Skip to content

Add a field catalog and finish the template PDF flow#622

Open
chetanr25 wants to merge 1 commit into
fireform-core:development-approach-cfrom
chetanr25:template_registry_maping
Open

Add a field catalog and finish the template PDF flow#622
chetanr25 wants to merge 1 commit into
fireform-core:development-approach-cfrom
chetanr25:template_registry_maping

Conversation

@chetanr25

@chetanr25 chetanr25 commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

Add a field catalog and finish the template PDF flow

Why

Setting up a template meant mapping its fields to the incident contract, but there was no way to search the contract for the right field, and the PDF upload flow had no step to review a detection draft or get the source file back. The template schema file also needed room for a few new concepts: per-field sources, layout, and the mapping suggestions.

What changed

  • Added GET /schema/fields, a search endpoint over the flattened incident contract (path, type, section, aliases, PII flag), generated from the contract itself so it never drifts out of sync. This backs the mapping picker in the template editor and the auto-suggestions shown after field detection.
  • Added GET /templates/{template_id}/pdf to fetch a template's original source PDF.
  • Added GET /templates/pdf/{upload_id} to review a field-detection draft before registering it as a template.
  • Added the template_field_detection job type to the shared job schemas.
  • Expanded template.yaml in place, keeping its filename so the existing references from the template paths stay valid, to carry FieldSource per field, the field layout, and the mapping suggestions the field catalog produces.

Reference

Discussion: #609.
Related issue: #621

@chetanr25
chetanr25 changed the base branch from development to development-approach-c July 23, 2026 20:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant