Skip to content

How to document and return multiple successful statuses? #153

Answered by vearutop
haimgel asked this question in Q&A
Discussion options

You must be logged in to vote

Makes sense to me, such an interface can be a good starting point for a relatively common case.

And in the future, if/when needed, we can complement it with something like:

type HTTPMultiResponder interface {
   StatusResponse(statusCode int) (content interface{}, contentType string)
}

for both docs and encoder.

I'll try to implement your proposal some time later, or send a PR if you'd like.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@vearutop
Comment options

Answer selected by haimgel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants