Make default type of Resource as binary
See original GitHub issueIt seems the Spring Resource type is currently not recognized as a binary response (I am returning a Resource subtype - FieSystemResource). The Resource object shows up as a schema in the UI. Here is my current method definition:
@GetMapping("/{imageId}", produces = [MediaType.IMAGE_JPEG_VALUE]) fun getImage(@PathVariable(value = "imageId") imageId: String): Mono<Resource>
Is it possible to somehow override this behavior, to recognize it as a binary response?
Thank you for your help
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Create resource files - .NET - Microsoft Learn
Create a text file that contains string resources. You can use Resource File Generator (resgen.exe) to convert the text file into a binary...
Read more >C++ Custom Binary Resource File - Stack Overflow
I am writing my own custom game engine for fun using SDL in C++. I'm trying to create a custom binary file which...
Read more >Documents | Binary | Care Connect - NHS Connect - Open APIs
A binary resource can contain any content, whether text, image, pdf, zip archive, etc.
Read more >Resources (Binary and Logical) in Windows Presentation ...
A resource is a noncode piece of an application or compnent like bitmaps, fonts, audio / video files, string tables. WPF supports 2...
Read more >Enabling binary support using the API Gateway console
Enable binary support in the API Gateway console. ... Set binary media types for the API: ... Create a new or choose an...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
ok @gotson,
We can make the default behaviour of Resource to return binary, which might be useuful for many cases. If someone wants another Return type, he can anyway use @ApiResponse. It will be added to the next release v1.3.3.
The same thing the OP requested, it should be considered a
binary
return type by default.You mentionned:
So i provided the samples as you requested.