-
Notifications
You must be signed in to change notification settings - Fork 312
Open
Labels
priority/lowLow priority issues that should only be worked on if they are easy to complete.Low priority issues that should only be worked on if they are easy to complete.type/enhancementIssues that represent requests for new features.Issues that represent requests for new features.
Description
Parent Epic
Part of #6192
Priority
P3 (Low)
Phase
Phase 4 - Audit & Events
Blocked By
- Contract Lifecycle Status Management
- Promotion Workflow
Description
Integrate contract events with the existing event system and webhook infrastructure.
Requirements
-
Define contract event types in events package:
Event Trigger ContractCreatedContract metadata first added to artifact ContractMetadataUpdatedContract metadata fields changed ContractStatusChangedStatus transition (DRAFT->STABLE, etc.) ContractPromotedPromotion stage changed ContractDeletedContract metadata removed from artifact -
Event record definitions:
public record ContractCreated( String groupId, String artifactId, ContractMetadata metadata, String createdBy, Instant createdOn ) implements RegistryEvent {} public record ContractMetadataUpdated( String groupId, String artifactId, ContractMetadata previousMetadata, ContractMetadata newMetadata, String updatedBy, Instant updatedOn ) implements RegistryEvent {}
-
Ensure events are published via CDI
@Observespattern -
Add event types to webhook event type filter configuration
-
Document webhook payload format for contract events
Webhook Payload Example
{
"type": "CONTRACT_STATUS_CHANGED",
"timestamp": "2025-01-15T10:30:00Z",
"data": {
"groupId": "com.example",
"artifactId": "order-events",
"previousStatus": "DRAFT",
"newStatus": "STABLE",
"changedBy": "user@example.com",
"comment": "Ready for production"
}
}Acceptance Criteria
- All contract events are published
- Webhooks can subscribe to contract events
- Event payloads are documented in OpenAPI spec
- Integration tests verify event publishing
Technical Notes
Events location: app/src/main/java/io/apicurio/registry/events/
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
priority/lowLow priority issues that should only be worked on if they are easy to complete.Low priority issues that should only be worked on if they are easy to complete.type/enhancementIssues that represent requests for new features.Issues that represent requests for new features.