MCPcopy Create free account
hub / github.com/apache/dubbo-go / responseToMap

Method responseToMap

protocol/triple/openapi/encoder.go:187–198  ·  view source on GitHub ↗
(r *model.ApiResponse)

Source from the content-addressed store, hash-verified

185}
186
187func (e *Encoder) responseToMap(r *model.ApiResponse) map[string]any {
188 m := make(map[string]any)
189 m["description"] = r.Description
190 if len(r.Content) > 0 {
191 content := make(map[string]any)
192 for mt, c := range r.Content {
193 content[mt] = e.mediaTypeToMap(c)
194 }
195 m["content"] = content
196 }
197 return m
198}
199
200func (e *Encoder) schemaToMap(s *model.Schema) map[string]any {
201 m := make(map[string]any)

Callers 1

operationToMapMethod · 0.95

Calls 1

mediaTypeToMapMethod · 0.95

Tested by

no test coverage detected