|
| 1 | +openapi: 3.0.0 |
| 2 | + |
| 3 | +info: |
| 4 | + title: FireForm API |
| 5 | + version: 1.0.0 |
| 6 | + description: | |
| 7 | + Proposed API contract for FireForm as GSoC project 2026 by [chetanr25.in](https://chetanr25.in) |
| 8 | + contact: |
| 9 | + name: Chetan R |
| 10 | + url: https://github.com/chetanr25 |
| 11 | + email: chetan250204@gmail.com |
| 12 | + |
| 13 | +servers: |
| 14 | + - url: http://localhost:8080 |
| 15 | + description: Local FireForm instance (default) |
| 16 | + |
| 17 | +tags: |
| 18 | + - name: input |
| 19 | + description: Submit voice or text incident narratives |
| 20 | + - name: extraction |
| 21 | + description: AI-powered data extraction from narratives into canonical JSON |
| 22 | + - name: forms |
| 23 | + description: Generate agency-specific PDF forms from extracted data |
| 24 | + - name: incidents |
| 25 | + description: Manage incident records linking inputs, extractions, and forms |
| 26 | + - name: reporting |
| 27 | + description: Aggregate statistics and periodic report generation |
| 28 | + - name: templates |
| 29 | + description: Form template configuration and management |
| 30 | + - name: system |
| 31 | + description: Health checks, schema introspection, and system status |
| 32 | + - name: jobs |
| 33 | + description: Cross-cutting async job status polling |
| 34 | + |
| 35 | +paths: |
| 36 | + # ── Layer 1: Input ────────────────────────────────────────────── |
| 37 | + /api/v1/input/voice: |
| 38 | + $ref: "path/input.yaml#/voice" |
| 39 | + /api/v1/input/text: |
| 40 | + $ref: "path/input.yaml#/text" |
| 41 | + /api/v1/input/{input_id}: |
| 42 | + $ref: "path/input.yaml#/input_by_id" |
| 43 | + |
| 44 | + # ── Layer 2: AI Extraction ───────────────────────────────────── |
| 45 | + /api/v1/extract/{input_id}: |
| 46 | + $ref: "path/extraction.yaml#/extract_by_input" |
| 47 | + /api/v1/extract/{extract_id}: |
| 48 | + $ref: "path/extraction.yaml#/extract_by_id" |
| 49 | + /api/v1/extract/{extract_id}/validate: |
| 50 | + $ref: "path/extraction.yaml#/validate" |
| 51 | + |
| 52 | + # ── Layer 3: Form Generation ─────────────────────────────────── |
| 53 | + /api/v1/forms/generate/all: |
| 54 | + $ref: "path/forms.yaml#/generate_all" |
| 55 | + /api/v1/forms/generate/{form_type}: |
| 56 | + $ref: "path/forms.yaml#/generate_single" |
| 57 | + /api/v1/forms/{form_id}: |
| 58 | + $ref: "path/forms.yaml#/form_by_id" |
| 59 | + /api/v1/forms/{form_id}/pdf: |
| 60 | + $ref: "path/forms.yaml#/form_pdf" |
| 61 | + /api/v1/forms/{form_id}/json: |
| 62 | + $ref: "path/forms.yaml#/form_json" |
| 63 | + /api/v1/forms/batch/{batch_id}: |
| 64 | + $ref: "path/forms.yaml#/batch_by_id" |
| 65 | + |
| 66 | + # ── Layer 4: Incident Management ─────────────────────────────── |
| 67 | + /api/v1/incidents: |
| 68 | + $ref: "path/incidents.yaml#/incidents" |
| 69 | + /api/v1/incidents/{incident_id}: |
| 70 | + $ref: "path/incidents.yaml#/incident_by_id" |
| 71 | + |
| 72 | + # ── Layer 5: Reporting & Analytics ───────────────────────────── |
| 73 | + /api/v1/reports/summary: |
| 74 | + $ref: "path/reporting.yaml#/summary" |
| 75 | + /api/v1/reports/generate: |
| 76 | + $ref: "path/reporting.yaml#/generate" |
| 77 | + /api/v1/reports/{report_id}: |
| 78 | + $ref: "path/reporting.yaml#/report_by_id" |
| 79 | + |
| 80 | + # ── Layer 6: Templates & Configuration ───────────────────────── |
| 81 | + /api/v1/templates: |
| 82 | + $ref: "path/templates.yaml#/templates" |
| 83 | + /api/v1/templates/{template_id}: |
| 84 | + $ref: "path/templates.yaml#/template_by_id" |
| 85 | + /api/v1/templates/{template_id}/fields: |
| 86 | + $ref: "path/templates.yaml#/template_fields" |
| 87 | + |
| 88 | + # ── Layer 7: System ──────────────────────────────────────────── |
| 89 | + /api/v1/health: |
| 90 | + $ref: "path/system.yaml#/health" |
| 91 | + /api/v1/schema/incident: |
| 92 | + $ref: "path/system.yaml#/schema_incident" |
| 93 | + /api/v1/schema/incident/versions: |
| 94 | + $ref: "path/system.yaml#/schema_versions" |
| 95 | + |
| 96 | + # ── Layer 8: Async Jobs ──────────────────────────────────────── |
| 97 | + /api/v1/jobs/{job_id}: |
| 98 | + $ref: "path/jobs.yaml#/job_by_id" |
0 commit comments