chore: improve validation of Security tag in swaggerparser (#15660)

Aims to resolve #15605 

There's currently one option valid for the `@Security` tag in
swaggerparser - which fails in the CI if we try to put any other value.

At least one of our endpoints does not accept `CoderSessionToken` as an
option for the authentication and so we need to add new possibilities in
order to keep the documentation up-to-date.

In this PR , I added `ProvisionerKey` which is the way our provisioner
daemon can authenticate to the backend - also modified a bit the code to
simplify other options later.
This commit is contained in:
Vincent Vielle
2024-11-26 07:19:43 +01:00
committed by GitHub
parent 60ddcf5de2
commit 8afb10e090
5 changed files with 10 additions and 6 deletions

View File

@ -202,7 +202,7 @@ func (api *API) deleteProvisionerKey(rw http.ResponseWriter, r *http.Request) {
// @Summary Fetch provisioner key details
// @ID fetch-provisioner-key-details
// @Security CoderSessionToken
// @Security CoderProvisionerKey
// @Produce json
// @Tags Enterprise
// @Param provisionerkey path string true "Provisioner Key"