mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat: Validate swagger definitions (#5694)
* docs: audit, deploymentconfig, files, parameters * Swagger comments in workspacebuilds.go * structs in workspacebuilds.go * workspaceagents: instance identity * workspaceagents.go in progress * workspaceagents.go in progress * Agents * workspacebuilds.go * /workspaces * templates.go, templateversions.go * templateversion.go in progress * cancel * templateversions * wip * Merge * x-apidocgen * NullTime hack not needed anymore * Fix: x-apidocgen * Members * Fixes * Fix * WIP * WIP * Users * Logout * User profile * Status suspend activate * User roles * User tokens * Keys * SSH key * All * Typo * Fix * Entitlements * Groups * SCIM * Fix * Fix * Clean templates * Sort API pages * Fix: HashedSecret * WIP * WIP * WIP * Fix: cover workspaceagents * Assert: consistent ID and summary * Assert: success or failure defined * Fix: parallel * Refactor * Support enterprise * Go comment goes to top * Security * assertPathParametersDefined * assertUniqueRoutes * assertRequestBody * More fixes * Fix: exceptions * Fix field format * Address PR comments * Refactor
This commit is contained in:
@@ -66,7 +66,7 @@ var nonCanonicalHeaders = map[string]string{
|
||||
}
|
||||
|
||||
// @Summary Get applications host
|
||||
// @ID get-app-host
|
||||
// @ID get-applications-host
|
||||
// @Security CoderSessionToken
|
||||
// @Produce json
|
||||
// @Tags Applications
|
||||
@@ -614,6 +614,13 @@ func (api *API) setWorkspaceAppCookie(rw http.ResponseWriter, r *http.Request, t
|
||||
return true
|
||||
}
|
||||
|
||||
// workspaceApplicationAuth is an endpoint on the main router that handles
|
||||
// redirects from the subdomain handler.
|
||||
//
|
||||
// This endpoint is under /api so we don't return the friendly error page here.
|
||||
// Any errors on this endpoint should be errors that are unlikely to happen
|
||||
// in production unless the user messes with the URL.
|
||||
//
|
||||
// @Summary Redirect to URI with encrypted API key
|
||||
// @ID redirect-to-uri-with-encrypted-api-key
|
||||
// @Security CoderSessionToken
|
||||
@@ -621,13 +628,6 @@ func (api *API) setWorkspaceAppCookie(rw http.ResponseWriter, r *http.Request, t
|
||||
// @Param redirect_uri query string false "Redirect destination"
|
||||
// @Success 307
|
||||
// @Router /applications/auth-redirect [get]
|
||||
//
|
||||
// workspaceApplicationAuth is an endpoint on the main router that handles
|
||||
// redirects from the subdomain handler.
|
||||
//
|
||||
// This endpoint is under /api so we don't return the friendly error page here.
|
||||
// Any errors on this endpoint should be errors that are unlikely to happen
|
||||
// in production unless the user messes with the URL.
|
||||
func (api *API) workspaceApplicationAuth(rw http.ResponseWriter, r *http.Request) {
|
||||
ctx := r.Context()
|
||||
if api.AppHostname == "" {
|
||||
|
||||
Reference in New Issue
Block a user