(r *model.ApiResponse)
| 185 | } |
| 186 | |
| 187 | func (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 | |
| 200 | func (e *Encoder) schemaToMap(s *model.Schema) map[string]any { |
| 201 | m := make(map[string]any) |
no test coverage detected