combinedSchemaExtensions returns one set of extensions taking those from next to the $ref and the referenced schema itself. Extensions next to the $ref take precedence.
(r *openapi3.SchemaRef)
| 1002 | // those from next to the $ref and the referenced schema itself. |
| 1003 | // Extensions next to the $ref take precedence. |
| 1004 | func combinedSchemaExtensions(r *openapi3.SchemaRef) map[string]any { |
| 1005 | combined := map[string]any{} |
| 1006 | |
| 1007 | if r.Value != nil { |
| 1008 | maps.Copy(combined, r.Value.Extensions) |
| 1009 | } |
| 1010 | |
| 1011 | maps.Copy(combined, r.Extensions) |
| 1012 | |
| 1013 | return combined |
| 1014 | } |
no outgoing calls
no test coverage detected