I'm currently looking for a way to wrap JSON in the Swagger UI component.
In YAML my object declaration is:
restException:
properties:
message:
type: string
The output generated by Swagger UI is (whic I agree, is correct):
{
"message": "string"
}
and what I want is:
"restException": {
"message": "string"
}
I've just find a ugly way to do it by explicitely declaring the wrapper in the YAML file. But it's verry bad since it's also generates when I use "Swagger Codegen" to generate client or server code.
restExceptionContainer:
restException:
properties:
message:
type: string
I'm ok for adding code in the Swagger UI file if needed ! Need your help to find where :)
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…