Skip to content

Instantly share code, notes, and snippets.

@karenetheridge
Created January 21, 2021 19:34
Show Gist options
  • Save karenetheridge/1239b063611b937c38713f6ac6a6eaa6 to your computer and use it in GitHub Desktop.
Save karenetheridge/1239b063611b937c38713f6ac6a6eaa6 to your computer and use it in GitHub Desktop.
commandline gist -bash
diff --git a/meta/applicator.json b/meta/applicator.json
index 8652779..61330c5 100644
--- a/meta/applicator.json
+++ b/meta/applicator.json
@@ -17,19 +17,16 @@
},
"properties": {
"type": "object",
- "additionalProperties": { "$dynamicRef": "#meta" },
- "default": {}
+ "additionalProperties": { "$dynamicRef": "#meta" }
},
"patternProperties": {
"type": "object",
"additionalProperties": { "$dynamicRef": "#meta" },
- "propertyNames": { "format": "regex" },
- "default": {}
+ "propertyNames": { "format": "regex" }
},
"dependentSchemas": {
"type": "object",
- "additionalProperties": { "$dynamicRef": "#meta" },
- "default": {}
+ "additionalProperties": { "$dynamicRef": "#meta" }
},
"propertyNames": {
"$dynamicRef": "#meta"
@@ -42,6 +39,19 @@
"oneOf": { "$ref": "#/$defs/schemaArray" },
"not": { "$dynamicRef": "#meta" }
},
+ "default": {
+ "items": true,
+ "contains": true,
+ "additionalProperties": true,
+ "properties": {},
+ "patternProperties": {},
+ "dependentSchemas": {},
+ "propertyNames": true,
+ "if": true,
+ "then": true,
+ "else": true,
+ "not": false
+ },
"$defs": {
"schemaArray": {
"type": "array",
diff --git a/meta/content.json b/meta/content.json
index 2f6e056..728279c 100644
--- a/meta/content.json
+++ b/meta/content.json
@@ -13,5 +13,8 @@
"contentEncoding": { "type": "string" },
"contentMediaType": { "type": "string" },
"contentSchema": { "$dynamicRef": "#meta" }
+ },
+ "default": {
+ "contentSchema": true
}
}
diff --git a/meta/core.json b/meta/core.json
index 7b5758b..bd7ef3f 100644
--- a/meta/core.json
+++ b/meta/core.json
@@ -31,7 +31,12 @@
},
"$defs": {
"type": "object",
- "additionalProperties": { "$dynamicRef": "#meta" },
+ "additionalProperties": { "$dynamicRef": "#meta" }
+ }
+ },
+ "default": {
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
+ "$defs": {
"default": {}
}
},
diff --git a/meta/meta-data.json b/meta/meta-data.json
index 05cbc22..816b8f4 100644
--- a/meta/meta-data.json
+++ b/meta/meta-data.json
@@ -18,20 +18,22 @@
},
"default": true,
"deprecated": {
- "type": "boolean",
- "default": false
+ "type": "boolean"
},
"readOnly": {
- "type": "boolean",
- "default": false
+ "type": "boolean"
},
"writeOnly": {
- "type": "boolean",
- "default": false
+ "type": "boolean"
},
"examples": {
"type": "array",
"items": true
}
+ },
+ "default": {
+ "deprecated": false,
+ "readOnly": false,
+ "writeOnly": false
}
}
diff --git a/meta/unevaluated.json b/meta/unevaluated.json
index 5f62a3f..7cdeca8 100644
--- a/meta/unevaluated.json
+++ b/meta/unevaluated.json
@@ -11,5 +11,9 @@
"properties": {
"unevaluatedItems": { "$dynamicRef": "#meta" },
"unevaluatedProperties": { "$dynamicRef": "#meta" }
+ },
+ "default": {
+ "unevaluatedItems": true,
+ "unevaluatedProperties": true
}
}
diff --git a/meta/validation.json b/meta/validation.json
index 1432ad8..270512a 100644
--- a/meta/validation.json
+++ b/meta/validation.json
@@ -50,13 +50,11 @@
"maxItems": { "$ref": "#/$defs/nonNegativeInteger" },
"minItems": { "$ref": "#/$defs/nonNegativeIntegerDefault0" },
"uniqueItems": {
- "type": "boolean",
- "default": false
+ "type": "boolean"
},
"maxContains": { "$ref": "#/$defs/nonNegativeInteger" },
"minContains": {
- "$ref": "#/$defs/nonNegativeInteger",
- "default": 1
+ "$ref": "#/$defs/nonNegativeInteger"
},
"maxProperties": { "$ref": "#/$defs/nonNegativeInteger" },
"minProperties": { "$ref": "#/$defs/nonNegativeIntegerDefault0" },
@@ -65,10 +63,14 @@
"type": "object",
"additionalProperties": {
"$ref": "#/$defs/stringArray"
- },
- "default": {}
+ }
}
},
+ "default": {
+ "uniqueItems": false,
+ "minContains": 1,
+ "dependentRequired": {}
+ },
"$defs": {
"nonNegativeInteger": {
"type": "integer",
diff --git a/schema.json b/schema.json
index a88709f..b94a6dc 100644
--- a/schema.json
+++ b/schema.json
@@ -29,7 +29,6 @@
"$comment": "\"definitions\" has been replaced by \"$defs\".",
"type": "object",
"additionalProperties": { "$dynamicRef": "#meta" },
- "default": {},
"deprecated": true
},
"dependencies": {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment