mirror of
https://github.com/sourcegraph/sourcegraph.git
synced 2026-02-06 20:31:48 +00:00
fix #4008 All JSON documents we use (for settings, site config, external services, and extension manifests) support trailing commas on the frontend and backend. However, an upgrade to monaco-editor unexpectedly caused the Monaco JSON editors in our UI to show red squiggly errors for trailing commas. The (undocumented) way to do this is to add `allowComments` to the root of the JSON Schema. It is not sufficient to set `allowComments: true` in a `monaco.languages.json.jsonDefaults.setDiagnosticsOptions` call. I found this secret fix by finding https://github.com/microsoft/vscode/issues/19992#issuecomment-347124969 and then inferring what changes that might entail, to discover `allowComments` in the JSON Schema is responsible for ignoring trailing comma errors.
106 lines
5.0 KiB
Go
106 lines
5.0 KiB
Go
// Code generated by stringdata. DO NOT EDIT.
|
|
|
|
package schema
|
|
|
|
// AWSCodeCommitSchemaJSON is the content of the file "aws_codecommit.schema.json".
|
|
const AWSCodeCommitSchemaJSON = `{
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
"$id": "aws_codecommit.schema.json#",
|
|
"title": "AWSCodeCommitConnection",
|
|
"description": "Configuration for a connection to AWS CodeCommit.",
|
|
"allowComments": true,
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["region", "accessKeyID", "secretAccessKey", "gitCredentials"],
|
|
"properties": {
|
|
"region": {
|
|
"description": "The AWS region in which to access AWS CodeCommit. See the list of supported regions at https://docs.aws.amazon.com/codecommit/latest/userguide/regions.html#regions-git.",
|
|
"type": "string",
|
|
"default": "us-east-1",
|
|
"pattern": "^[a-z\\d-]+$",
|
|
"enum": [
|
|
"ap-northeast-1",
|
|
"ap-northeast-2",
|
|
"ap-south-1",
|
|
"ap-southeast-1",
|
|
"ap-southeast-2",
|
|
"ca-central-1",
|
|
"eu-central-1",
|
|
"eu-west-1",
|
|
"eu-west-2",
|
|
"eu-west-3",
|
|
"sa-east-1",
|
|
"us-east-1",
|
|
"us-east-2",
|
|
"us-west-1",
|
|
"us-west-2"
|
|
]
|
|
},
|
|
"accessKeyID": {
|
|
"description": "The AWS access key ID to use when listing and updating repositories from AWS CodeCommit. Must have the AWSCodeCommitReadOnly IAM policy.",
|
|
"type": "string"
|
|
},
|
|
"secretAccessKey": {
|
|
"description": "The AWS secret access key (that corresponds to the AWS access key ID set in ` + "`" + `accessKeyID` + "`" + `).",
|
|
"type": "string"
|
|
},
|
|
"gitCredentials": {
|
|
"title": "AWSCodeCommitGitCredentials",
|
|
"description": "The Git credentials used for authentication when cloning an AWS CodeCommit repository over HTTPS.\n\nSee the AWS CodeCommit documentation on Git credentials for CodeCommit: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_ssh-keys.html#git-credentials-code-commit.\nFor detailed instructions on how to create the credentials in IAM, see this page: https://docs.aws.amazon.com/codecommit/latest/userguide/setting-up-gc.html",
|
|
"type": "object",
|
|
"required": ["username", "password"],
|
|
"properties": {
|
|
"username": {
|
|
"description": "The Git username",
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"password": {
|
|
"description": "The Git password",
|
|
"type": "string",
|
|
"minLength": 1
|
|
}
|
|
}
|
|
},
|
|
"repositoryPathPattern": {
|
|
"description": "The pattern used to generate a the corresponding Sourcegraph repository name for an AWS CodeCommit repository. In the pattern, the variable \"{name}\" is replaced with the repository's name.\n\nFor example, if your Sourcegraph instance is at https://src.example.com, then a repositoryPathPattern of \"awsrepos/{name}\" would mean that a AWS CodeCommit repository named \"myrepo\" is available on Sourcegraph at https://src.example.com/awsrepos/myrepo.\n\nIt is important that the Sourcegraph repository name generated with this pattern be unique to this code host. If different code hosts generate repository names that collide, Sourcegraph's behavior is undefined.",
|
|
"type": "string",
|
|
"default": "{name}",
|
|
"examples": ["git-codecommit.us-west-1.amazonaws.com/{name}", "git-codecommit.eu-central-1.amazonaws.com/{name}"]
|
|
},
|
|
"initialRepositoryEnablement": {
|
|
"description": "Deprecated and ignored field which will be removed entirely in the next release. AWS CodeCommit repositories can no longer be enabled or disabled explicitly. Configure which repositories should not be mirrored via \"exclude\" instead.",
|
|
"type": "boolean",
|
|
"default": false
|
|
},
|
|
"exclude": {
|
|
"description": "A list of repositories to never mirror from AWS CodeCommit. \n\nSupports excluding by name ({\"name\": \"git-codecommit.us-west-1.amazonaws.com/repo-name\"}) or by ARN ({\"id\": \"arn:aws:codecommit:us-west-1:999999999999:name\"}).",
|
|
"type": "array",
|
|
"minItems": 1,
|
|
"items": {
|
|
"type": "object",
|
|
"title": "ExcludedAWSCodeCommitRepo",
|
|
"additionalProperties": false,
|
|
"anyOf": [{ "required": ["name"] }, { "required": ["id"] }],
|
|
"properties": {
|
|
"name": {
|
|
"description": "The name of an AWS CodeCommit repository (\"repo-name\") to exclude from mirroring.",
|
|
"type": "string",
|
|
"pattern": "^[\\w.-]+$"
|
|
},
|
|
"id": {
|
|
"description": "The ID of an AWS Code Commit repository (as returned by the AWS API) to exclude from mirroring. Use this to exclude the repository, even if renamed, or to differentiate between repositories with the same name in multiple regions.",
|
|
"type": "string",
|
|
"pattern": "^[\\w-]+$"
|
|
}
|
|
}
|
|
},
|
|
"examples": [
|
|
[{ "name": "go-monorepo" }, { "id": "f001337a-3450-46fd-b7d2-650c0EXAMPLE" }],
|
|
[{ "name": "go-monorepo" }, { "name": "go-client" }]
|
|
]
|
|
}
|
|
}
|
|
}
|
|
`
|