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

external $ref without / caused exception #1542

Merged
merged 6 commits into from Apr 23, 2021

Conversation

kaewberg
Copy link
Contributor

@kaewberg kaewberg commented Mar 26, 2021

Fixes #1543
... subtring(0, indexOf ... causes StringIndexOutOfBounds if the char searched for is missing. This meant that refs like $ref("another_file.json#/thing") could not be parsed. In addition, File.sparatorChar was used to find separators in directory part of ref, causing most every parsing attempt to fail on windows. We should probably require "/" to be used as path separator.

Johan Kaewberg and others added 2 commits March 26, 2021 09:59
@gracekarina
Copy link
Contributor

Hi, @kaewberg thanks for the PR, can you please add the spec that is causing this error?, or even better if you can add a test to the PR will be great!. Thanks

kaewberg and others added 4 commits March 29, 2021 09:57
@gracekarina gracekarina merged commit aef028f into swagger-api:master Apr 23, 2021
@gracekarina
Copy link
Contributor

thanks @kaewberg

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

Successfully merging this pull request may close these issues.

External $ref without '/' causes exception
2 participants