Hi Brian, sorry for me currently not being responsive to your questions (and to the mailing list in general). I'm busy refactoring the Apache Isis 'core modules' in preparation of better integration with 'Inversion of Control' containers. This is going to be a huge change for the Isis 2 version.
If everything goes well by roughly end of June (but also likely only later this year), the current 'v2' branch will experience some major changes under the hood. My focus currently is to really make this happen. So just that you know, your bug reports, comments and questions here, are very much appreciated, even though when they don't receive much feedback. If you do address a topic that I'm pretty familiar with, then I might help out with more or less immediate feedback, otherwise when I see, that I'd need to research and deep-dive into an issue, before I can answer appropriately, I'd rather wait until I find more time to do this. Anyhow, hope you didn't get frustrated already! Again, keep posting here. Its refreshing to hear how others use the framework and what features they are wishing for. Cheers, Andi On 2019/03/06 19:10:16, Brian K <harvestmoon...@gmail.com> wrote: > Hi, > > I want to return a file from a REST operation. I have an action that > returns a pdf as a Blob. In the wicket viewer that causes the browser to > download a file. The REST operation returns an object with content like > this: > > ``` > { > "links" : [ ], > "resulttype" : "scalarvalue", > "result" : { > "value" : "My file name:application/pdf:[the binary content > base64-encoded]", > "links" : [ { > "rel" : "urn:org.restfulobjects:rels/return-type", > "href" : " > http://localhost:8080/project/restful/domain-types/org.apache.isis.applib.value.Blob > ", > "method" : "GET", > "type" : > "application/json;profile=\"urn:org.restfulobjects:repr-types/domain-type\"" > } ], > "extensions" : { } > } > } > ``` > > The swagger spec that is generated lists this operation as returning a data > type of "object". Is there another data type that I can use here that > would generate something a little more intuitive? Maybe a swagger 2.0 > "file" data type, or a type described with the following yaml: > ``` > type: object > properties: > name : > type : string > mimeType : > type : string > data : > type : string > format : byte > ``` > > Would an implementation of a ContentMappingService in my project would > allow me to dictate how to represent the Blob data type to the REST > viewer? > > Thanks! > Brian >