Files
coder/coderd/coderdtest
Nick Vigilante 6de3d92883 fix: correct invalid and nonexistent Swagger parameters (#30124)
Several parameter annotations produced a wrong or invalid spec.

- `GET /api/v2/settings/idpsync/available-fields` and `field-values`
documented a required `organization` path parameter that their URLs do
not contain. The annotations were copied from the organization-scoped
routes.
- `format(uuid)` on the `ids` array query parameter of the provisioner
jobs and daemons routes put `format: uuid` on the array rather than its
items. swag cannot set an item format, so the description now says the
IDs are UUIDs.
- Swagger 2.0 does not allow `example` on header parameters, which
failed strict validation. The `Authorization` and `Content-Disposition`
examples move to `x-example` vendor extensions, which Swagger 2.0 allows
on parameters and the docs generator uses for the curl samples.
- `TestSwaggerParametersValid` reads every path in the generated spec
and fails on a non-body parameter with `example`, an array parameter
with `format`, or a path parameter missing from its route.

Part of DOCS-1122, split from #30121.

---
🤖 Built with AI assistance.
2026-11-05 14:22:30 -05:00
..