(t *testing.T)
| 88 | } |
| 89 | |
| 90 | func TestSearchAPIDetailModeShortFormat(t *testing.T) { |
| 91 | profile := &config.Profile{Mode: common.ReleaseModeDev} |
| 92 | s, err := NewServer(nil, profile, "test-secret") |
| 93 | require.NoError(t, err) |
| 94 | |
| 95 | // Test detail mode with short operationId format (Service/Method) |
| 96 | result, _, err := s.handleSearchAPI(context.Background(), nil, SearchInput{ |
| 97 | OperationID: "SQLService/Query", |
| 98 | }) |
| 99 | require.NoError(t, err) |
| 100 | require.NotNil(t, result) |
| 101 | require.Len(t, result.Content, 1) |
| 102 | |
| 103 | text := result.Content[0].(*mcpsdk.TextContent).Text |
| 104 | require.Contains(t, text, "SQLService/Query") |
| 105 | require.Contains(t, text, "Request Body") |
| 106 | require.Contains(t, text, "```json") |
| 107 | } |
| 108 | |
| 109 | func TestSearchAPIDetailModeWithResponse(t *testing.T) { |
| 110 | profile := &config.Profile{Mode: common.ReleaseModeDev} |
nothing calls this directly
no test coverage detected