# Buggy code
def _group_endpoints_by_operation_id(
    self,
) -> Generator[Tuple[str, Endpoint], None, None]:
    for path, methods in self.raw_schema["paths"].items():
        full_path = self.get_full_path(path)
        scope, raw_methods = self._resolve_methods(methods)
        methods = self.resolver.resolve_all(methods)
        common_parameters = get_common_parameters(methods)
        for method, resolved_definition in methods.items():
            if (
                method not in self.operations
                or "operationId" not in resolved_definition
            ):
                continue
            parameters = itertools.chain(
                resolved_definition.get("parameters", ()), common_parameters
            )
            raw_definition = EndpointDefinition(raw_methods[method], scope)
            yield (
                resolved_definition["operationId"],
                self.make_endpoint(
                    full_path, method, parameters, resolved_definition, raw_definition
                ),
            )


# Traceback (KeyError)
An internal error happened during a test run
Error: Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/schemathesis/runner/__init__.py", line 245, in execute_from_schema
yield from runner.execute()
File "/usr/local/lib/python3.8/site-packages/schemathesis/runner/impl/core.py", line 100, in execute
for event in self._execute(results):
File "/usr/local/lib/python3.8/site-packages/schemathesis/runner/impl/solo.py", line 19, in _execute
yield from self._run_tests(
File "/usr/local/lib/python3.8/site-packages/schemathesis/runner/impl/core.py", line 126, in _run_tests
for endpoint, test in maker(template, settings, seed):
File "/usr/local/lib/python3.8/site-packages/schemathesis/schemas.py", line 79, in get_all_tests
test = make_test_or_exception(endpoint, func, settings, seed)
File "/usr/local/lib/python3.8/site-packages/schemathesis/_hypothesis.py", line 45, in make_test_or_exception
return create_test(endpoint, func, settings, seed=seed)
File "/usr/local/lib/python3.8/site-packages/schemathesis/_hypothesis.py", line 30, in create_test
strategy = endpoint.as_strategy(hooks=hook_dispatcher)
File "/usr/local/lib/python3.8/site-packages/schemathesis/models.py", line 285, in as_strategy
return get_case_strategy(self, hooks)
File "/usr/local/lib/python3.8/site-packages/schemathesis/_hypothesis.py", line 153, in get_case_strategy
parameter, value, endpoint.get_hypothesis_conversions(location)
File "/usr/local/lib/python3.8/site-packages/schemathesis/models.py", line 291, in get_hypothesis_conversions
definitions = [item for item in self.definition.raw.get("parameters", []) if item["in"] == location]
File "/usr/local/lib/python3.8/site-packages/schemathesis/models.py", line 291, in <listcomp>
definitions = [item for item in self.definition.raw.get("parameters", []) if item["in"] == location]
KeyError: 'in'

# Fixed code
def _group_endpoints_by_operation_id(
    self,
) -> Generator[Tuple[str, Endpoint], None, None]:
    for path, methods in self.raw_schema["paths"].items():
        full_path = self.get_full_path(path)
        scope, raw_methods = self._resolve_methods(methods)
        methods = self.resolver.resolve_all(methods)
        common_parameters = get_common_parameters(methods)
        for method, resolved_definition in methods.items():
            if (
                method not in self.operations
                or "operationId" not in resolved_definition
            ):
                continue
            parameters = itertools.chain(
                resolved_definition.get("parameters", ()), common_parameters
            )
            raw_definition = EndpointDefinition(
                raw_methods[method], resolved_definition, scope
            )
            yield (
                resolved_definition["operationId"],
                self.make_endpoint(
                    full_path, method, parameters, resolved_definition, raw_definition
                ),
            )