docs(spec): describe the API filters as they are built
PR Checks / Frontend Typecheck + Tests (pull_request) Successful in 1m13s
PR Checks / Backend Smoke (pull_request) Successful in 9s
PR Checks / Build Backend (no push) (pull_request) Successful in 18s
PR Checks / Build Frontend (no push) (pull_request) Successful in 1m18s
PR Checks / Build Pipeline (no push) (pull_request) Successful in 11s
PR Checks / AI Code Review (Claude) (pull_request) Successful in 26s
PR Checks / Frontend Typecheck + Tests (pull_request) Successful in 1m13s
PR Checks / Backend Smoke (pull_request) Successful in 9s
PR Checks / Build Backend (no push) (pull_request) Successful in 18s
PR Checks / Build Frontend (no push) (pull_request) Successful in 1m18s
PR Checks / Build Pipeline (no push) (pull_request) Successful in 11s
PR Checks / AI Code Review (Claude) (pull_request) Successful in 26s
The /api/schools section still described filtering on stored school_type_group and faith_groups columns, which the architecture correction had already dropped: the filters look up the name columns at request time. Also trims a trailing blank line from two test files. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
84caee9f72
commit
214c80663e
3 files changed
+14
-9
No files matched your search
@@ -131,13 +131,20 @@ names. The names come from the same dictionaries, so the lookup is exact.
|
||||
|
||||
### `/api/schools`
|
||||
|
||||
- `school_type`: if the value is a type group key, filter on
|
||||
`school_type_group`. Otherwise filter on the raw label exactly as today, so
|
||||
an old `?school_type=Community+school` link keeps working.
|
||||
- `faith` (new, optional, `max_length=40`, sanitised like the others): filter to
|
||||
rows whose `faith_groups` contains the key. An unknown key returns no
|
||||
schools rather than being ignored, so a typo does not silently show
|
||||
everything.
|
||||
Both filters work on the name columns at request time. `_names_in_group`
|
||||
collects the distinct `school_type` or `religious_denomination` names the
|
||||
group accepts, once per distinct name rather than per row, and the rows are
|
||||
kept with `isin`. No group column is stored.
|
||||
|
||||
- `school_type`: if the value is a type group key (any case), keep the rows
|
||||
whose `school_type` name `type_group_for` puts in that group. Otherwise
|
||||
filter on the raw label exactly as today, so an old
|
||||
`?school_type=Community+school` link keeps working.
|
||||
- `faith` (new, optional, `max_length=40`, sanitised like the others): keep the
|
||||
rows whose `religious_denomination` name `faith_groups_for` puts in that
|
||||
faith (any case); for `none`, rows with a missing name too. An unknown key
|
||||
returns no schools rather than being ignored, so a typo does not silently
|
||||
show everything.
|
||||
|
||||
### `/api/filters`
|
||||
|
||||
|
||||
@@ -135,4 +135,3 @@ describe('a URL value the options do not spell the same way', () => {
|
||||
expect(screen.getByRole('combobox', { name: 'Faith' })).toHaveValue('roman_catholic');
|
||||
});
|
||||
});
|
||||
|
||||
@@ -176,4 +176,3 @@ describe('the results list filter chips', () => {
|
||||
expect(chips).not.toHaveTextContent(/\bcouncil\b(?!-run)/);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user