Now checks if `datacontenttype` matches the regex:
`^(application|text)\/([a-zA-Z]+\+)?json$")`
This regex support
`application/foobar+json`
or standard
```
application/json
text/json
```
Signed-off-by: Isaac Aymerich <isaac.aymerich@roche.com>
* Introduced support for Binary attribute types.
Added test data example
Added unit-test for JSON Format
Signed-off-by: Day, Jeremy(jday) <jday@paypal.com>
* documentation tweak
Signed-off-by: Day, Jeremy(jday) <jday@paypal.com>
* - Addressed review comment.
- Removed the withContextAttribute(string, Integer).
- This should be a seperate PR, was mixed-in by accident.
Signed-off-by: Day, Jeremy(jday) <jday@paypal.com>
* Address review comments
Signed-off-by: Day, Jeremy(jday) <jday@paypal.com>
* fix: prevent NPE on deserializing JSON containing invalid `specversion` value
Signed-off-by: Mark Scott <mark@codebrewer.org>
* refactor: move test per PR review comment
Signed-off-by: Mark Scott <mark@codebrewer.org>
* Jackson javadocs
Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
* Reverted public constructor and deprecated it
Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
* Halfway through it
Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
* That should be it
Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
* Prettier run
Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
* Removed code sample
Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
* Suggestions + fixed up the mess made by prettier
Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
* Suggestion
Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
* Messing up stuff
Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
* Collapse CloudEventAttributesWriter and CloudEventAttributesWriter into CloudEventContextWriter
Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
* Rebase fix
Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
* Add the method `BytesCloudEventData#wrap` to be consistent with #289
Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
* Removed all usages of constructor
Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
* Fix poms warnings
Bumped javadoc plugin to latest version
Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
* Dumped back the javadoc version
Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
* Add a static method to wrap a pojo in PojoCloudEventData
Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
* WIP
Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
* Cleanup
Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
* Reverted BytesCloudEventData and moved to a separate PR
Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
* CloudEventDataMapper cannot be null
Cleanup of all mapper != null and replaced with CloudEventDataMapper.NOOP
Fixed all the missing wildcards
Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
* I forgot a bunch of them
Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
* CloudEventDataMapper.NOOP to CloudEventDataMapper.identity
Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
* Now it should be fine
Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
* Javadoc'ed more and more the api module
Cleanup the CloudEventRWException
More tests on the API module
Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
* Use parseTime
Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
* Better docs on the Extensions
Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
Renamed CloudEventUtils#toVisitable to CloudEventUtils#toReader
Added CloudEventUtils#toEvent
Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
* feat: new overload for mapper factory
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* test: updates for mapper
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* doc: updated javadoc for PojoCloudEventDataMapper
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* doc: update javadoc
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* Extracted readAttributes and readExtensions from CloudEventReader
Added CloudEventUtils#toContextReader to create a context reader starting from a CloudEvent
Improved documentation of *Reader interfaces
Renamed MessageReader#visit to the proper name MessageReader#read
Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
* Typo
Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
* Implemented Pojo mapper using jackson
Added other exception kinds
Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
* Fixup for the rebase
Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
* Removed comment
Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
* Equals and hash code
Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
* Fixed rebase issues
Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
* Defined an interface to perform mapping of data
Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
* All code compiles and run
Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
* Added a sample + fixed copyrights
Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
* More test
Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
* Introduce CloudEventData
Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
* Javadocs
Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
* Removed to
Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
* Applied changes throughout the sdk
Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
* Fix javadoc
Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>