Skip to content

Commit deed7a3

Browse files
Updated data model documentation
1 parent 812560a commit deed7a3

File tree

3 files changed

+10
-24
lines changed

3 files changed

+10
-24
lines changed

docs/architecture.qmd

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -102,18 +102,16 @@ Here are some patterns we've considered for server-side error handling:
102102
border-collapse: collapse;
103103
}
104104

105-
.styled-table th:nth-child(1) { width: 5%; }
106-
.styled-table th:nth-child(2) { width: 50%; }
107-
.styled-table th:nth-child(3),
108-
.styled-table th:nth-child(4),
109-
.styled-table th:nth-child(5) { width: 15%; }
110-
.styled-table th:nth-child(6) { width: 10%; }
105+
.styled-table th:nth-child(1) { width: 50%; }
106+
.styled-table th:nth-child(2),
107+
.styled-table th:nth-child(3),
108+
.styled-table th:nth-child(4) { width: 15%; }
109+
.styled-table th:nth-child(5) { width: 10%; }
111110
</style>
112111

113112
<table class="styled-table">
114113
<thead>
115114
<tr>
116-
<th>ID</th>
117115
<th>Approach</th>
118116
<th>Returns to same page</th>
119117
<th>Preserves form inputs</th>
@@ -123,39 +121,34 @@ Here are some patterns we've considered for server-side error handling:
123121
</thead>
124122
<tbody>
125123
<tr>
126-
<td>1</td>
127124
<td>Validate with Pydantic dependency, catch and redirect from middleware (with exception message as context) to an error page with "go back" button</td>
128125
<td>No</td>
129126
<td>Yes</td>
130127
<td>Yes</td>
131128
<td>Low</td>
132129
</tr>
133130
<tr>
134-
<td>2</td>
135131
<td>Validate in FastAPI endpoint function body, redirect to origin page with error message query param</td>
136132
<td>Yes</td>
137133
<td>No</td>
138134
<td>Yes</td>
139135
<td>Medium</td>
140136
</tr>
141137
<tr>
142-
<td>3</td>
143138
<td>Validate in FastAPI endpoint function body, redirect to origin page with error message query param and form inputs as context so we can re-render page with original form inputs</td>
144139
<td>Yes</td>
145140
<td>Yes</td>
146141
<td>Yes</td>
147142
<td>High</td>
148143
</tr>
149144
<tr>
150-
<td>4</td>
151145
<td>Validate with Pydantic dependency, use session context to get form inputs from request, redirect to origin page from middleware with exception message and form inputs as context so we can re-render page with original form inputs</td>
152146
<td>Yes</td>
153147
<td>Yes</td>
154148
<td>Yes</td>
155149
<td>High</td>
156150
</tr>
157151
<tr>
158-
<td>5</td>
159152
<td>Validate in either Pydantic dependency or function endpoint body and directly return error message or error toast HTML partial in JSON, then mount error toast with HTMX or some simple layout-level Javascript</td>
160153
<td>Yes</td>
161154
<td>Yes</td>

docs/static/documentation.txt

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -322,18 +322,16 @@ Here are some patterns we've considered for server-side error handling:
322322
border-collapse: collapse;
323323
}
324324

325-
.styled-table th:nth-child(1) { width: 5%; }
326-
.styled-table th:nth-child(2) { width: 50%; }
327-
.styled-table th:nth-child(3),
328-
.styled-table th:nth-child(4),
329-
.styled-table th:nth-child(5) { width: 15%; }
330-
.styled-table th:nth-child(6) { width: 10%; }
325+
.styled-table th:nth-child(1) { width: 50%; }
326+
.styled-table th:nth-child(2),
327+
.styled-table th:nth-child(3),
328+
.styled-table th:nth-child(4) { width: 15%; }
329+
.styled-table th:nth-child(5) { width: 10%; }
331330
</style>
332331

333332
<table class="styled-table">
334333
<thead>
335334
<tr>
336-
<th>ID</th>
337335
<th>Approach</th>
338336
<th>Returns to same page</th>
339337
<th>Preserves form inputs</th>
@@ -343,39 +341,34 @@ Here are some patterns we've considered for server-side error handling:
343341
</thead>
344342
<tbody>
345343
<tr>
346-
<td>1</td>
347344
<td>Validate with Pydantic dependency, catch and redirect from middleware (with exception message as context) to an error page with "go back" button</td>
348345
<td>No</td>
349346
<td>Yes</td>
350347
<td>Yes</td>
351348
<td>Low</td>
352349
</tr>
353350
<tr>
354-
<td>2</td>
355351
<td>Validate in FastAPI endpoint function body, redirect to origin page with error message query param</td>
356352
<td>Yes</td>
357353
<td>No</td>
358354
<td>Yes</td>
359355
<td>Medium</td>
360356
</tr>
361357
<tr>
362-
<td>3</td>
363358
<td>Validate in FastAPI endpoint function body, redirect to origin page with error message query param and form inputs as context so we can re-render page with original form inputs</td>
364359
<td>Yes</td>
365360
<td>Yes</td>
366361
<td>Yes</td>
367362
<td>High</td>
368363
</tr>
369364
<tr>
370-
<td>4</td>
371365
<td>Validate with Pydantic dependency, use session context to get form inputs from request, redirect to origin page from middleware with exception message and form inputs as context so we can re-render page with original form inputs</td>
372366
<td>Yes</td>
373367
<td>Yes</td>
374368
<td>Yes</td>
375369
<td>High</td>
376370
</tr>
377371
<tr>
378-
<td>5</td>
379372
<td>Validate in either Pydantic dependency or function endpoint body and directly return error message or error toast HTML partial in JSON, then mount error toast with HTMX or some simple layout-level Javascript</td>
380373
<td>Yes</td>
381374
<td>Yes</td>

docs/static/schema.png

17.1 KB
Loading

0 commit comments

Comments
 (0)