flask-rest-jsonapi icon indicating copy to clipboard operation
flask-rest-jsonapi copied to clipboard

Custom content negotiation

Open multimeric opened this issue 6 years ago • 1 comments
trafficstars

  • Allow an API to define a dictionary of converter functions for different content types, that are run before and after the JSON API schema sees the data. For example:
    api = Api(blueprint=bp, response_renderers={
        'text/csv': render_csv
    }, request_parsers={
        'text/csv': parse_csv
    })
    
  • Two tests added in a separate file
  • Fixes #170 and/or fixes #13

multimeric avatar Sep 16 '19 06:09 multimeric

Coverage Status

Coverage decreased (-2.3%) to 88.518% when pulling 5a7938cafe18c738a81340f939a76c1caad43b41 on TMiguelT:content-negotiation into b44bc08b11213d49fadae873650d3555889052ec on miLibris:master.

coveralls avatar Sep 16 '19 18:09 coveralls