# Buggy code
def get_all_endpoints(self) -> Generator[Endpoint, None, None]:
    try:
        paths = self.raw_schema["paths"]  # pylint: disable=unsubscriptable-object
        context = HookContext()
        for path, methods in paths.items():
            full_path = self.get_full_path(path)
            if should_skip_endpoint(full_path, self.endpoint):
                continue
            self.dispatch_hook("before_process_path", context, path, methods)
            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():
                # Only method definitions are parsed
                if (
                    method not in self.operations
                    or should_skip_method(method, self.method)
                    or should_skip_by_tag(resolved_definition.get("tags"), self.tag)
                    or should_skip_by_operation_id(
                        resolved_definition.get("operationId"), self.operation_id
                    )
                ):
                    continue
                parameters = itertools.chain(
                    resolved_definition.get("parameters", ()), common_parameters
                )
                # To prevent recursion errors we need to pass not resolved schema as well
                # It could be used for response validation
                raw_definition = EndpointDefinition(raw_methods[method], scope)
                yield self.make_endpoint(
                    full_path, method, parameters, resolved_definition, raw_definition
                )
    except (KeyError, AttributeError, jsonschema.exceptions.RefResolutionError):
        raise InvalidSchema("Schema parsing failed. Please check your schema.")


# 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 get_all_endpoints(self) -> Generator[Endpoint, None, None]:
    try:
        paths = self.raw_schema["paths"]  # pylint: disable=unsubscriptable-object
        context = HookContext()
        for path, methods in paths.items():
            full_path = self.get_full_path(path)
            if should_skip_endpoint(full_path, self.endpoint):
                continue
            self.dispatch_hook("before_process_path", context, path, methods)
            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():
                # Only method definitions are parsed
                if (
                    method not in self.operations
                    or should_skip_method(method, self.method)
                    or should_skip_by_tag(resolved_definition.get("tags"), self.tag)
                    or should_skip_by_operation_id(
                        resolved_definition.get("operationId"), self.operation_id
                    )
                ):
                    continue
                parameters = itertools.chain(
                    resolved_definition.get("parameters", ()), common_parameters
                )
                # To prevent recursion errors we need to pass not resolved schema as well
                # It could be used for response validation
                raw_definition = EndpointDefinition(
                    raw_methods[method], resolved_definition, scope
                )
                yield self.make_endpoint(
                    full_path, method, parameters, resolved_definition, raw_definition
                )
    except (KeyError, AttributeError, jsonschema.exceptions.RefResolutionError):
        raise InvalidSchema("Schema parsing failed. Please check your schema.")