{"record":{"id":"d0554da41db5f4fd","repo":"pathwaycom/pathway","slug":"unknown-endpoint-input-format-format","errorCode":null,"errorMessage":"Unknown endpoint input format: {format}","messagePattern":"Unknown endpoint input format: (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"python/pathway/io/http/_server.py","lineNumber":190,"sourceCode":"        if method.upper() == \"GET\":\n            # Get requests receive parameters from CGI, so their schema description\n            # is a bit different from the POST / PUT / PATCH\n            endpoint_description = {\n                \"parameters\": self._construct_openapi_get_request_schema(schema),\n                # disable yaml optimization to avoid\n                # \"instance type (string) does not match any allowed primitive type\"\n                # error from openapi validator\n                \"responses\": copy.deepcopy(self.DEFAULT_RESPONSES_DESCRIPTION),\n            }\n        else:\n            if format == \"raw\":\n                content_header = \"text/plain\"\n                openapi_schema = self._construct_openapi_plaintext_schema(schema)\n            elif format == \"custom\":\n                content_header = \"application/json\"\n                openapi_schema = self._construct_openapi_json_schema(schema)\n            else:\n                raise ValueError(f\"Unknown endpoint input format: {format}\")\n            schema_and_examples = {\"schema\": openapi_schema}\n            if self.examples:\n                schema_and_examples[\"examples\"] = self.examples._openapi_description()\n            content_description = {content_header: schema_and_examples}\n            endpoint_description = {\n                \"requestBody\": {\n                    \"content\": content_description,\n                },\n                # disable yaml optimization to avoid\n                # \"instance type (string) does not match any allowed primitive type\"\n                # error from openapi validator\n                \"responses\": copy.deepcopy(self.DEFAULT_RESPONSES_DESCRIPTION),\n            }\n\n        if self.tags is not None:\n            endpoint_description[\"tags\"] = list(self.tags)\n        if self.description is not None:\n            endpoint_description[\"description\"] = self.description","sourceCodeStart":172,"sourceCodeEnd":208,"githubUrl":"https://github.com/pathwaycom/pathway/blob/fa2f74a4649b7c5908690cf60137263d8d80de5f/python/pathway/io/http/_server.py#L172-L208","documentation":"Raised while building an endpoint's OpenAPI description when the request/response input `format` is neither \"raw\" nor \"custom\". The schema builder maps \"raw\" to a text/plain plaintext schema and \"custom\" to an application/json schema; any other value cannot be described and is rejected.","triggerScenarios":"Creating an HTTP endpoint with format=\"json\" or format=\"binary\" (only \"raw\" and \"custom\" are accepted here); forwarding an unvalidated format string from a wrapper that builds EndpointSchema descriptions.","commonSituations":"Confusing this internal schema-format parameter with the connector-level payload format names (\"json\"/\"custom\") used elsewhere in pathway's HTTP stack; wrappers or generated code passing through arbitrary user strings.","solutions":["Use format=\"raw\" for plain-text endpoints and format=\"custom\" for JSON-validated endpoints when constructing the endpoint schema.","Validate the format before endpoint construction: assert format in (\"raw\", \"custom\").","If you need JSON input, use format=\"custom\" (it builds a JSON schema and sets application/json)."],"exampleFix":"# before\nendpoint = http_endpoint(schema=MySchema, format=\"json\")\n\n# after\nendpoint = http_endpoint(schema=MySchema, format=\"custom\")","handlingStrategy":"validation","validationCode":"assert format in (\"raw\", \"custom\"), 'endpoint format must be \"raw\" or \"custom\"'","typeGuard":"def is_valid_endpoint_format(fmt: str) -> bool:\n    return fmt in (\"raw\", \"custom\")","tryCatchPattern":null,"preventionTips":["Note that this schema-level format accepts only raw/custom, distinct from the payload-level json/custom format names.","Wrap endpoint construction with a small factory that validates format and schema together."],"tags":["http","openapi","format","internal-api"],"backgroundTag":null,"analyzedSha":"fa2f74a4649b7c5908690cf60137263d8d80de5f","analyzedAt":"2026-08-15T01:48:17.006Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}