summaryrefslogtreecommitdiff
path: root/spec/fixtures
diff options
context:
space:
mode:
authormo khan <mo.khan@gmail.com>2020-01-15 14:41:14 -0700
committermo khan <mo.khan@gmail.com>2020-01-15 15:03:09 -0700
commitac9634d8f8c6bbaa8348929f42d53d2b375f6dfb (patch)
treed54a73c7bd9172fa5e7dbec4dd05f3f639f7831b /spec/fixtures
parent3aeed26912b238f6cb9c8b43587b0f3a7bf181f4 (diff)
Add a json schema for dependency
Diffstat (limited to 'spec/fixtures')
-rw-r--r--spec/fixtures/schema/v2.0.json (renamed from spec/fixtures/v2.0_schema.json)4
-rw-r--r--spec/fixtures/schema/v2.0_dependency.json27
2 files changed, 29 insertions, 2 deletions
diff --git a/spec/fixtures/v2.0_schema.json b/spec/fixtures/schema/v2.0.json
index bd304ce..3377a9d 100644
--- a/spec/fixtures/v2.0_schema.json
+++ b/spec/fixtures/schema/v2.0.json
@@ -1,5 +1,5 @@
{
- "$id": "https://gitlab.com/gitlab-org/security-products/license-management/blob/master/spec/fixtures/v2.0_schema.json",
+ "$id": "https://gitlab.com/gitlab-org/security-products/license-management/blob/master/spec/fixtures/schema/v2.0.json",
"type": "object",
"required": [
"version",
@@ -9,7 +9,7 @@
"properties": {
"version": { "type": "string" },
"licenses": { "type": "array" },
- "dependencies": { "type": "array" }
+ "dependencies": { "$ref": "v2.0_dependency.json" }
},
"additionalProperties": false
}
diff --git a/spec/fixtures/schema/v2.0_dependency.json b/spec/fixtures/schema/v2.0_dependency.json
new file mode 100644
index 0000000..fcd96d7
--- /dev/null
+++ b/spec/fixtures/schema/v2.0_dependency.json
@@ -0,0 +1,27 @@
+{
+ "type": "array",
+ "required": [
+ "name",
+ "url",
+ "description",
+ "paths",
+ "licenses"
+ ],
+ "properties": {
+ "name": { "type": "string" },
+ "url": { "type": "uri" },
+ "description": { "type": "string" },
+ "paths": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "licenses": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ }
+}