Skip to content
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
26 changes: 25 additions & 1 deletion src/api/json/catalog.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,12 @@
"fileMatch": ["accelerator.yaml"],
"url": "https://www.schemastore.org/accelerator.json"
},
{
"name": "amplify.yml",
"description": "AWS Amplify Console build settings file",
"fileMatch": ["amplify.yml", "amplify.yaml"],
"url": "https://www.schemastore.org/amplify.json"
},
{
"name": "Applicant Profile Protocol",
"description": "Structured JSON format for professional profiles, resumes, and CVs with skills, experience, education, and certifications",
Expand Down Expand Up @@ -4603,6 +4609,19 @@
"v0.9.0": "https://github.com/bitol-io/open-data-product-standard/blob/main/schema/odps-json-schema-v0.9.0.json"
}
},
{
"name": "OpenSRM",
"description": "Open Service Reliability Manifest - Define service reliability requirements as code",
"fileMatch": [
"service.reliability.yaml",
"service.reliability.yml",
"*.reliability.yaml",
"*.reliability.yml",
".opensrm.yaml",
".opensrm.yml"
],
"url": "https://www.schemastore.org/opensrm.json"
},
{
"name": "Outblocks project configuration",
"description": "Outblocks project configuration files",
Expand Down Expand Up @@ -5479,6 +5498,7 @@
],
"url": "https://docs.renovatebot.com/renovate-schema.json",
"versions": {
"42": "https://www.schemastore.org/renovate-42.json",
"41": "https://www.schemastore.org/renovate-41.json",
"40": "https://www.schemastore.org/renovate-40.json",
"39": "https://www.schemastore.org/renovate-39.json"
Expand All @@ -5490,14 +5510,18 @@
"fileMatch": [],
"url": "https://docs.renovatebot.com/renovate-global-schema.json",
"versions": {
"42": "https://www.schemastore.org/renovate-global-schema-42.json",
"41": "https://www.schemastore.org/renovate-global-schema-41.json"
}
},
{
"name": "Renovate inherited configuration",
"description": "Renovate configuration file (with Inherit Config options). Documentation: https://docs.renovatebot.com/configuration-options",
"fileMatch": [],
"url": "https://docs.renovatebot.com/renovate-inherited-schema.json"
"url": "https://docs.renovatebot.com/renovate-inherited-schema.json",
"versions": {
"42": "https://www.schemastore.org/renovate-inherited-schema-42.json"
}
},
{
"name": "RenderCV",
Expand Down
18 changes: 18 additions & 0 deletions src/negative_test/opensrm/invalid-duration.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# yaml-language-server: $schema=../../schemas/json/opensrm.json
# This file is INVALID - duration must be in format like '500ms', '30s', '5m'
apiVersion: srm/v1
kind: ServiceReliabilityManifest
metadata:
name: invalid-duration
team: platform
tier: standard
spec:
type: api
slos:
availability:
target: 0.999
latency:
p99: 500 milliseconds
target: 0.99
ownership:
team: platform
15 changes: 15 additions & 0 deletions src/negative_test/opensrm/invalid-kind.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# yaml-language-server: $schema=../../schemas/json/opensrm.json
# This file is INVALID - kind must be 'ServiceReliabilityManifest' or 'Template'
apiVersion: srm/v1
kind: SLODefinition
metadata:
name: invalid-kind
team: platform
tier: standard
spec:
type: api
slos:
availability:
target: 0.999
ownership:
team: platform
15 changes: 15 additions & 0 deletions src/negative_test/opensrm/invalid-target.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# yaml-language-server: $schema=../../schemas/json/opensrm.json
# This file is INVALID - target must be between 0 and 1
apiVersion: srm/v1
kind: ServiceReliabilityManifest
metadata:
name: invalid-service
team: platform
tier: standard
spec:
type: api
slos:
availability:
target: 99.9
ownership:
team: platform
15 changes: 15 additions & 0 deletions src/negative_test/opensrm/invalid-type.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# yaml-language-server: $schema=../../schemas/json/opensrm.json
# This file is INVALID - 'cron' is not a valid service type
apiVersion: srm/v1
kind: ServiceReliabilityManifest
metadata:
name: my-cron-job
team: platform
tier: standard
spec:
type: cron
slos:
availability:
target: 0.999
ownership:
team: platform
14 changes: 14 additions & 0 deletions src/negative_test/opensrm/missing-name.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# yaml-language-server: $schema=../../schemas/json/opensrm.json
# This file is INVALID - missing required 'name' field in metadata
apiVersion: srm/v1
kind: ServiceReliabilityManifest
metadata:
team: platform
tier: standard
spec:
type: api
slos:
availability:
target: 0.999
ownership:
team: platform
13 changes: 13 additions & 0 deletions src/schema-validation.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@
"nuget-project-3.3.0.json",
"nuget-project.json",
"openfin.json",
"opensrm.json",
"opspec-io-0.1.7.json",
"package.json",
"package.manifest-8.0.0.json",
Expand Down Expand Up @@ -190,7 +191,10 @@
"renovate-39.json",
"renovate-40.json",
"renovate-41.json",
"renovate-42.json",
"renovate-global-schema-41.json",
"renovate-global-schema-42.json",
"renovate-inherited-schema-42.json",
"resjson.json",
"sarif-1.0.0.json",
"size-limit.json",
Expand Down Expand Up @@ -1210,9 +1214,18 @@
"renovate-41.json": {
"unknownKeywords": ["allowComments", "x-renovate-version"]
},
"renovate-42.json": {
"unknownKeywords": ["allowComments", "x-renovate-version"]
},
"renovate-global-schema-41.json": {
"unknownKeywords": ["allowComments", "x-renovate-version"]
},
"renovate-global-schema-42.json": {
"unknownKeywords": ["allowComments", "x-renovate-version"]
},
"renovate-inherited-schema-42.json": {
"unknownKeywords": ["allowComments", "x-renovate-version"]
},
"rc3-collection-0.0.3.json": {
"externalSchema": ["rc3-auth-0.0.3.json"]
},
Expand Down
202 changes: 202 additions & 0 deletions src/schemas/json/amplify.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,202 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://json.schemastore.org/amplify.json",
"title": "AWS Amplify build specification (amplify.yml)",
"type": "object",
"properties": {
"version": {
"description": "Schema version (integer as in AWS examples)",
"type": "integer"
},
"env": {
"type": "object",
"properties": {
"variables": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"additionalProperties": true
},
"backend": {
"type": "object",
"properties": {
"phases": {
"type": "object",
"patternProperties": {
".*": {
"$ref": "#/definitions/phase"
}
},
"additionalProperties": false
}
},
"additionalProperties": true
},
"frontend": {
"type": "object",
"properties": {
"buildpath": {
"type": "string"
},
"phases": {
"type": "object",
"patternProperties": {
".*": {
"$ref": "#/definitions/phase"
}
},
"additionalProperties": false
},
"artifacts": {
"type": "object",
"properties": {
"files": {
"type": "array",
"items": {
"type": "string"
}
},
"discard-paths": {
"type": "boolean"
},
"baseDirectory": {
"type": "string"
}
},
"additionalProperties": false
},
"cache": {
"type": "object",
"properties": {
"paths": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
}
},
"additionalProperties": true
},
"test": {
"type": "object",
"properties": {
"phases": {
"type": "object",
"patternProperties": {
".*": {
"$ref": "#/definitions/phase"
}
},
"additionalProperties": false
},
"artifacts": {
"type": "object",
"properties": {
"files": {
"type": "array",
"items": {
"type": "string"
}
},
"configFilePath": {
"type": "string"
},
"baseDirectory": {
"type": "string"
}
},
"additionalProperties": false
}
},
"additionalProperties": true
}
},
"definitions": {
"phase": {
"type": "object",
"properties": {
"commands": {
"type": "array",
"items": {
"type": "string"
}
},
"runtime-versions": {
"description": "Optional object to specify runtime versions (e.g. nodejs: 12)",
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"additionalProperties": true
}
},
"additionalProperties": true,
"examples": [
{
"version": 1,
"env": {
"variables": {
"key": "value"
}
},
"backend": {
"phases": {
"preBuild": {
"commands": ["enter command"]
},
"build": {
"commands": ["enter command"]
},
"postBuild": {
"commands": ["enter command"]
}
}
},
"frontend": {
"buildpath": "",
"phases": {
"preBuild": {
"commands": ["cd react-app", "npm ci"]
},
"build": {
"commands": ["npm run build"]
}
},
"artifacts": {
"files": ["location"],
"discard-paths": true,
"baseDirectory": "location"
},
"cache": {
"paths": ["path"]
}
},
"test": {
"phases": {
"preTest": {
"commands": ["enter command"]
},
"test": {
"commands": ["enter command"]
},
"postTest": {
"commands": ["enter command"]
}
},
"artifacts": {
"files": ["location"],
"configFilePath": "location",
"baseDirectory": "location"
}
}
}
]
}
Loading