Open tnrich opened 4 years ago
This seems like part of a larger issue. It appears that all "examples" get automatically assigned an "application/json" key here:
//src/swagger/generator.ts
if (res.examples) {
operation.responses[res.status]['examples'] = { 'application/json': res.examples };
}
I'm not quite sure why that would be? That seems a bit constrictive. Here's what it looks like in the generated docs:
@ngraef I'm adding an example response to one of my Get Routes like so:
However when debugging swaggerGen, I get the following message in the console:
I get the same message when I try using the @Example decorator like this:
It seems like it is probably not handling simple values like strings correctly? Am I doing something wrong?
Thanks