Category Registry
Overview
The category & specs registry is a powerful configuration system that helps you organize and validate your product data. It enables you to:
Define component categories with standardized attributes and specifications
Import pre-built category templates from Duro's standard library
Create custom validation rules and constraints for your parts data
Establish consistent part numbering schemes across your library
Enforce data quality standards through automated validation
This registry serves as the foundation for maintaining clean, well-structured product data that can scale with your organization.
Schema
The category & specs registry is defined in a YAML file that is used to define the relationships between your part specifications and their constraints (ie. validation rules).
As a Library Registry Maintainer, you'll have the ability to define, override, and extend the structure of your library parts, and author custom validations on the specification values directly or in relation to other specifications.
Import Default Category Sets
Import pre-defined category sets from Duro to leverage existing definitions.
uses:
- duro/mechanical-categories@v1
- duro/[email protected]Exclude Specific Categories
Selectively exclude specific categories from imported sets that aren't relevant to your library.
Define Common Specifications
Create reusable specifications that can be referenced across multiple categories. Common specs are organized in a hierarchical structure:
Define Custom Categories
Create new categories with specific attributes and specifications.
Define Category Type Specifications
Apply common specifications across all categories of a specific type. This helps maintain consistency and reduces repetition in your category definitions.
You can:
Reference entire specification groups using wildcards (
/*)Reference individual specifications
Set default required stages and severity levels
Apply specifications across all categories of a specific type
This is particularly useful when:
You want to enforce standard specifications across category types
You need to maintain consistent validation rules
You want to reduce repetition in your category definitions
Implement Validation Rules
Define validation rules for specifications using different data types and formats.
Specify Lifecycle Requirements
Define when specifications are required based on the item's lifecycle stage.
Extend Existing Categories
Extend pre-defined categories with additional specifications or modifications.
Reference Common Specifications
Reuse common specifications across different categories using references.
Import External Specifications
Use specifications defined in external libraries.
Import Entire Specification Sets
Import all specifications from a set using the wildcard (*) operator. This is useful when you need to include an entire group of related specifications.
The wildcard import is particularly powerful when:
You need all specifications from a logical grouping
You want to maintain consistency with a standard specification set
You want to reduce repetitive references to individual specifications
Define Warning-Level Requirements
Specify requirements that trigger warnings rather than errors when not met.
Create Integration Points
Define specifications for integration with external systems.
Define Quality Control Requirements
Specify quality-related specifications and their validation rules.
Available Category Types
Define the type of category being created. The type affects validation rules and available specifications.
Validation Types Reference
Define specifications using different validation types and formats.
String Validation
Integer Validation
Paired Field Validation
Conditional Validation
The conditional validation supports two types of validation rules:
Range-based conditions: Define minimum and maximum values based on another field's value
Enum-based conditions: Define specific allowed values based on another field's value
You can also specify a display format using the display property, which determines how the combined values should be presented. For example, "{baseColor} {number}" will show values like "Red 40" or "Yellow 5".
Version Format Reference
When referencing external categories or specifications, you can use different version formats:
Note: Using shorter versions will automatically use the latest compatible version within that scope.
Last updated
Was this helpful?