Added ExceptionMapper to RFC-8040 impl
It is similar to draft-02 implementation but with several diffs
that had to be made because of compliancy against specification,
different revisions of QNames, and need for refactoring:
- Response must have yang-data+json or yang-data+xml types, the
parsing of request content type and acceptable media types was
adjusted accordingly.
- Schema context was used as feed to NormalizedNode builders -
this approach is useless.
- Anonymous classes used for special serializaton with disabled
validation of error-info leaf were moved to distinct classes
(they share some lines of code, so the abstract parent class
is added).
- Added error-path leaf to serialized JSON/XML data (it was in
todo tag for unknown reasons).
- Next small fixes and refactoring of code by extraction of
methods.
- Unit test was written from scratch, because of changes done
to parsing of status code and media type.
Change-Id: I9c17229e8df1b382a37ca588a506128040c6d42f
Signed-off-by: Jaroslav Tóth <jtoth@frinx.io>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>