Schema Versioning Strategy
When you need to modify a schema, consider these approaches:Backward Compatible Changes
These changes don’t break existing credentials:- Adding new optional attributes
- Updating descriptions or metadata
- Adding new schema versions
Breaking Changes
These changes require careful planning:- Removing attributes
- Changing attribute data types
- Making optional attributes required
- Renaming attributes
Best Practices for Schema Evolution
1. Plan for Growth
JSON-LD Context v1.0:2. Add New Fields Gradually
JSON-LD Context v1.1:3. Deprecate Fields Carefully
JSON-LD Context v2.0:Managing Schema Updates in Production
1. Gradual Migration Strategy
- Keep old schemas active during transition periods
- Issue new credentials with updated schemas
- Gradually phase out old schema versions
- Monitor credential usage patterns
2. Communication with Users
- Notify users about schema changes
- Provide migration guides for credential holders
- Maintain backward compatibility for verification
3. Testing Schema Changes
- Test new schemas in development environment
- Validate credential issuance with new schemas
- Ensure verification still works with old credentials
- Test selective disclosure with updated schemas
Schema Registry and Discovery
The AIR Kit provides a schema registry where you can:- Browse Available Schemas: Discover schemas created by other developers
- Reuse Existing Schemas: Use well-established schemas for common use cases
- Contribute Schemas: Share your schemas with the community
Next Steps
Now that you understand schema creation and JSON-LD implementation, you can:- Issue Credentials - Use your schemas to issue credentials in the Credential Issuance Quickstart
- Verify Credentials - Learn how to verify credentials in the Credential Verification Quickstart
- Explore Schema Registry - Browse and reuse existing schemas in the Developer Dashboard
- Advanced Schema Design - Learn about complex schema patterns and advanced use cases