Open hpsjakob opened 11 months ago
I found that this is not the case if I change the enum to
enum StandardResponses {
#[response(status = 500,
content_type= "text/plain",
description = "Internal Error.",
example = json!("Internal error."))]
InternalError(String),
}
So I guess utoipa assumes if it's an empty enum that there's now content.
@hpsjakob Yeah this is related to #965. Currently I believe as you stated that if there is no content then the content-type will not be set. This is something that needs some tuning and we should support this eventually.
Hi,
I'm using utoipa as follows:
This generates the following JSON output:
I'm missing the content section here. I would have expected it to be shown since I specified
content_type
andexample
. Did I get somethign wrong or could it be that I found a bug?I'm usign version 4.0.0.
Thank you in advance for your time!