Skip to content

docs: move api and cli docs routes to reference/ #14241

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 16 commits into from
Aug 13, 2024
Next Next commit
docs: move api and cli docs under reference
  • Loading branch information
matifali committed Aug 13, 2024
commit 06268434eba2fe3d964ee94544bca45aa96e17e8
4 changes: 2 additions & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Generated files
coderd/apidoc/docs.go linguist-generated=true
docs/api/*.md linguist-generated=true
docs/cli/*.md linguist-generated=true
docs/reference/api/*.md linguist-generated=true
docs/reference/cli/*.md linguist-generated=true
coderd/apidoc/swagger.json linguist-generated=true
coderd/database/dump.sql linguist-generated=true
peerbroker/proto/*.go linguist-generated=true
Expand Down
4 changes: 2 additions & 2 deletions .prettierrc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ tabWidth: 2
overrides:
- files:
- README.md
- docs/api/**/*.md
- docs/cli/**/*.md
- docs/reference/api/**/*.md
- docs/reference/cli/**/*.md
- docs/changelogs/*.md
- .github/**/*.{yaml,yml,toml}
- scripts/**/*.{yaml,yml,toml}
Expand Down
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,8 @@
"**/*.gen.json": true,
"**/testdata/*": true,
"coderd/apidoc/**": true,
"docs/api/*.md": true,
"docs/reference/api/*.md": true,
"docs/reference/cli/*.md": true,
"docs/templates/*.md": true,
"LICENSE": true,
"scripts/metricsdocgen/metrics": true,
Expand Down
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ gen: \
codersdk/rbacresources_gen.go \
site/src/api/rbacresources_gen.ts \
docs/admin/prometheus.md \
docs/cli.md \
docs/reference/cli/README.md \
docs/admin/audit-logs.md \
coderd/apidoc/swagger.json \
.prettierignore.include \
Expand Down Expand Up @@ -521,7 +521,7 @@ gen/mark-fresh:
codersdk/rbacresources_gen.go \
site/src/api/rbacresources_gen.ts \
docs/admin/prometheus.md \
docs/cli.md \
docs/reference/cli/README.md \
docs/admin/audit-logs.md \
coderd/apidoc/swagger.json \
.prettierignore.include \
Expand Down Expand Up @@ -633,10 +633,10 @@ docs/admin/prometheus.md: scripts/metricsdocgen/main.go scripts/metricsdocgen/me
./scripts/pnpm_install.sh
pnpm exec prettier --write ./docs/admin/prometheus.md

docs/cli.md: scripts/clidocgen/main.go examples/examples.gen.json $(GO_SRC_FILES)
docs/reference/cli/README.md: scripts/clidocgen/main.go examples/examples.gen.json $(GO_SRC_FILES)
CI=true BASE_PATH="." go run ./scripts/clidocgen
./scripts/pnpm_install.sh
pnpm exec prettier --write ./docs/cli.md ./docs/cli/*.md ./docs/manifest.json
pnpm exec prettier --write ./docs/reference/cli/README.md ./docs/reference/cli/*.md ./docs/manifest.json

docs/admin/audit-logs.md: coderd/database/querier.go scripts/auditdocgen/main.go enterprise/audit/table.go coderd/rbac/object_gen.go
go run scripts/auditdocgen/main.go
Expand All @@ -646,7 +646,7 @@ docs/admin/audit-logs.md: coderd/database/querier.go scripts/auditdocgen/main.go
coderd/apidoc/swagger.json: $(shell find ./scripts/apidocgen $(FIND_EXCLUSIONS) -type f) $(wildcard coderd/*.go) $(wildcard enterprise/coderd/*.go) $(wildcard codersdk/*.go) $(wildcard enterprise/wsproxy/wsproxysdk/*.go) $(DB_GEN_FILES) .swaggo docs/manifest.json coderd/rbac/object_gen.go
./scripts/apidocgen/generate.sh
./scripts/pnpm_install.sh
pnpm exec prettier --write ./docs/api ./docs/manifest.json ./coderd/apidoc/swagger.json
pnpm exec prettier --write ./docs/reference/api ./docs/manifest.json ./coderd/apidoc/swagger.json

update-golden-files: \
cli/testdata/.gen-golden \
Expand Down
46 changes: 23 additions & 23 deletions docs/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -546,99 +546,99 @@
{
"title": "API",
"description": "Learn how to use Coderd API",
"path": "./api/index.md",
"path": "./reference/api/README.md",
"icon_path": "./images/icons/api.svg",
"children": [
{
"title": "General",
"path": "./api/general.md"
"path": "./reference/api/general.md"
},
{
"title": "Agents",
"path": "./api/agents.md"
"path": "./reference/api/agents.md"
},
{
"title": "Applications",
"path": "./api/applications.md"
"path": "./reference/api/applications.md"
},
{
"title": "Audit",
"path": "./api/audit.md"
"path": "./reference/api/audit.md"
},
{
"title": "Authentication",
"path": "./api/authentication.md"
"path": "./reference/api/authentication.md"
},
{
"title": "Authorization",
"path": "./api/authorization.md"
"path": "./reference/api/authorization.md"
},
{
"title": "Builds",
"path": "./api/builds.md"
"path": "./reference/api/builds.md"
},
{
"title": "Debug",
"path": "./api/debug.md"
"path": "./reference/api/debug.md"
},
{
"title": "Enterprise",
"path": "./api/enterprise.md"
"path": "./reference/api/enterprise.md"
},
{
"title": "Files",
"path": "./api/files.md"
"path": "./reference/api/files.md"
},
{
"title": "Git",
"path": "./api/git.md"
"path": "./reference/api/git.md"
},
{
"title": "Insights",
"path": "./api/insights.md"
"path": "./reference/api/insights.md"
},
{
"title": "Members",
"path": "./api/members.md"
"path": "./reference/api/members.md"
},
{
"title": "Notifications",
"path": "./api/notifications.md"
"path": "./reference/api/notifications.md"
},
{
"title": "Organizations",
"path": "./api/organizations.md"
"path": "./reference/api/organizations.md"
},
{
"title": "PortSharing",
"path": "./api/portsharing.md"
"path": "./reference/api/portsharing.md"
},
{
"title": "Schemas",
"path": "./api/schemas.md"
"path": "./reference/api/schemas.md"
},
{
"title": "Templates",
"path": "./api/templates.md"
"path": "./reference/api/templates.md"
},
{
"title": "Users",
"path": "./api/users.md"
"path": "./reference/api/users.md"
},
{
"title": "WorkspaceProxies",
"path": "./api/workspaceproxies.md"
"path": "./reference/api/workspaceproxies.md"
},
{
"title": "Workspaces",
"path": "./api/workspaces.md"
"path": "./reference/api/workspaces.md"
}
]
},
{
"title": "Command Line",
"description": "Learn how to use Coder CLI",
"path": "./cli.md",
"path": "./reference/README.md",
"icon_path": "./images/icons/terminal.svg",
"children": [
{
Expand Down
File renamed without changes.
48 changes: 32 additions & 16 deletions docs/api/agents.md → docs/reference/api/agents.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion docs/api/audit.md → docs/reference/api/audit.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading