Skip to content

Commit

Permalink
Added allowed schema value and property type
Browse files Browse the repository at this point in the history
  • Loading branch information
arschat committed Dec 17, 2024
1 parent 11d54af commit 98f85c8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/schema_linter.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

required_schema_fields = ['$schema', 'description', 'additionalProperties', 'title', 'name', 'type', 'properties']

allowed_schema_fields = ['$schema', 'description', 'additionalProperties', 'required', 'title', 'name', 'type', 'properties', 'definitions', 'dependencies', 'if', 'then', 'else', 'minProperties']
allowed_schema_fields = ['$schema', 'description', 'additionalProperties', 'required', 'title', 'name', 'type', 'properties', 'definitions', 'dependencies', 'if', 'then', 'else', 'allOf', 'minProperties']

# Properties

Expand Down Expand Up @@ -149,7 +149,7 @@ def lintSchema(self, path, ols_api):

for property_type in properties[property]['type']:
# type attribute must be set to one of the valid JSON types
if property_type not in ["string", "number", "boolean", "array", "object", "integer", None]:
if property_type not in ["string", "number", "boolean", "array", "object", "integer", "null"]:
errors.append(schema_filename + ".json: Type `" + property_type + "` is not a valid JSON type.")

# Property of type array must contain the attribute items
Expand Down

0 comments on commit 98f85c8

Please sign in to comment.