def test_ops_api_400(self):
        """
        Test that the ops-api endpoint returns 400 when debug API is enabled and the input is invalid.
        """
        with patch.dict('os.environ', {EnvVars.MARQO_ENABLE_OPS_API: 'TRUE'}):
            data = {
                "treatUrlsAndPointersAsImages": False,
                "model": "hf/e5-large",
                "normalizeEmbeddings": True,
                "textPreprocessing": {
                    "splitLength": 2,
                    "splitOverlap": 0,
                    "splitMethod": "sentence",
                },
                "imagePreprocessing": {"patchMethod": None},
                "annParameters": {
                    "spaceType": "euclidean",
                    "parameters": {"efConstruction": 128, "m": 16},
                },
                "type": "unknown"  # invalid type
            }
            index_name = "test-index"
            response = self.client.post(f"/validate/index/{index_name}", json=data)
            self.assertEqual(response.status_code, 400)
            self.assertIn("message", response.json())
            self.assertEqual(response.json()["code"], "invalid_argument")
            self.assertEqual(response.json()["type"], "invalid_request")

        Test that the ops-api endpoint returns 400 when debug API is enabled and the input is invalid.
        
tests/integ_tests/tensor_search/test_api.py