initRequestBody initializes an empty RequestBody and its Content map.
(op *Operation, rbOpts ...func(*RequestBody))
| 1487 | |
| 1488 | // initRequestBody initializes an empty RequestBody and its Content map. |
| 1489 | func initRequestBody(op *Operation, rbOpts ...func(*RequestBody)) { |
| 1490 | if op.RequestBody == nil { |
| 1491 | op.RequestBody = &RequestBody{} |
| 1492 | } |
| 1493 | if op.RequestBody.Content == nil { |
| 1494 | op.RequestBody.Content = map[string]*MediaType{} |
| 1495 | } |
| 1496 | for _, opt := range rbOpts { |
| 1497 | opt(op.RequestBody) |
| 1498 | } |
| 1499 | } |
| 1500 | |
| 1501 | func setRequestBodyRequired(rb *RequestBody) { |
| 1502 | rb.Required = true |
no outgoing calls
no test coverage detected
searching dependent graphs…