Skip to content
This repository has been archived by the owner on Feb 25, 2022. It is now read-only.

Specifying a Path Item object as ref to external file gives validation error #636

Open
matthewhegarty opened this issue Oct 25, 2018 · 0 comments

Comments

@matthewhegarty
Copy link

matthewhegarty commented Oct 25, 2018

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant