Skip to content

docs: api root, buildinfo, csp #5493

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 31 commits into from
Dec 22, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
More fixes
  • Loading branch information
mtojek committed Dec 21, 2022
commit ef213acae97fc23e88b9ffe91d416172335d185f
2 changes: 1 addition & 1 deletion coderd/apidoc/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -744,7 +744,7 @@ const docTemplate = `{
]
},
"object": {
"description": "Object can represent a \"set\" of objects, such as:\n- All workspaces in an organization\n- All workspaces owned by me\n- All workspaces across the entire product\nWhen defining an object, use the most specific language when possible to\nproduce the smallest set. Meaning to set as many fields on 'Object' as\nyou can. Example, if you want to check if you can update all workspaces\nowned by 'me', try to also add an 'OrganizationID' to the settings.\nOmitting the 'OrganizationID' could produce the incorrect value, as\nworkspaces have both ` + "`" + `user` + "`" + ` and ` + "`" + `organization` + "`" + ` owners.",
"description": "Object can represent a \"set\" of objects, such as:\n\t- All workspaces in an organization\n\t- All workspaces owned by me\n\t- All workspaces across the entire product\nWhen defining an object, use the most specific language when possible to\nproduce the smallest set. Meaning to set as many fields on 'Object' as\nyou can. Example, if you want to check if you can update all workspaces\nowned by 'me', try to also add an 'OrganizationID' to the settings.\nOmitting the 'OrganizationID' could produce the incorrect value, as\nworkspaces have both ` + "`" + `user` + "`" + ` and ` + "`" + `organization` + "`" + ` owners.",
"$ref": "#/definitions/codersdk.AuthorizationObject"
}
}
Expand Down
2 changes: 1 addition & 1 deletion coderd/apidoc/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -648,7 +648,7 @@
"enum": ["create", "read", "update", "delete"]
},
"object": {
"description": "Object can represent a \"set\" of objects, such as:\n- All workspaces in an organization\n- All workspaces owned by me\n- All workspaces across the entire product\nWhen defining an object, use the most specific language when possible to\nproduce the smallest set. Meaning to set as many fields on 'Object' as\nyou can. Example, if you want to check if you can update all workspaces\nowned by 'me', try to also add an 'OrganizationID' to the settings.\nOmitting the 'OrganizationID' could produce the incorrect value, as\nworkspaces have both `user` and `organization` owners.",
"description": "Object can represent a \"set\" of objects, such as:\n\t- All workspaces in an organization\n\t- All workspaces owned by me\n\t- All workspaces across the entire product\nWhen defining an object, use the most specific language when possible to\nproduce the smallest set. Meaning to set as many fields on 'Object' as\nyou can. Example, if you want to check if you can update all workspaces\nowned by 'me', try to also add an 'OrganizationID' to the settings.\nOmitting the 'OrganizationID' could produce the incorrect value, as\nworkspaces have both `user` and `organization` owners.",
"$ref": "#/definitions/codersdk.AuthorizationObject"
}
}
Expand Down
6 changes: 3 additions & 3 deletions codersdk/authorization.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ type AuthorizationRequest struct {
// @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 AuthorizationCheck struct {
// Object can represent a "set" of objects, such as:
// - All workspaces in an organization
// - All workspaces owned by me
// - All workspaces across the entire product
// - All workspaces in an organization
// - All workspaces owned by me
// - All workspaces across the entire product
// When defining an object, use the most specific language when possible to
// produce the smallest set. Meaning to set as many fields on 'Object' as
// you can. Example, if you want to check if you can update all workspaces
Expand Down
6 changes: 3 additions & 3 deletions docs/api/applications.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ curl -X GET http://coder-server:8080/api/v2/applications/auth-redirect \

### Responses

| Status | Meaning | Description | Schema |
| ------ | ----------------------------------------------------------------------- | ------------------ | --------- |
| 307 | [Temporary Redirect](https://tools.ietf.org/html/rfc7231#section-6.4.7) | Temporary Redirect | no schema |
| Status | Meaning | Description | Schema |
| ------ | ----------------------------------------------------------------------- | ------------------ | ------ |
| 307 | [Temporary Redirect](https://tools.ietf.org/html/rfc7231#section-6.4.7) | Temporary Redirect | |

To perform this operation, you must be authenticated by means of one of the following methods: **CoderSessionToken**.

Expand Down
18 changes: 9 additions & 9 deletions docs/api/workspaces.md
Original file line number Diff line number Diff line change
Expand Up @@ -707,9 +707,9 @@ curl -X PATCH http://coder-server:8080/api/v2/workspaces/{workspace} \

### Responses

| Status | Meaning | Description | Schema |
| ------ | --------------------------------------------------------------- | ----------- | --------- |
| 204 | [No Content](https://tools.ietf.org/html/rfc7231#section-6.3.5) | No Content | no schema |
| Status | Meaning | Description | Schema |
| ------ | --------------------------------------------------------------- | ----------- | ------ |
| 204 | [No Content](https://tools.ietf.org/html/rfc7231#section-6.3.5) | No Content | |

To perform this operation, you must be authenticated by means of one of the following methods: **CoderSessionToken**.

Expand Down Expand Up @@ -743,9 +743,9 @@ curl -X PUT http://coder-server:8080/api/v2/workspaces/{workspace}/autostart \

### Responses

| Status | Meaning | Description | Schema |
| ------ | --------------------------------------------------------------- | ----------- | --------- |
| 204 | [No Content](https://tools.ietf.org/html/rfc7231#section-6.3.5) | No Content | no schema |
| Status | Meaning | Description | Schema |
| ------ | --------------------------------------------------------------- | ----------- | ------ |
| 204 | [No Content](https://tools.ietf.org/html/rfc7231#section-6.3.5) | No Content | |

To perform this operation, you must be authenticated by means of one of the following methods: **CoderSessionToken**.

Expand Down Expand Up @@ -833,9 +833,9 @@ curl -X PUT http://coder-server:8080/api/v2/workspaces/{workspace}/ttl \

### Responses

| Status | Meaning | Description | Schema |
| ------ | --------------------------------------------------------------- | ----------- | --------- |
| 204 | [No Content](https://tools.ietf.org/html/rfc7231#section-6.3.5) | No Content | no schema |
| Status | Meaning | Description | Schema |
| ------ | --------------------------------------------------------------- | ----------- | ------ |
| 204 | [No Content](https://tools.ietf.org/html/rfc7231#section-6.3.5) | No Content | |

To perform this operation, you must be authenticated by means of one of the following methods: **CoderSessionToken**.

Expand Down
2 changes: 1 addition & 1 deletion scripts/apidocgen/markdown-template/responses.def
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
break;
}
if (!content) {
return "no schema";
return "";
}

var ref = content.schema["x-widdershins-oldRef"];
Expand Down