apistar
apistar copied to clipboard
Specifying a Path Item object as ref to external file gives validation error
From my interpretation of the OpenAPI spec, it should be possible to specify a path item as a reference to an external file. For example:
/pets/{petId}:
$ref: './pet.yaml'
However, when I try to validate the attached files I get:
$ apistar validate --path petstore.openapi.yaml --format openapi
* Invalid property name. (At ['paths', '/pets/{petId}', '$ref'], line 57, column 5.)
✘ Invalid OpenAPI schema.
I also raised the same issue in the swagger-editor repo.
I may be mis-interpreting the spec, or doing something else incorrectly, so I would appreciate any guidance.
To reproduce, extract this zip and run the command above