Central UniSpec Core Engine providing parsing, validation, normalization, diffing, and conversion of UniSpec specs.
npm install @unispechq/unispec-corebash
npm install @unispechq/unispec-core
`
$3
`javascript
import { validateUniSpec, loadUniSpec } from '@unispechq/unispec-core';
// Load and validate a UniSpec document
const spec = await loadUniSpec('./unispec.yaml');
const result = await validateUniSpec(spec);
if (result.valid) {
console.log('ā
Valid UniSpec document');
} else {
console.log('ā Validation errors:', result.errors);
}
`
---
š Documentation
$3
- UniSpec format overview
- Core Engine architecture
- Protocol coverage details
- Platform components explanation
- Use cases and deployment patterns
$3
- Document validation
- Configuration support
- Schema reference resolution
- Enhanced diff analysis
- Performance optimization
- Error handling patterns
$3
- Complete function documentation
- Type definitions and interfaces
- Configuration options
- Error types and codes
- Performance considerations
$3
- Repository structure
- Development setup
- Testing guidelines
- Build process
- Contributing guidelines
- Plugin development
---
š¦ Repository Structure
`
unispec-core/
āā src/
ā āā loader/ # File loading with security
ā āā validator/ # JSON Schema validation
ā āā normalizer/ # Structure normalization
ā āā diff/ # Enhanced comparison
ā āā cache/ # LRU caching
ā āā types/ # TypeScript interfaces
ā āā index.ts # Public API
āā tests/ # Unit and integration tests
āā docs/ # Detailed documentation
āā scripts/ # Build and release scripts
`
---
š¤ Contributing
Contributions are welcome! Before contributing, please review:
- Development Guide
- .windsurfrules
All core changes must comply with:
- the UniSpec format from unispec-spec
- compatibility rules
- test coverage
- platform architecture
---
š Related Repositories
| Repository | Purpose |
|------------------------|---------|
| unispec-spec | UniSpec format definition (schemas, examples) |
| unispec-core | This repo ā UniSpec Core Engine implementation |
| unispec-docs | Documentation site |
| unispec-js-adapters | Framework integrations (Express/Nest/Fastify) |
| unispec-infra | Helm charts, Docker, Terraform for deployment |
---
š License
UniSpec Core Engine is open-source and free to use under the MIT License.
---
š„ Summary
unispec-core` is the heart of the UniSpec ecosystem at the code level. It provides the Core Engine used to validate, normalize, diff, and integrate API specifications in the UniSpec format.