Skip to content

Commit 0119510

Browse files
docs: Add docs generation to schema build command (#284)
1 parent 14ce633 commit 0119510

26 files changed

+3306
-1534
lines changed

docs/docs/connections/bitbucket-cloud.mdx

Lines changed: 2 additions & 99 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ sidebarTitle: Bitbucket Cloud
55

66
import BitbucketToken from '/snippets/bitbucket-token.mdx';
77
import BitbucketAppPassword from '/snippets/bitbucket-app-password.mdx';
8+
import BitbucketSchema from '/snippets/schemas/v3/bitbucket.schema.mdx'
89

910
## Examples
1011

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

101-
```json
102-
{
103-
"$schema": "http://json-schema.org/draft-07/schema#",
104-
"type": "object",
105-
"title": "BitbucketConnectionConfig",
106-
"properties": {
107-
"type": {
108-
"const": "bitbucket",
109-
"description": "Bitbucket configuration"
110-
},
111-
"user": {
112-
"type": "string",
113-
"description": "The username to use for authentication. Only needed if token is an app password."
114-
},
115-
"token": {
116-
"$ref": "./shared.json#/definitions/Token",
117-
"description": "An authentication token.",
118-
"examples": [
119-
{
120-
"secret": "SECRET_KEY"
121-
}
122-
]
123-
},
124-
"url": {
125-
"type": "string",
126-
"format": "url",
127-
"default": "https://api.bitbucket.org/2.0",
128-
"description": "Bitbucket URL",
129-
"examples": [
130-
"https://bitbucket.example.com"
131-
],
132-
"pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$"
133-
},
134-
"deploymentType": {
135-
"type": "string",
136-
"enum": ["cloud", "server"],
137-
"default": "cloud",
138-
"description": "The type of Bitbucket deployment"
139-
},
140-
"workspaces": {
141-
"type": "array",
142-
"items": {
143-
"type": "string"
144-
},
145-
"description": "List of workspaces to sync. Ignored if deploymentType is server."
146-
},
147-
"projects": {
148-
"type": "array",
149-
"items": {
150-
"type": "string"
151-
},
152-
"description": "List of projects to sync"
153-
},
154-
"repos": {
155-
"type": "array",
156-
"items": {
157-
"type": "string"
158-
},
159-
"description": "List of repos to sync"
160-
},
161-
"exclude": {
162-
"type": "object",
163-
"properties": {
164-
"archived": {
165-
"type": "boolean",
166-
"default": false,
167-
"description": "Exclude archived repositories from syncing."
168-
},
169-
"forks": {
170-
"type": "boolean",
171-
"default": false,
172-
"description": "Exclude forked repositories from syncing."
173-
},
174-
"repos": {
175-
"type": "array",
176-
"items": {
177-
"type": "string"
178-
},
179-
"examples": [
180-
[
181-
"cloud_workspace/repo1",
182-
"server_project/repo2"
183-
]
184-
],
185-
"description": "List of specific repos to exclude from syncing."
186-
}
187-
},
188-
"additionalProperties": false
189-
},
190-
"revisions": {
191-
"$ref": "./shared.json#/definitions/GitRevisions"
192-
}
193-
},
194-
"required": [
195-
"type"
196-
],
197-
"additionalProperties": false
198-
}
199-
```
102+
<BitbucketSchema />
200103

201104
</Accordion>

docs/docs/connections/bitbucket-data-center.mdx

Lines changed: 2 additions & 99 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ sidebarTitle: Bitbucket Data Center
55

66
import BitbucketToken from '/snippets/bitbucket-token.mdx';
77
import BitbucketAppPassword from '/snippets/bitbucket-app-password.mdx';
8+
import BitbucketSchema from '/snippets/schemas/v3/bitbucket.schema.mdx'
89

910
## Examples
1011

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

80-
```json
81-
{
82-
"$schema": "http://json-schema.org/draft-07/schema#",
83-
"type": "object",
84-
"title": "BitbucketConnectionConfig",
85-
"properties": {
86-
"type": {
87-
"const": "bitbucket",
88-
"description": "Bitbucket configuration"
89-
},
90-
"user": {
91-
"type": "string",
92-
"description": "The username to use for authentication. Only needed if token is an app password."
93-
},
94-
"token": {
95-
"$ref": "./shared.json#/definitions/Token",
96-
"description": "An authentication token.",
97-
"examples": [
98-
{
99-
"secret": "SECRET_KEY"
100-
}
101-
]
102-
},
103-
"url": {
104-
"type": "string",
105-
"format": "url",
106-
"default": "https://api.bitbucket.org/2.0",
107-
"description": "Bitbucket URL",
108-
"examples": [
109-
"https://bitbucket.example.com"
110-
],
111-
"pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$"
112-
},
113-
"deploymentType": {
114-
"type": "string",
115-
"enum": ["cloud", "server"],
116-
"default": "cloud",
117-
"description": "The type of Bitbucket deployment"
118-
},
119-
"workspaces": {
120-
"type": "array",
121-
"items": {
122-
"type": "string"
123-
},
124-
"description": "List of workspaces to sync. Ignored if deploymentType is server."
125-
},
126-
"projects": {
127-
"type": "array",
128-
"items": {
129-
"type": "string"
130-
},
131-
"description": "List of projects to sync"
132-
},
133-
"repos": {
134-
"type": "array",
135-
"items": {
136-
"type": "string"
137-
},
138-
"description": "List of repos to sync"
139-
},
140-
"exclude": {
141-
"type": "object",
142-
"properties": {
143-
"archived": {
144-
"type": "boolean",
145-
"default": false,
146-
"description": "Exclude archived repositories from syncing."
147-
},
148-
"forks": {
149-
"type": "boolean",
150-
"default": false,
151-
"description": "Exclude forked repositories from syncing."
152-
},
153-
"repos": {
154-
"type": "array",
155-
"items": {
156-
"type": "string"
157-
},
158-
"examples": [
159-
[
160-
"cloud_workspace/repo1",
161-
"server_project/repo2"
162-
]
163-
],
164-
"description": "List of specific repos to exclude from syncing."
165-
}
166-
},
167-
"additionalProperties": false
168-
},
169-
"revisions": {
170-
"$ref": "./shared.json#/definitions/GitRevisions"
171-
}
172-
},
173-
"required": [
174-
"type"
175-
],
176-
"additionalProperties": false
177-
}
178-
```
81+
<BitbucketSchema />
17982

18083
</Accordion>

docs/docs/connections/gerrit.mdx

Lines changed: 4 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ title: Linking code from Gerrit
33
sidebarTitle: Gerrit
44
---
55

6+
import GerritSchema from '/snippets/schemas/v3/gerrit.schema.mdx'
7+
68
<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>
79

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

72-
```json
73-
{
74-
"$schema": "http://json-schema.org/draft-07/schema#",
75-
"type": "object",
76-
"title": "GerritConnectionConfig",
77-
"properties": {
78-
"type": {
79-
"const": "gerrit",
80-
"description": "Gerrit Configuration"
81-
},
82-
"url": {
83-
"type": "string",
84-
"format": "url",
85-
"description": "The URL of the Gerrit host.",
86-
"examples": [
87-
"https://gerrit.example.com"
88-
],
89-
"pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$"
90-
},
91-
"projects": {
92-
"type": "array",
93-
"items": {
94-
"type": "string"
95-
},
96-
"description": "List of specific projects to sync. If not specified, all projects will be synced. Glob patterns are supported",
97-
"examples": [
98-
[
99-
"project1/repo1",
100-
"project2/**"
101-
]
102-
]
103-
},
104-
"exclude": {
105-
"type": "object",
106-
"properties": {
107-
"projects": {
108-
"type": "array",
109-
"items": {
110-
"type": "string"
111-
},
112-
"examples": [
113-
[
114-
"project1/repo1",
115-
"project2/**"
116-
]
117-
],
118-
"description": "List of specific projects to exclude from syncing."
119-
},
120-
"readOnly": {
121-
"type": "boolean",
122-
"default": false,
123-
"description": "Exclude read-only projects from syncing."
124-
},
125-
"hidden": {
126-
"type": "boolean",
127-
"default": false,
128-
"description": "Exclude hidden projects from syncing."
129-
}
130-
},
131-
"additionalProperties": false
132-
}
133-
},
134-
"required": [
135-
"type",
136-
"url"
137-
],
138-
"additionalProperties": false
139-
}
140-
```
74+
<GerritSchema />
75+
14176
</Accordion>

0 commit comments

Comments
 (0)