akka-http icon indicating copy to clipboard operation
akka-http copied to clipboard

Allowed extension of nodeSeqMediaTypes for ScalaXmlSupport

Open umbreak opened this issue 3 years ago • 5 comments

Having nodeSeqMediaTypes in the trait ScalaXmlSupport allows clients to override it if they want to support some more mediaTypes related to xml (for example application/rdf+xml)

umbreak avatar Apr 25 '21 13:04 umbreak

Thank you for your pull request! After a quick sanity check one of the team will reply with 'OK ΤO ΤESΤ' to kick off our automated validation on Jenkins. This compiles the project, runs the tests, and checks for things like binary compatibility and source code formatting. When two team members have also manually reviewed and (perhaps after asking for some amendments) accepted your contribution, it should be good to be merged.

For more details about our contributing process, check out CONTRIBUTING.md - and feel free to ask!

akka-ci avatar Apr 25 '21 13:04 akka-ci

OK TO TEST

jrudolph avatar Apr 29 '21 10:04 jrudolph

Thanks, @umbreak. I'm not opposed to allowing the override as you suggested here. A slightly more explicit alternative that already works right now is to define your own implicits with

implicit val xyzMarshaller = ScalaXmlSupport.nodeSeqMarshaller(mediaTypeToSupport)
// similar for unmarshaller

jrudolph avatar Apr 29 '21 10:04 jrudolph

Test FAILed.

!!! Couldn't read commit file !!!

akka-ci avatar Apr 29 '21 10:04 akka-ci

Yes you are right. I was following the approach taken by Circe for example (FailFastCirceSupport).

umbreak avatar Apr 29 '21 12:04 umbreak

Closing this due to inactivity and as Johannes suggested the fact that it already is possible.

johanandren avatar Nov 08 '22 13:11 johanandren