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:
Marcin Tojek
2022-12-22 15:53:14 +01:00
committed by GitHub
parent c505e8b207
commit cfd02d959c
21 changed files with 682 additions and 176 deletions

View File

@ -54,7 +54,7 @@ type AuthorizationObject struct {
// ResourceID (optional) reduces the set to a singular resource. This assigns
// a resource ID to the resource type, eg: a single workspace.
// The rbac library will not fetch the resource from the database, so if you
// are using this option, you should also set the `OwnerID` and `OrganizationID`
// are using this option, you should also set the owner ID and organization ID
// if possible. Be as specific as possible using all the fields relevant.
ResourceID string `json:"resource_id,omitempty"`
}

View File

@ -11,9 +11,8 @@ import (
// BuildInfoResponse contains build information for this instance of Coder.
type BuildInfoResponse struct {
// ExternalURL is a URL referencing the current Coder version. For production
// builds, this will link directly to a release. For development builds, this
// will link to a commit.
// ExternalURL references the current Coder version.
// For production builds, this will link directly to a release. For development builds, this will link to a commit.
ExternalURL string `json:"external_url"`
// Version returns the semantic version of the build.
Version string `json:"version"`

View File

@ -6,14 +6,11 @@ import (
"net/http"
)
// UpdateCheckResponse contains information
// on the latest release of Coder.
// UpdateCheckResponse contains information on the latest release of Coder.
type UpdateCheckResponse struct {
// Current is a boolean indicating whether the
// server version is the same as the latest.
// Current indicates whether the server version is the same as the latest.
Current bool `json:"current"`
// Version is the semantic version for the latest
// release of Coder.
// Version is the semantic version for the latest release of Coder.
Version string `json:"version"`
// URL to download the latest release of Coder.
URL string `json:"url"`

View File

@ -49,7 +49,7 @@ type WorkspaceApp struct {
}
type Healthcheck struct {
// URL specifies the url to check for the app health.
// URL specifies the endpoint to check for the app health.
URL string `json:"url"`
// Interval specifies the seconds between each health check.
Interval int32 `json:"interval"`