only modify key parts of schemas/community_submission.v1.schema.json schema. Lowest diffs

This commit is contained in:
ggman12
2026-02-12 15:55:44 -05:00
parent b0503bb3b2
commit 7e0a396fc7
+3 -12
View File
@@ -58,18 +58,9 @@ def generate_updated_schema(base_schema: dict, tag_registry: dict[str, str]) ->
for tag_name, type_name in sorted(tag_registry.items()):
tag_properties[tag_name] = type_name_to_json_schema(type_name)
# Update tags definition
schema["properties"]["tags"] = {
"type": "object",
"description": "Community-defined tags. New tags can be added, but must use consistent types.",
"propertyNames": {
"type": "string",
"pattern": "^[a-z][a-z0-9_]{0,63}$"
},
"properties": tag_properties,
# Still allow additional properties for new tags
"additionalProperties": {"$ref": "#/$defs/tagValue"}
}
# Only add/update the properties key within tags, preserve everything else
if "properties" in schema and "tags" in schema["properties"]:
schema["properties"]["tags"]["properties"] = tag_properties
return schema