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

possible fix for #1518 #1559

Closed
wants to merge 1 commit into from
Closed

possible fix for #1518 #1559

wants to merge 1 commit into from

Conversation

gracekarina
Copy link
Contributor

elimitates duplicated schemas in resolving.

In case $ref refers to path with parameter, using whole $ref in processRefSchema as externalFile argument results in URISyntaxException

java.net.URISyntaxException: Illegal character in fragment at index 49: ../v1/checkout.yml#/paths/~1checkout~1orderItem~1{orderItemId}
	at java.base/java.net.URI$Parser.fail(URI.java:2915)
	at java.base/java.net.URI$Parser.checkChars(URI.java:3086)
	at java.base/java.net.URI$Parser.parse(URI.java:3130)
	at java.base/java.net.URI.<init>(URI.java:600)
	at io.swagger.v3.parser.processors.ExternalRefProcessor.join(ExternalRefProcessor.java:977)
	at io.swagger.v3.parser.processors.ExternalRefProcessor.constructRef(ExternalRefProcessor.java:928)
	at io.swagger.v3.parser.processors.ExternalRefProcessor.processRefSchema(ExternalRefProcessor.java:918)
	at io.swagger.v3.parser.processors.ExternalRefProcessor.processRefSchemaObject(ExternalRefProcessor.java:867)
	at io.swagger.v3.parser.processors.ExternalRefProcessor.processRefToExternalPathItem(ExternalRefProcessor.java:280)
	at io.swagger.v3.parser.processors.PathsProcessor.processReferencePath(PathsProcessor.java:299)
	at io.swagger.v3.parser.processors.PathsProcessor.processPaths(PathsProcessor.java:63)
	at io.swagger.v3.parser.OpenAPIResolver.resolve(OpenAPIResolver.java:49)

Using only file part (without fragment) produces expected result.

fixing 1518 test

test for 1518

adding missing fils

removing duplicated code
@gracekarina
Copy link
Contributor Author

replaced by #1566

@gracekarina gracekarina deleted the issue-1518 branch September 3, 2021 21:25
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.

1 participant