Add logic to generate openapi response structures (#18192)

This commit is contained in:
Anton Averchenkov
2022-12-05 11:11:06 -05:00
committed by GitHub
parent 672cdc0fdb
commit 5b04a05511
6 changed files with 80 additions and 17 deletions

View File

@@ -229,9 +229,10 @@ type RequestExample struct {
// Response describes and optional demonstrations an operation response.
type Response struct {
Description string // summary of the the response and should always be provided
MediaType string // media type of the response, defaulting to "application/json" if empty
Example *logical.Response // example response data
Description string // summary of the the response and should always be provided
MediaType string // media type of the response, defaulting to "application/json" if empty
Fields map[string]*FieldSchema // the fields present in this response, used to generate openapi response
Example *logical.Response // example response data
}
// PathOperation is a concrete implementation of OperationHandler.