Example Swagger/OpenAPI definition:
openapi: 3.0.1
info:
title: Foo OpenApi Spec
version: 1.0.0
servers:
- url: 'https://localhost/BasePath'
paths:
'/Account/{id}':
get:
description: |-
operationId: Account1
parameters:
- name: id
in: path
allowEmptyValue: true
schema:
type: integer
format: int32
responses:
'200':
description: |-
Swagger-Editor configuration options:
n/a - using editor.swagger.io as a validator
Validation error of OpenApi schema - within an OperationObject, a ParametersObject doesn't accept in: path as a valid location
No validation Errors and for "path" to be an acceptable "in" location

The errors are misleading. The real issue is that the path parameter is missing required: true.
Also, allowEmptyValue only applies to query parameters but not path patameters.
Keeping this around as a validation enhancement - the messaging here isn't great.
As is with most of these issues, the problem lies in the JSON Schema validator not being smart enough to make guesses about which anyOf a user intended, and instead complaining about not matching the anyOf itself... which is not useful.
I've opened a pull request (#1985) that will close this issue.
Here's what Swagger Editor reports with my changes:
Structural error at [鈥get.parameters.0
should have required property 'required'
missingProperty: required
Most helpful comment
The errors are misleading. The real issue is that the path parameter is missing
required: true.Also,
allowEmptyValueonly applies to query parameters but not path patameters.