Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong $ref for path in nested dir processing in v1 #1223

Closed
ZsergUA opened this issue Oct 15, 2019 · 2 comments
Closed

Wrong $ref for path in nested dir processing in v1 #1223

ZsergUA opened this issue Oct 15, 2019 · 2 comments

Comments

@ZsergUA
Copy link

ZsergUA commented Oct 15, 2019

In case $ref for path is pointing to a file in nested directory, internally defined refs are using wrong base directory.

While having swagger.yaml with:

paths:
  /some_path:
    $ref: './subdir/some.yaml'

and some.yaml with:

get:
  responses:
    200:
      schema:
        type: object
        properties:
          some_property:
            $ref: './some_definitions.yaml#/SomeProperty'

will try to resolve some_definitions.yaml in the swagger.yaml root directory instead of subdir

@ZsergUA
Copy link
Author

ZsergUA commented Oct 15, 2019

pull request with fix #1224

@gracekarina
Copy link
Contributor

thanks! @ZsergUA
the PR is now merged.

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

No branches or pull requests

2 participants