Repository navigation
Commit 4265099
committed
feat(datasource): show the field reference the service generates
`--config` takes a JSON object whose shape depends on the family, and the only
way to learn that shape was to read the catalog's schema -- which described an
older request format and would have had you build a body the API rejects.
`hotdata datasource fields [FAMILY]` renders the reference the service now
generates from its own request models: config, credentials and selector
fields with types, requiredness and defaults, plus what the family supports.
Raw JSON Schema under -o json for a UI or a script. `--config`'s help points
at it, as the old help pointed at the catalog.
A sibling verb rather than an overload of `types`, whose positional filters
catalog ENTRY names -- and an entry is not a family (`postgres` is an entry,
`sql` is its family), so one positional meaning both would be ambiguous
exactly where people are already confused.
Response structs carry unknown keys through to -o json rather than dropping
them: a client that silently discarded a field would hand a user a reference
less complete than the wire, which is the failure this endpoint exists to end.1 parent 08b91a2 commit 4265099
6 files changed
Lines changed: 880 additions & 17 deletions
File tree
- skills/hotdata
- src
- client
- commands
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
95 | 99 | | |
96 | 100 | | |
97 | 101 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
242 | 242 | | |
243 | 243 | | |
244 | 244 | | |
245 | | - | |
| 245 | + | |
246 | 246 | | |
247 | 247 | | |
248 | 248 | | |
249 | | - | |
250 | | - | |
251 | | - | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
252 | 261 | | |
253 | 262 | | |
254 | 263 | | |
| |||
262 | 271 | | |
263 | 272 | | |
264 | 273 | | |
| 274 | + | |
265 | 275 | | |
266 | 276 | | |
267 | 277 | | |
| |||
276 | 286 | | |
277 | 287 | | |
278 | 288 | | |
279 | | - | |
| 289 | + | |
| 290 | + | |
280 | 291 | | |
281 | 292 | | |
282 | 293 | | |
| |||
0 commit comments