mirror of
https://github.com/coder/coder.git
synced 2025-07-03 16:13:58 +00:00
docs: api root, buildinfo, csp (#5493)
* docs: Applications * WIP * WIP * WIP * Fix: consume * Fix: @Description * Fix * docs: apiroot, buildinfo, csp * Fix: buildinfo * docs: updatecheck * docs: apiroot * Fix: s/none//g * Fix: godoc nice * Fix: description * Fix: It * Fix: code sample trim empty line * More fixes * Fix: br * Merge * Fix: no-security on updatecheck * Fix: code tags * Fix: enumerated values in code tags * Rephrased * Address PR comments * Fix: URL, id * Fix: array items * Fix: any property * Fix: array item singular
This commit is contained in:
@ -25,6 +25,26 @@ const docTemplate = `{
|
||||
"host": "{{.Host}}",
|
||||
"basePath": "{{.BasePath}}",
|
||||
"paths": {
|
||||
"/": {
|
||||
"get": {
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"General"
|
||||
],
|
||||
"summary": "API root handler",
|
||||
"operationId": "api-root-handler",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/codersdk.Response"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/applications/auth-redirect": {
|
||||
"get": {
|
||||
"security": [
|
||||
@ -116,6 +136,62 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"/buildinfo": {
|
||||
"get": {
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"General"
|
||||
],
|
||||
"summary": "Build info",
|
||||
"operationId": "build-info",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/codersdk.BuildInfoResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/csp/reports": {
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"CoderSessionToken": []
|
||||
}
|
||||
],
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"text/plain"
|
||||
],
|
||||
"tags": [
|
||||
"General"
|
||||
],
|
||||
"summary": "Report CSP violations",
|
||||
"operationId": "report-csp-violations",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "Violation report",
|
||||
"name": "request",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/coderd.cspViolation"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/organizations/{organization-id}/templates/": {
|
||||
"post": {
|
||||
"security": [
|
||||
@ -352,6 +428,26 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"/updatecheck": {
|
||||
"get": {
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"General"
|
||||
],
|
||||
"summary": "Update check",
|
||||
"operationId": "update-check",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/codersdk.UpdateCheckResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/users/{user}/workspace/{workspacename}": {
|
||||
"get": {
|
||||
"security": [
|
||||
@ -730,6 +826,15 @@ const docTemplate = `{
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
"coderd.cspViolation": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"csp-report": {
|
||||
"type": "object",
|
||||
"additionalProperties": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"codersdk.AuthorizationCheck": {
|
||||
"description": "AuthorizationCheck is used to check if the currently authenticated user (or the specified user) can do a given action to a given set of objects.",
|
||||
"type": "object",
|
||||
@ -762,7 +867,7 @@ const docTemplate = `{
|
||||
"type": "string"
|
||||
},
|
||||
"resource_id": {
|
||||
"description": "ResourceID (optional) reduces the set to a singular resource. This assigns\na resource ID to the resource type, eg: a single workspace.\nThe rbac library will not fetch the resource from the database, so if you\nare using this option, you should also set the ` + "`" + `OwnerID` + "`" + ` and ` + "`" + `OrganizationID` + "`" + `\nif possible. Be as specific as possible using all the fields relevant.",
|
||||
"description": "ResourceID (optional) reduces the set to a singular resource. This assigns\na resource ID to the resource type, eg: a single workspace.\nThe rbac library will not fetch the resource from the database, so if you\nare using this option, you should also set the owner ID and organization ID\nif possible. Be as specific as possible using all the fields relevant.",
|
||||
"type": "string"
|
||||
},
|
||||
"resource_type": {
|
||||
@ -789,6 +894,19 @@ const docTemplate = `{
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"codersdk.BuildInfoResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"external_url": {
|
||||
"description": "ExternalURL references the current Coder version.\nFor production builds, this will link directly to a release. For development builds, this will link to a commit.",
|
||||
"type": "string"
|
||||
},
|
||||
"version": {
|
||||
"description": "Version returns the semantic version of the build.",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"codersdk.CreateParameterRequest": {
|
||||
"description": "CreateParameterRequest is a structure used to create a new parameter value for a scope.",
|
||||
"type": "object",
|
||||
@ -899,7 +1017,7 @@ const docTemplate = `{
|
||||
"type": "integer"
|
||||
},
|
||||
"url": {
|
||||
"description": "URL specifies the url to check for the app health.",
|
||||
"description": "URL specifies the endpoint to check for the app health.",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
@ -1066,6 +1184,23 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"codersdk.UpdateCheckResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"current": {
|
||||
"description": "Current indicates whether the server version is the same as the latest.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"url": {
|
||||
"description": "URL to download the latest release of Coder.",
|
||||
"type": "string"
|
||||
},
|
||||
"version": {
|
||||
"description": "Version is the semantic version for the latest release of Coder.",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"codersdk.UpdateWorkspaceAutostartRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
Reference in New Issue
Block a user