Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return a file #183

Open
marcobudde opened this issue Oct 9, 2018 · 0 comments
Open

Return a file #183

marcobudde opened this issue Oct 9, 2018 · 0 comments

Comments

@marcobudde
Copy link

marcobudde commented Oct 9, 2018

My API contains one method returning an file:

        [WebGet(BodyStyle = WebMessageBodyStyle.WrappedRequest, RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)]
        [SwaggerWcfResponse(HttpStatusCode.OK, ResponseTypeOverride = typeof(Stream))]
        [SwaggerWcfResponse(HttpStatusCode.BadRequest, ResponseTypeOverride = typeof(RestError))]
        [SwaggerWcfContentTypes(ProduceTypes = new string[] { "image/jpeg", "image/png" })]
        Stream GetLiveImageAsStream(string cameraID, string imageType, ImageFormat format);

If I understand the Swagger 2.0 specification correctly, this should be exported with "type" = "file".

The current implementation returns "type" = "string" and "format" = "stream".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant