Closed roelofkemp closed 4 years ago
There's no specific issue for this change, it is related to https://jira.sportlink.nl/browse/APP-1581. Do you want me to add a navajo github issue?
Once you approve I'll add documentation here: https://github.com/Dexels/navajo/wiki/Navajo-entities-or-REST-comes-to-Navajo#output-format
Content-type is kind of difficult if the navajo type is binary. For instance for the specific use-case the content-type could be text/calendar, but for other binaries it might be different. We could think of some way to add this information to the entity definition. However for now I expect the client to know what it is asking (i.e. it should not have a problem with a missing content-type).
Tabs to spaces has been fixed.
My reasoning w.r.t. navajo issues:
My reasoning w.r.t. content-type: In general I like my data (in files, on the wire) to be as self-descriptive as possible, even when specific clients know what they request, for instance for debugging purposes. And given that this is a general mechanism, we do not know how it will be used in the future.
My two cents, do with them what you like.
added support for output type .bin that outputs the first top level binary of an entity in its own format, useful for ical (.ics) files for instance.
In order to migrate from articles to entities it is needed to have functionality that an entity can output raw ical. Entities already support different output formats (json, xml, birt, tml). I've added a new one called bin (for binary), that will take the first binary property of the entity message and returns its contents directly (without wrapping it in json/xml).