MCPcopy Index your code
hub / github.com/oapi-codegen/oapi-codegen / combinedSchemaExtensions

Function combinedSchemaExtensions

pkg/codegen/schema.go:1004–1014  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

1002// those from next to the $ref and the referenced schema itself.
1003// Extensions next to the $ref take precedence.
1004func 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}

Callers 3

GenerateGoSchemaFunction · 0.85
valueWithPropagatedRefFunction · 0.85
GenerateParamsTypesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected