Commit 529ba64
authored
[nexus] Add TUF repo list endpoint, make other endpoints conventional (#9106)
Built on top of #8897
These are breaking API changes and I won't merge until I have a PR up on
the CLI side that makes this all work.
### Add list endpoint and fix other ones
Made the endpoints match the other ones. Not married to the verb
`upload`, but `system_update_repository_update` felt a little silly.
```diff
-system_update_get_repository GET /v1/system/update/repository/{system_version}
-system_update_put_repository PUT /v1/system/update/repository
+system_update_repository_list GET /v1/system/update/repositories
+system_update_repository_upload PUT /v1/system/update/repositories
+system_update_repository_view GET /v1/system/update/repositories/{system_version}
```
### Standardize and simplify response types
What's responsible for this PR being so big is that I reworked these
endpoints to return a new `TufRepo` struct that is only the metadata and
no artifacts. The main reason for this was that the list endpoint would
have to pull artifacts for every repo in the list. The list is likely to
be small, so it's probably not a big deal, but it also seems that the
artifacts are not useful to the end user. Once the list endpoint was
simplified, it makes sense to return the same thing from the view and
update endpoints. The upload endpoint returns a `TufRepoUpload` which
has the `TufRepo` together with an indicator saying whether the repo
contents were new repo or already existed.1 parent 8c683c7 commit 529ba64
File tree
17 files changed
+719
-421
lines changed- common/src/api/external
- nexus
- db-model/src
- db-queries/src/db/datastore
- external-api
- output
- src
- src
- app
- external_api
- tests/integration_tests
- types/src/external_api
- openapi
17 files changed
+719
-421
lines changedSome generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| 56 | + | |
56 | 57 | | |
57 | 58 | | |
58 | 59 | | |
| |||
163 | 164 | | |
164 | 165 | | |
165 | 166 | | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
166 | 215 | | |
167 | 216 | | |
168 | 217 | | |
| |||
313 | 362 | | |
314 | 363 | | |
315 | 364 | | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
316 | 372 | | |
317 | 373 | | |
318 | 374 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3427 | 3427 | | |
3428 | 3428 | | |
3429 | 3429 | | |
| 3430 | + | |
| 3431 | + | |
| 3432 | + | |
| 3433 | + | |
3430 | 3434 | | |
3431 | 3435 | | |
3432 | 3436 | | |
| |||
3501 | 3505 | | |
3502 | 3506 | | |
3503 | 3507 | | |
3504 | | - | |
3505 | | - | |
3506 | | - | |
3507 | | - | |
3508 | | - | |
3509 | | - | |
3510 | | - | |
3511 | | - | |
3512 | | - | |
3513 | | - | |
3514 | | - | |
3515 | | - | |
3516 | | - | |
3517 | | - | |
3518 | | - | |
3519 | | - | |
3520 | | - | |
3521 | | - | |
3522 | | - | |
3523 | | - | |
3524 | | - | |
3525 | | - | |
3526 | | - | |
3527 | | - | |
3528 | | - | |
3529 | | - | |
3530 | | - | |
3531 | | - | |
3532 | | - | |
3533 | | - | |
3534 | | - | |
3535 | | - | |
3536 | | - | |
3537 | | - | |
3538 | 3508 | | |
3539 | 3509 | | |
3540 | 3510 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
34 | | - | |
35 | 33 | | |
36 | 34 | | |
37 | 35 | | |
| |||
64 | 62 | | |
65 | 63 | | |
66 | 64 | | |
67 | | - | |
68 | 65 | | |
69 | 66 | | |
70 | 67 | | |
| |||
78 | 75 | | |
79 | 76 | | |
80 | 77 | | |
81 | | - | |
82 | | - | |
83 | 78 | | |
84 | 79 | | |
85 | 80 | | |
| |||
134 | 129 | | |
135 | 130 | | |
136 | 131 | | |
137 | | - | |
138 | 132 | | |
139 | 133 | | |
140 | 134 | | |
| |||
156 | 150 | | |
157 | 151 | | |
158 | 152 | | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
159 | 164 | | |
160 | 165 | | |
161 | 166 | | |
| |||
413 | 418 | | |
414 | 419 | | |
415 | 420 | | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
114 | | - | |
| 114 | + | |
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
| |||
0 commit comments