Skip to content

docs: Add docs generation to schema build command #284

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 4 commits into from
Apr 30, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
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
101 changes: 2 additions & 99 deletions docs/docs/connections/bitbucket-cloud.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ sidebarTitle: Bitbucket Cloud

import BitbucketToken from '/snippets/bitbucket-token.mdx';
import BitbucketAppPassword from '/snippets/bitbucket-app-password.mdx';
import BitbucketSchema from '/snippets/schemas/v3/bitbucket.schema.mdx'

## Examples

Expand Down Expand Up @@ -98,104 +99,6 @@ In order to index private repositories, you'll need to provide authentication cr
<Accordion title="Reference">
[schemas/v3/bitbucket.json](https://github.com/sourcebot-dev/sourcebot/blob/main/schemas/v3/bitbucket.json)

```json
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"title": "BitbucketConnectionConfig",
"properties": {
"type": {
"const": "bitbucket",
"description": "Bitbucket configuration"
},
"user": {
"type": "string",
"description": "The username to use for authentication. Only needed if token is an app password."
},
"token": {
"$ref": "./shared.json#/definitions/Token",
"description": "An authentication token.",
"examples": [
{
"secret": "SECRET_KEY"
}
]
},
"url": {
"type": "string",
"format": "url",
"default": "https://api.bitbucket.org/2.0",
"description": "Bitbucket URL",
"examples": [
"https://bitbucket.example.com"
],
"pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$"
},
"deploymentType": {
"type": "string",
"enum": ["cloud", "server"],
"default": "cloud",
"description": "The type of Bitbucket deployment"
},
"workspaces": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of workspaces to sync. Ignored if deploymentType is server."
},
"projects": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of projects to sync"
},
"repos": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of repos to sync"
},
"exclude": {
"type": "object",
"properties": {
"archived": {
"type": "boolean",
"default": false,
"description": "Exclude archived repositories from syncing."
},
"forks": {
"type": "boolean",
"default": false,
"description": "Exclude forked repositories from syncing."
},
"repos": {
"type": "array",
"items": {
"type": "string"
},
"examples": [
[
"cloud_workspace/repo1",
"server_project/repo2"
]
],
"description": "List of specific repos to exclude from syncing."
}
},
"additionalProperties": false
},
"revisions": {
"$ref": "./shared.json#/definitions/GitRevisions"
}
},
"required": [
"type"
],
"additionalProperties": false
}
```
<BitbucketSchema />

</Accordion>
101 changes: 2 additions & 99 deletions docs/docs/connections/bitbucket-data-center.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ sidebarTitle: Bitbucket Data Center

import BitbucketToken from '/snippets/bitbucket-token.mdx';
import BitbucketAppPassword from '/snippets/bitbucket-app-password.mdx';
import BitbucketSchema from '/snippets/schemas/v3/bitbucket.schema.mdx'

## Examples

Expand Down Expand Up @@ -77,104 +78,6 @@ Next, provide the access token to Sourcebot:
<Accordion title="Reference">
[schemas/v3/bitbucket.json](https://github.com/sourcebot-dev/sourcebot/blob/main/schemas/v3/bitbucket.json)

```json
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"title": "BitbucketConnectionConfig",
"properties": {
"type": {
"const": "bitbucket",
"description": "Bitbucket configuration"
},
"user": {
"type": "string",
"description": "The username to use for authentication. Only needed if token is an app password."
},
"token": {
"$ref": "./shared.json#/definitions/Token",
"description": "An authentication token.",
"examples": [
{
"secret": "SECRET_KEY"
}
]
},
"url": {
"type": "string",
"format": "url",
"default": "https://api.bitbucket.org/2.0",
"description": "Bitbucket URL",
"examples": [
"https://bitbucket.example.com"
],
"pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$"
},
"deploymentType": {
"type": "string",
"enum": ["cloud", "server"],
"default": "cloud",
"description": "The type of Bitbucket deployment"
},
"workspaces": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of workspaces to sync. Ignored if deploymentType is server."
},
"projects": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of projects to sync"
},
"repos": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of repos to sync"
},
"exclude": {
"type": "object",
"properties": {
"archived": {
"type": "boolean",
"default": false,
"description": "Exclude archived repositories from syncing."
},
"forks": {
"type": "boolean",
"default": false,
"description": "Exclude forked repositories from syncing."
},
"repos": {
"type": "array",
"items": {
"type": "string"
},
"examples": [
[
"cloud_workspace/repo1",
"server_project/repo2"
]
],
"description": "List of specific repos to exclude from syncing."
}
},
"additionalProperties": false
},
"revisions": {
"$ref": "./shared.json#/definitions/GitRevisions"
}
},
"required": [
"type"
],
"additionalProperties": false
}
```
<BitbucketSchema />

</Accordion>
73 changes: 4 additions & 69 deletions docs/docs/connections/gerrit.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ title: Linking code from Gerrit
sidebarTitle: Gerrit
---

import GerritSchema from '/snippets/schemas/v3/gerrit.schema.mdx'

<Note>Authenticating with Gerrit is currently not supported. If you need this capability, please raise a [feature request](https://github.com/sourcebot-dev/sourcebot/discussions/categories/ideas).</Note>

Sourcebot can sync code from self-hosted gerrit instances.
Expand Down Expand Up @@ -69,73 +71,6 @@ To connect to a gerrit instance, provide the `url` property to your config:
<Accordion title="Reference">
[schemas/v3/gerrit.json](https://github.com/sourcebot-dev/sourcebot/blob/main/schemas/v3/gerrit.json)

```json
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"title": "GerritConnectionConfig",
"properties": {
"type": {
"const": "gerrit",
"description": "Gerrit Configuration"
},
"url": {
"type": "string",
"format": "url",
"description": "The URL of the Gerrit host.",
"examples": [
"https://gerrit.example.com"
],
"pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$"
},
"projects": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of specific projects to sync. If not specified, all projects will be synced. Glob patterns are supported",
"examples": [
[
"project1/repo1",
"project2/**"
]
]
},
"exclude": {
"type": "object",
"properties": {
"projects": {
"type": "array",
"items": {
"type": "string"
},
"examples": [
[
"project1/repo1",
"project2/**"
]
],
"description": "List of specific projects to exclude from syncing."
},
"readOnly": {
"type": "boolean",
"default": false,
"description": "Exclude read-only projects from syncing."
},
"hidden": {
"type": "boolean",
"default": false,
"description": "Exclude hidden projects from syncing."
}
},
"additionalProperties": false
}
},
"required": [
"type",
"url"
],
"additionalProperties": false
}
```
<GerritSchema />

</Accordion>
Loading