Skip to content

feat: pass extension into the constructor. - #214

Merged
lance merged 2 commits into
cloudevents:masterfrom
lholmquist:209-add-extension-in-contructor
Jun 9, 2020
Merged

lance merged 2 commits into
cloudevents:masterfrom
lholmquist:209-add-extension-in-contructor

Conversation

@lholmquist

Copy link
Copy Markdown
Contributor
  • This allows someone to pass an extension/extensions into the CloudEvent contructor when creating a CloudEvent.

fixes #209

Signed-off-by: Lucas Holmquist lholmqui@redhat.com

@lance lance added the type/enhancement New feature or request label Jun 8, 2020

@lance lance left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think that the extensions should be represented in the CloudEventV1Attributes and CloudEventV03Attributes interfaces as an optional attribute. The interfaces already have a k/v property which is meant to represent the extensions, but I don't think that is correct.

Comment thread test-ts/cloud_event_test.ts Resolved
* This allows someone to pass an extension/extensions into the CloudEvent contructor when creating a CloudEvent.

fixes cloudevents#209

Signed-off-by: Lucas Holmquist <lholmqui@redhat.com>
Signed-off-by: Lucas Holmquist <lholmqui@redhat.com>
@lholmquist
lholmquist force-pushed the 209-add-extension-in-contructor branch from bfa8cdd to 768469e Compare June 9, 2020 19:16
@lholmquist

Copy link
Copy Markdown
Contributor Author

Added an Extension interface as well as tests

@lance lance left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@lance
lance merged commit 0378f4c into cloudevents:master Jun 9, 2020
@lance lance mentioned this pull request Jul 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type/enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CloudEvent constructor should accept inline extensions

2 participants