Skip to content

Commit

Permalink
update meta schema
Browse files Browse the repository at this point in the history
  • Loading branch information
nvnieuwk committed May 3, 2024
1 parent 685b424 commit 512fc54
Showing 1 changed file with 100 additions and 8 deletions.
108 changes: 100 additions & 8 deletions parameters_meta_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,15 @@
"required": {
"type": "array"
},
"dependentRequired": {
"type": "object",
"additionalProperties": {
"type": "array",
"items": { "type": "string" },
"uniqueItems": true,
"default": []
}
},
"properties": {
"type": "object",
"patternProperties": {
Expand All @@ -69,12 +78,44 @@
],
"properties": {
"type": {
"type": "string",
"enum": ["string", "boolean", "integer", "number"]
"anyOf": [
{
"$ref": "#/$defs/typeAnnotation"
},
{
"type": "array",
"items": {
"$ref": "#/$defs/typeAnnotation"
}
}
]
},
"format": {
"type": "string",
"enum": ["file-path", "directory-path", "path", "file-path-pattern"]
"enum": [
"file-path",
"directory-path",
"path",
"file-path-pattern",
"date-time",
"date",
"time",
"duration",
"email",
"idn-email",
"hostname",
"id-hostname",
"ipv4",
"ipv6",
"uuid",
"uri",
"uri-reference",
"iri",
"iri-reference",
"uri-template",
"json-pointer",
"regex"
]
},
"exists": {
"type": "boolean"
Expand All @@ -85,6 +126,7 @@
},
"pattern": {
"type": "string",
"format": "regex",
"minLength": 1
},
"schema": {
Expand All @@ -105,20 +147,51 @@
"type": "string",
"minLength": 1
},
"default": {
"$ref": "#/$def/allTypes"
},
"examples": {
"type": "array",
"items": {
"$ref": "#/$def/allTypes"
}
},
"deprecated": {
"type": "boolean"
},
"hidden": {
"type": "boolean"
},
"minLength": {
"type": "integer"
"$ref": "#/$def/nonNegativeInteger"
},
"maxLength": {
"type": "integer"
"$ref": "#/$def/nonNegativeInteger"
},
"minimum": {
"type": "integer"
"type": "number"
},
"exclusiveMinimum": {
"type": "number"
},
"maximum": {
"type": "integer"
"type": "number"
},
"exclusiveMaximum": {
"type": "number"
},
"multipleOf": {
"type": "number"
},
"enum": {
"type": "array",
"uniqueItems": true,
"items": {
"$ref": "#/$def/allTypes"
}
},
"const": {
"$ref": "#/$def/allTypes"
}
}
}
Expand Down Expand Up @@ -151,5 +224,24 @@
"title",
"description",
"type"
]
],
"$defs": {
"typeAnnotation": {
"type": "string",
"enum": [
"string",
"boolean",
"integer",
"number",
"null"
]
},
"allTypes": {
"type": ["integer", "boolean", "number", "string", "null"]
},
"nonNegativeInteger": {
"type": "integer",
"minimum": 0
}
}
}

0 comments on commit 512fc54

Please sign in to comment.