sourcegraph/schema/rust-packages.schema.json
Noah S-C 54d5960ca1
packages: improve and expand docs (#49774)
Updates and improves docs for package repos, including an overview page
with a section on filters, rust package repos and improvements to the
rendered extsvc schemas

## Test plan

N/A, docs changes
2023-03-21 17:47:57 +00:00

56 lines
2.3 KiB
JSON

{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "rust-packages.schema.json#",
"title": "RustPackagesConnection",
"description": "Configuration for a connection to Rust packages",
"allowComments": true,
"type": "object",
"additionalProperties": false,
"properties": {
"indexRepositoryName": {
"description": "Name of the git repository containing the crates.io index. Only set if you intend to sync every crate from the index. Updating this setting does not trigger a sync immediately, you must wait until the next scheduled sync for the value to get picked up.",
"title": "RustIndexRepositoryName",
"type": "string",
"examples": ["github.com/crates.io/index"]
},
"indexRepositorySyncInterval": {
"description": "How frequently to sync with the index repository. String formatted as a Go time.Duration. The Sourcegraph server needs to be restarted to pick up a new value of this configuration option.",
"title": "RustIndexRepositorySyncInterval",
"type": "string",
"examples": ["12h", "10s"],
"default": "12h"
},
"rateLimit": {
"description": "Rate limit applied when making background API requests to the configured Rust repository APIs.",
"title": "RustRateLimit",
"type": "object",
"required": ["enabled", "requestsPerHour"],
"properties": {
"enabled": {
"description": "true if rate limiting is enabled.",
"type": "boolean",
"default": true
},
"requestsPerHour": {
"description": "Requests per hour permitted. This is an average, calculated per second. Internally, the burst limit is set to 100, which implies that for a requests per hour limit as low as 1, users will continue to be able to send a maximum of 100 requests immediately, provided that the complexity cost of each request is 1.",
"type": "number",
"default": 3600,
"minimum": 0
}
},
"default": {
"enabled": true,
"requestsPerHour": 3600
}
},
"dependencies": {
"description": "An array of strings specifying Rust packages to mirror in Sourcegraph.",
"type": "array",
"items": {
"type": "string"
},
"examples": [["ripgrep@13.0.0"]]
}
}
}