Skip to content

Commit

Permalink
refactor!: restrict addon name to valid programming variable name (#49)
Browse files Browse the repository at this point in the history
  • Loading branch information
halajohn authored Sep 26, 2024
1 parent ff084e5 commit ad6cebe
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 30 deletions.
4 changes: 2 additions & 2 deletions core/src/ten_rust/src/json_schema/data/manifest.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
"$ref": "#/$defs/packageType"
},
"name": {
"$ref": "#/$defs/notEmptyString"
"$ref": "#/$defs/alphanumericCharacters"
},
"version": {
"$ref": "#/$defs/versionRequirement"
Expand Down Expand Up @@ -383,7 +383,7 @@
"$ref": "#/$defs/packageType"
},
"name": {
"$ref": "#/$defs/notEmptyString"
"$ref": "#/$defs/alphanumericCharacters"
},
"version": {
"$ref": "#/$defs/version"
Expand Down
33 changes: 5 additions & 28 deletions core/src/ten_rust/src/json_schema/data/property.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,10 @@
"$ref": "#/$defs/notEmptyString"
},
"extension_group": {
"$ref": "#/$defs/addonInstance"
"$ref": "#/$defs/notEmptyString"
},
"extension": {
"$ref": "#/$defs/addonInstance"
"$ref": "#/$defs/notEmptyString"
},
"msg_conversion": {
"type": "object",
Expand Down Expand Up @@ -165,10 +165,10 @@
"$ref": "#/$defs/notEmptyString"
},
"extension_group": {
"$ref": "#/$defs/addonInstance"
"$ref": "#/$defs/notEmptyString"
},
"extension": {
"$ref": "#/$defs/addonInstance"
"$ref": "#/$defs/notEmptyString"
},
"msg_conversion": {
"$ref": "#/$defs/msgConversion"
Expand All @@ -194,7 +194,7 @@
"$ref": "#/$defs/notEmptyString"
},
"addon": {
"$ref": "#/$defs/notEmptyString"
"$ref": "#/$defs/alphanumericCharacters"
},
"app": {
"$ref": "#/$defs/notEmptyString"
Expand Down Expand Up @@ -376,29 +376,6 @@
"$ref": "#/$defs/dataDest"
}
},
"addonInstance": {
"oneOf": [
{
"$ref": "#/$defs/notEmptyString"
},
{
"type": "object",
"additionalProperties": false,
"required": [
"addon",
"name"
],
"properties": {
"addon": {
"$ref": "#/$defs/notEmptyString"
},
"name": {
"$ref": "#/$defs/notEmptyString"
}
}
}
]
},
"validPropertyObject": {
"type": "object",
"propertyNames": { // The property name should be alphanumericCharacters.
Expand Down

0 comments on commit ad6cebe

Please sign in to comment.