Skip to content

Conversation

@lance
Copy link
Member

@lance lance commented Jun 4, 2020

The HTTPReceiver class' accept() method should not have a typescript
type designation of { specversion: string } for the body parameter
because the event could be (and often is) in binary form, which means that
the specversion property won't be there.

This commit changes the method signature to:

accept(headers: {}, body: {}) : CloudEvent

Signed-off-by: Lance Ball [email protected]

…pt()

The `HTTPReceiver` class' `accept()` method should not have a typescript
type designation of `{ specversion: string }` for the `body` parameter
because the event could (and often is) in binary form, which means that
the `specversion` property won't be there.

This commit changes the method signature to:

`accept(headers: {}, body: {}) : CloudEvent`

Signed-off-by: Lance Ball <[email protected]>
@lance lance added type/fix A change that fixes something that is broken typescript Issues related to TypeScript usage or implementation labels Jun 4, 2020
@lance lance requested a review from a team June 4, 2020 19:40
@lance lance self-assigned this Jun 4, 2020
@lance lance requested review from danbev, grant and helio-frota and removed request for a team June 4, 2020 19:40
@lance lance changed the title lib: remove specversion from the required attributes in receiver.acce… lib: remove specversion from the attributes in receiver.accept() Jun 4, 2020
Signed-off-by: Lance Ball <[email protected]>
@lance lance merged commit 957aa6f into cloudevents:master Jun 4, 2020
@lance lance deleted the fix-http-receiver-accept-signature branch June 4, 2020 21:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type/fix A change that fixes something that is broken typescript Issues related to TypeScript usage or implementation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants