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

UI should support swagger split into more files #151

Closed
jimirocks opened this issue Mar 28, 2018 · 2 comments
Closed

UI should support swagger split into more files #151

jimirocks opened this issue Mar 28, 2018 · 2 comments

Comments

@jimirocks
Copy link

i.e.

'/myPath':
    post:
      summary: schema in external file
      parameters:
        - name: external
          in: body
          required: true
          schema:
            $ref: 'test.yml'

And in test.yml in the same directory

ExternalSchema:
  title: External schema not working
  type: object

The UI reports:
Could not resolve reference because of: Tried to resolve a relative URL, without having a basePath. path: 'test.yml' basePath: 'undefined'

@semonte
Copy link
Contributor

semonte commented Apr 8, 2018

Thanks for the suggestion. Unfortunately this is difficult to implement due to how the Swagger UI works with the plugin. In case you want to use display local files in Swagger UI with all the features, I suggest using the following approach swagger-api/swagger-ui#1110 (comment)

@semonte
Copy link
Contributor

semonte commented Apr 29, 2018

Closing, this is something that can't be fixed in the plugin itself.

@semonte semonte closed this as completed Apr 29, 2018
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