Commit fc94fd1
Document filtering by type for children endpoint (#8)
* Generalize /children endpoints to be usable outside of landing page #3, general rewrite/update #2
* Document filtering by type for children endpoint
This PR proposes adding an optional `type` query parameter to the `/children` endpoint to support filtering results by resource type (e.g., `Catalog` or `Collection`).
### Motivation
While the specification recommends separating different types into different hierarchy branches as a best practice, real-world data organization often results in "mixed content" folders (e.g., a Project Catalog containing both sub-project Catalogs and direct Dataset Collections).
In dynamic, database-backed APIs (like those using Elasticsearch), retrieving and paginating mixed-type lists can be computationally expensive and complex to implement.
Adding a standard `type` parameter allows:
1. **Backend Optimization:** Implementations can execute efficient, type-specific queries (e.g., `type: "Catalog"`) rather than fetching all children and filtering in memory.
2. **Client Flexibility:** Clients can request only the resource type they are interested in (e.g., "Show me sub-folders" vs. "Show me datasets") without receiving unwanted data.
3. **Standardization:** Prevents the proliferation of custom filter parameters (e.g., `?kind=`, `?filter=`) across different implementations.
### Proposed Change
Add a section detailing the `type` parameter:
#### Filtering by Type
Implementations MAY support a `type` query parameter to allow clients to request a specific resource type.
* `GET .../children?type=Catalog`
* `GET .../children?type=Collection`
* Update README.md
Co-authored-by: Matthias Mohr <[email protected]>
* Add conformance class for type filtering
Co-authored-by: Matthias Mohr <[email protected]>
* Update README.md
* Fix Markdown header for Filtering by Type section
Updated the section header for 'Filtering by Type' to use proper Markdown formatting.
* Add 'type' query parameter to getChildren operation
Added 'type' query parameter to filter catalogs or collections.
* Fix syntax
* Refactor parameters section in openapi.yaml
Formatted parameters section for consistency.
* Fix indentation in openapi.yaml parameters section
* Update README.md
Co-authored-by: Matthias Mohr <[email protected]>
* Fix typos and remove redundant links in README
---------
Co-authored-by: Matthias Mohr <[email protected]>1 parent 7f64c85 commit fc94fd1
2 files changed
+28
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
29 | | - | |
| 30 | + | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
| |||
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
40 | | - | |
| 41 | + | |
41 | 42 | | |
42 | 43 | | |
43 | 44 | | |
| |||
90 | 91 | | |
91 | 92 | | |
92 | 93 | | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
93 | 109 | | |
94 | 110 | | |
95 | 111 | | |
| |||
102 | 118 | | |
103 | 119 | | |
104 | 120 | | |
105 | | - | |
| 121 | + | |
106 | 122 | | |
107 | 123 | | |
108 | 124 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
49 | 50 | | |
50 | 51 | | |
51 | 52 | | |
| |||
78 | 79 | | |
79 | 80 | | |
80 | 81 | | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
81 | 90 | | |
82 | 91 | | |
83 | 92 | | |
| |||
0 commit comments