Skip to content

docs: API templateversions, templates, members, organizations #5546

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 26 commits into from
Jan 11, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
Fix: x-apidocgen
  • Loading branch information
mtojek committed Jan 4, 2023
commit ae06598c9f37fed78427efe22dffe93c100053c3
1 change: 1 addition & 0 deletions coderd/apidoc/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -2796,6 +2796,7 @@ const docTemplate = `{
}
},
"codersdk.PostWorkspaceAgentVersionRequest": {
"description": "x-apidocgen:skip",
"type": "object",
"properties": {
"version": {
Expand Down
1 change: 1 addition & 0 deletions coderd/apidoc/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -2516,6 +2516,7 @@
}
},
"codersdk.PostWorkspaceAgentVersionRequest": {
"description": "x-apidocgen:skip",
"type": "object",
"properties": {
"version": {
Expand Down
1 change: 1 addition & 0 deletions codersdk/workspaceagents.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ type WorkspaceAgentConnectionInfo struct {
}

// @typescript-ignore PostWorkspaceAgentVersionRequest
// @Description x-apidocgen:skip
type PostWorkspaceAgentVersionRequest struct {
Version string `json:"version"`
}
Expand Down
35 changes: 0 additions & 35 deletions docs/api/agents.md
Original file line number Diff line number Diff line change
Expand Up @@ -437,38 +437,3 @@ curl -X POST http://coder-server:8080/api/v2/workspaceagents/me/report-stats \
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [codersdk.AgentStatsResponse](schemas.md#codersdkagentstatsresponse) |

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

## Submit workspace agent version

### Code samples

```shell
# Example request using curl
curl -X POST http://coder-server:8080/api/v2/workspaceagents/me/version \
-H 'Content-Type: application/json' \
-H 'Coder-Session-Token: API_KEY'
```

`POST /workspaceagents/me/version`

> Body parameter

```json
{
"version": "string"
}
```

### Parameters

| Name | In | Type | Required | Description |
| ------ | ---- | ------------------------------------------------------------------------------------------------ | -------- | --------------- |
| `body` | body | [codersdk.PostWorkspaceAgentVersionRequest](schemas.md#codersdkpostworkspaceagentversionrequest) | true | Version request |

### Responses

| Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | ------ |
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | |

To perform this operation, you must be authenticated by means of one of the following methods: **CoderSessionToken**.
14 changes: 0 additions & 14 deletions docs/api/schemas.md
Original file line number Diff line number Diff line change
Expand Up @@ -2276,20 +2276,6 @@ Parameter represents a set value for the scope.
| `source_scheme` | `none` |
| `source_scheme` | `data` |

## codersdk.PostWorkspaceAgentVersionRequest

```json
{
"version": "string"
}
```

### Properties

| Name | Type | Required | Restrictions | Description |
| --------- | ------ | -------- | ------------ | ----------- |
| `version` | string | false | | |

## codersdk.PostWorkspaceAppHealthsRequest

```json
Expand Down
11 changes: 8 additions & 3 deletions scripts/apidocgen/markdown-template/main.dot
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,14 @@

> This page is incomplete, stay tuned.

{{ for (var s in data.components.schemas) { }}
{{ var origSchema = data.components.schemas[s]; }}
{{ var schema = data.api.components.schemas[s]; }}
{{ for (var s in data.components.schemas) {
var origSchema = data.components.schemas[s];
var schema = data.api.components.schemas[s];

if (schema.description && schema.description.startsWith("x-apidocgen:skip")) {
continue;
}
}}

{{= data.tags.section }}
## {{=s}}
Expand Down
6 changes: 6 additions & 0 deletions scripts/apidocgen/markdown-template/operation.dot
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@

## {{= data.operationUniqueName}}

{{
if (data.operation['x-apidocgen'] && data.operation['x-apidocgen'].skip) {
return "";
}
}}

{{ data.methodUpper = data.method.verb.toUpperCase(); }}
{{ data.url = data.utils.slashes(data.baseUrl + data.method.path); }}
{{ data.parameters = data.operation.parameters; }}
Expand Down