Release v1.0.122: document Action enumNames and column-bound static enum labels
All checks were successful
技能自动化发布 / release (push) Successful in 9s
All checks were successful
技能自动化发布 / release (push) Successful in 9s
This commit is contained in:
@@ -290,6 +290,29 @@ class TestActionsManifest(unittest.TestCase):
|
||||
action_props = schema["$defs"]["action"]["properties"]
|
||||
self.assertNotIn("visibleWhen", action_props)
|
||||
|
||||
def test_schema_defines_enum_names_on_input_property(self) -> None:
|
||||
schema = _load_actions_schema()
|
||||
props = schema["$defs"]["inputProperty"]["properties"]
|
||||
self.assertIn("enum", props)
|
||||
self.assertIn("enumNames", props)
|
||||
self.assertEqual(props["enumNames"].get("type"), "array")
|
||||
self.assertEqual(props["enumNames"].get("minItems"), 1)
|
||||
self.assertIn("column", props)
|
||||
|
||||
def test_enum_names_example_exists_and_aligns_labels(self) -> None:
|
||||
path = os.path.join(
|
||||
get_skill_root(), "assets", "examples", "enum-names-action.example.json"
|
||||
)
|
||||
self.assertTrue(os.path.isfile(path), msg="enum-names example must exist")
|
||||
with open(path, encoding="utf-8") as f:
|
||||
example = json.load(f)
|
||||
props = example["actions"][0]["inputSchema"]["properties"]
|
||||
category = props["category"]
|
||||
self.assertEqual(len(category["enum"]), len(category["enumNames"]))
|
||||
self.assertEqual(category.get("column"), "category")
|
||||
priority = props["priority"]
|
||||
self.assertEqual(len(priority["enum"]), len(priority["enumNames"]))
|
||||
|
||||
def test_default_manifest_omits_visible_when(self) -> None:
|
||||
for action in _load_actions_manifest()["actions"]:
|
||||
properties = ((action.get("inputSchema") or {}).get("properties")) or {}
|
||||
@@ -802,6 +825,9 @@ class TestActionsManifest(unittest.TestCase):
|
||||
"已选择",
|
||||
"revealInForm",
|
||||
"映射只读",
|
||||
"enumNames",
|
||||
"静态枚举 label",
|
||||
"绑列 options",
|
||||
):
|
||||
self.assertIn(marker, text, msg=f"ACTIONS.md missing {marker!r}")
|
||||
self.assertNotIn(
|
||||
|
||||
@@ -446,17 +446,27 @@ class TestDocsStandards(unittest.TestCase):
|
||||
),
|
||||
msg="lookup-paged-table.action.example.json missing",
|
||||
)
|
||||
self.assertTrue(
|
||||
os.path.isfile(
|
||||
os.path.join(get_skill_root(), "assets/examples/enum-names-action.example.json")
|
||||
),
|
||||
msg="enum-names-action.example.json missing",
|
||||
)
|
||||
checklist = self._read("development/CHECKLIST.md")
|
||||
self.assertIn("skill_cli", checklist)
|
||||
self.assertIn("A4-12", checklist)
|
||||
self.assertIn("A4-13", checklist)
|
||||
self.assertIn("enumNames", checklist)
|
||||
self.assertIn("paged_table", checklist)
|
||||
account_mgr = self._read("development/ACCOUNT_MANAGER.md")
|
||||
self.assertIn("skill_cli", account_mgr)
|
||||
schema = self._read("references/SCHEMA.md")
|
||||
self.assertIn("skill_cli", schema)
|
||||
self.assertIn("enumNames", schema)
|
||||
schema_json = self._read("assets/schemas/skill-actions.schema.json")
|
||||
self.assertIn("skill_cli", schema_json)
|
||||
self.assertIn("paged_table", schema_json)
|
||||
self.assertIn("enumNames", schema_json)
|
||||
self.assertIn("page_size", schema_json)
|
||||
self.assertIn('"skill"', schema_json)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user