Skip to content

Commit 7a3a6bd

Browse files
Add docs generation as part of schema generation process
1 parent 1507364 commit 7a3a6bd

25 files changed

+3275
-1521
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: 6 additions & 59 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.
@@ -60,66 +62,11 @@ To connect to a gerrit instance, provide the `url` property to your config:
6062

6163
## Schema reference
6264

65+
{/* asdf */}
66+
6367
<Accordion title="Reference">
6468
[schemas/v3/gerrit.json](https://github.com/sourcebot-dev/sourcebot/blob/main/schemas/v3/gerrit.json)
6569

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

0 commit comments

Comments
 (0)