emicklei / go-restful-openapi

OpenAPI extension in Go for the go-restful package
MIT License
135 stars 72 forks source link

Is there a way to describe resquest/response body examples #92

Closed fearlesschenc closed 2 years ago

fearlesschenc commented 2 years ago

Currently, we can use Read/Write, but those only emit reflect type of the input type which is hard to understand when it come to complex structs. I am wondering if we can just use json/yaml to describe resquest/response body examples.

emicklei commented 2 years ago

Currently there is no way. Do you have suggestions for an API to make that happen?