Skip to content

docs: applications and authorization #5477

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 15 commits into from
Dec 21, 2022
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: code sample trim empty line
  • Loading branch information
mtojek committed Dec 21, 2022
commit 4719a181308eb48d998c974ed97d5f40aec2d1bc
2 changes: 0 additions & 2 deletions docs/api/applications.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
# Example request using curl
curl -X GET http://coder-server:8080/api/v2/applications/auth-redirect \
-H 'Coder-Session-Token: API_KEY'

```

`GET /applications/auth-redirect`
Expand Down Expand Up @@ -38,7 +37,6 @@ To perform this operation, you must be authenticated by means of one of the foll
curl -X GET http://coder-server:8080/api/v2/applications/host \
-H 'Accept: application/json' \
-H 'Coder-Session-Token: API_KEY'

```

`GET /applications/host`
Expand Down
1 change: 0 additions & 1 deletion docs/api/authorization.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ curl -X POST http://coder-server:8080/api/v2/authcheck \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Coder-Session-Token: API_KEY'

```

`POST /authcheck`
Expand Down
5 changes: 0 additions & 5 deletions docs/api/templates.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ curl -X POST http://coder-server:8080/api/v2/organizations/{organization-id}/tem
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Coder-Session-Token: API_KEY'

```

`POST /organizations/{organization-id}/templates/`
Expand Down Expand Up @@ -99,7 +98,6 @@ To perform this operation, you must be authenticated by means of one of the foll
curl -X GET http://coder-server:8080/api/v2/organizations/{organization}/templates \
-H 'Accept: application/json' \
-H 'Coder-Session-Token: API_KEY'

```

`GET /organizations/{organization}/templates`
Expand Down Expand Up @@ -192,7 +190,6 @@ To perform this operation, you must be authenticated by means of one of the foll
curl -X GET http://coder-server:8080/api/v2/organizations/{organization}/templates/{template-name} \
-H 'Accept: application/json' \
-H 'Coder-Session-Token: API_KEY'

```

`GET /organizations/{organization}/templates/{template-name}`
Expand Down Expand Up @@ -256,7 +253,6 @@ To perform this operation, you must be authenticated by means of one of the foll
curl -X GET http://coder-server:8080/api/v2/templates/{id} \
-H 'Accept: application/json' \
-H 'Coder-Session-Token: API_KEY'

```

`GET /templates/{id}`
Expand Down Expand Up @@ -319,7 +315,6 @@ To perform this operation, you must be authenticated by means of one of the foll
curl -X DELETE http://coder-server:8080/api/v2/templates/{id} \
-H 'Accept: application/json' \
-H 'Coder-Session-Token: API_KEY'

```

`DELETE /templates/{id}`
Expand Down
9 changes: 0 additions & 9 deletions docs/api/workspaces.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
curl -X POST http://coder-server:8080/api/v2/organizations/{organization}/members/{user}/workspaces \
-H 'Accept: application/json' \
-H 'Coder-Session-Token: API_KEY'

```

`POST /organizations/{organization}/members/{user}/workspaces`
Expand Down Expand Up @@ -175,7 +174,6 @@ To perform this operation, you must be authenticated by means of one of the foll
curl -X GET http://coder-server:8080/api/v2/users/{user}/workspace/{workspacename} \
-H 'Accept: application/json' \
-H 'Coder-Session-Token: API_KEY'

```

`GET /users/{user}/workspace/{workspacename}`
Expand Down Expand Up @@ -340,7 +338,6 @@ To perform this operation, you must be authenticated by means of one of the foll
curl -X GET http://coder-server:8080/api/v2/workspaces \
-H 'Accept: application/json' \
-H 'Coder-Session-Token: API_KEY'

```

`GET /workspaces`
Expand Down Expand Up @@ -526,7 +523,6 @@ To perform this operation, you must be authenticated by means of one of the foll
curl -X GET http://coder-server:8080/api/v2/workspaces/{id} \
-H 'Accept: application/json' \
-H 'Coder-Session-Token: API_KEY'

```

`GET /workspaces/{id}`
Expand Down Expand Up @@ -690,7 +686,6 @@ To perform this operation, you must be authenticated by means of one of the foll
curl -X PATCH http://coder-server:8080/api/v2/workspaces/{workspace} \
-H 'Content-Type: application/json' \
-H 'Coder-Session-Token: API_KEY'

```

`PATCH /workspaces/{workspace}`
Expand Down Expand Up @@ -727,7 +722,6 @@ To perform this operation, you must be authenticated by means of one of the foll
curl -X PUT http://coder-server:8080/api/v2/workspaces/{workspace}/autostart \
-H 'Content-Type: application/json' \
-H 'Coder-Session-Token: API_KEY'

```

`PUT /workspaces/{workspace}/autostart`
Expand Down Expand Up @@ -765,7 +759,6 @@ curl -X PUT http://coder-server:8080/api/v2/workspaces/{workspace}/extend \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Coder-Session-Token: API_KEY'

```

`PUT /workspaces/{workspace}/extend`
Expand Down Expand Up @@ -819,7 +812,6 @@ To perform this operation, you must be authenticated by means of one of the foll
curl -X PUT http://coder-server:8080/api/v2/workspaces/{workspace}/ttl \
-H 'Content-Type: application/json' \
-H 'Coder-Session-Token: API_KEY'

```

`PUT /workspaces/{workspace}/ttl`
Expand Down Expand Up @@ -856,7 +848,6 @@ To perform this operation, you must be authenticated by means of one of the foll
curl -X GET http://coder-server:8080/api/v2/workspaces/{workspace}/watch \
-H 'Accept: text/event-stream' \
-H 'Coder-Session-Token: API_KEY'

```

`GET /workspaces/{workspace}/watch`
Expand Down
4 changes: 2 additions & 2 deletions scripts/apidocgen/markdown-template/code_shell.dot
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Example request using curl
curl -X {{=data.methodUpper}} http://coder-server:8080{{=data.url}}{{=data.requiredQueryString}}{{?data.allHeaders.length}} \{{?}}
{{~data.allHeaders :p:index}} -H '{{=p.name}}: {{=p.exampleValues.object}}'{{?index < data.allHeaders.length-1}} \{{?}}
{{~}}
{{~data.allHeaders :p:index}} -H '{{=p.name}}: {{=p.exampleValues.object}}'{{?index < data.allHeaders.length-1}} \
{{?}}{{~}}
8 changes: 7 additions & 1 deletion scripts/apidocgen/markdown-template/operation.dot
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
{{
function renderCodeSample(data) {
const originalCodeSample = data.utils.getCodeSamples(data);
return originalCodeSample.replace("\n```\n", "```\n")
}
}}
{{= data.tags.section }}

## {{= data.operationUniqueName}}
Expand All @@ -14,7 +20,7 @@
{{? data.options.codeSamples || data.operation["x-code-samples"] }}
### Code samples

{{= data.utils.getCodeSamples(data)}}
{{=renderCodeSample(data)}}
{{?}}

`{{= data.methodUpper}} {{=data.method.path}}`
Expand Down