Skip to content

feat: add implicit-subscription API template#612

Merged
rartych merged 3 commits intocamaraproject:mainfrom
hdamker:add-implicit-events-template
Apr 21, 2026
Merged

feat: add implicit-subscription API template#612
rartych merged 3 commits intocamaraproject:mainfrom
hdamker:add-implicit-events-template

Conversation

@hdamker
Copy link
Copy Markdown
Collaborator

@hdamker hdamker commented Apr 11, 2026

What type of PR is this?

  • enhancement/feature

What this PR does / why we need it:

Adds artifacts/api-templates/sample-implicit-events.yaml as the canonical template for the implicit-subscription pattern: event notifications via OpenAPI callbacks: on a resource-creation operation, with no dedicated /subscriptions sub-API. Complements sample-service-subscriptions.yaml (explicit-subscription) and sample-service.yaml (request-response).

Event schema layering follows the post-#604 model: CloudEvent $ref'd from CAMARA_event_common.yaml, a local ApiNotificationEvent constrains type via ApiEventType and owns the discriminator mapping. No SubscriptionLifecycleEvent group — the implicit pattern has no subscription object.

Also adds a template bullet under artifacts/api-templates in README.md and an artifact pointer in section 2.1 of the Event Subscription and Notification Guide, paralleling the existing section-2.2 reference to sample-service-subscriptions.yaml.

Validated on camaraproject/ReleaseTest via ReleaseTest#71: the template was added there as a third sample API. It passes the CAMARA validation framework v1-rc pipeline with no errors and no warnings — only the expected hints shared with the other sample APIs.

Which issue(s) this PR fixes:

Fixes #608

Does this PR introduce a breaking change?

  • Yes
  • No

Special notes for reviewers:

3 files changed: the new template (394 lines) plus two small doc touches
(+1 line in README.md, +2 lines in section 2.1 of the Event Guide).

Changelog input

 - Add sample-implicit-events.yaml API template for the implicit-subscription pattern (event notifications via OpenAPI callbacks on a resource-creation operation, no /subscriptions sub-API). Fixes #608.

Additional documentation

This section can be blank.

Adds sample-implicit-events.yaml under artifacts/api-templates/ as the
canonical template for CAMARA APIs that deliver event notifications via
OpenAPI callbacks on a resource-creation operation, with no dedicated
/subscriptions sub-API (implicit-subscription pattern).

Follows the post-camaraproject#604 layered event-schema architecture: pure CloudEvent
envelope referenced from CAMARA_event_common.yaml, local
ApiNotificationEvent that constrains type via ApiEventType and owns the
discriminator mapping, concrete event schemas extending
ApiNotificationEvent.

Companion documentation update to
CAMARA-API-Event-Subscription-and-Notification-Guide.md is deferred to
a follow-up commit to avoid conflicts with camaraproject#606 doc edits.
hdamker added 2 commits April 13, 2026 14:26
…#608)

Add a reference to the new implicit-subscription template in README.md
(under artifacts/api-templates) and in section 2.1 of the Event Guide,
paralleling the existing section 2.2 reference to
sample-service-subscriptions.yaml.
Copy link
Copy Markdown
Contributor

@PedroDiez PedroDiez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Copy Markdown
Contributor

@rartych rartych left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rartych rartych requested a review from bigludo7 April 16, 2026 11:38
@rartych rartych merged commit 87955e0 into camaraproject:main Apr 21, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add sample-implicit-events.yaml API template for callback-based event pattern

4 participants