Plone.jsonapi.core questions

Hi there,

I am playing with jsonapi.core in the context of XML Director.

Some questions:

  • is it possible to return non-JSON data from an API call. E.g. there is an API for exporting data as a ZIP
    and it should be returned as is.

  • are there plans to support the Accept: header in some way or is this left to the application?
    For example I have a method "get_metadata" which can return HTML/XML/JSON and it would be nice
    to return the related format based on the Accept: header

  • the permission check is now part of the api call implementation. Wouldn't it make more sense to move the security check into the router and define the permission as part of the route?

  • design question: I deal often with paths referencing some object in Plone. Is there some consensus about parameter handling? E.g. the URL for exporting an object as ZIP using some path would be

            /plone/@@API/xmldirector/export-zip?path=path/to/object
    

    or

           /plone/path/to/object/@@API/xmldirector/export-zip
    

    or

          /plone/@@API/xmldirector/export-zip/path/to/object
    

(third option does not seems to work with jsonapi.core since it can no handle arbitrary path segments )?

Andreas