-
Notifications
You must be signed in to change notification settings - Fork 3
Closed
Labels
area: apiSPFx Template APISPFx Template APItype: enhancementNew feature or requestNew feature or request
Milestone
Description
Summary
The dev design says the template manifest should include "Component category (webpart, ACE, etc)". The current template.json schema (ISPFxTemplateJson) has no category field. This is needed for filtering, grouping, and display in the list-templates command.
Requirements
Schema addition
Add a category field to template.json:
{
"name": "webpart-minimal",
"description": "A minimal SPFx web part",
"version": "1.0.0",
"spfxVersion": "1.22.2",
"category": "webpart"
}Allowed categories
| Category | Description | Templates |
|---|---|---|
webpart |
Web Parts | webpart-minimal, webpart-noframework, webpart-react |
extension |
Extensions | All extension-* templates |
ace |
Adaptive Card Extensions | All ace-* templates |
library |
Libraries | library |
Behavior
- Field should be required in the schema
- Used by
list-templatesto group/filter output - Could be used by
createto show relevant templates based on user intent - Validated by Zod schema in
SPFxTemplateJsonFile
Implementation notes
- Update
ISPFxTemplateJsoninterface inapi/spfx-template-api/src/templating/SPFxTemplateJsonFile.ts - Update Zod schema
SPFxTemplateDefinitionSchemato includecategoryas an enum - Add
categorygetter toSPFxTemplateJsonFileandSPFxTemplate - Update all 18
template.jsonfiles to include the appropriate category - Update
toString()methods to display category
Acceptance criteria
-
categoryfield added to template.json schema - All 18 templates have correct category values
-
SPFxTemplateexposescategoryproperty - Schema validation rejects invalid categories
-
list-templatescan group/filter by category
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area: apiSPFx Template APISPFx Template APItype: enhancementNew feature or requestNew feature or request