You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
OpenAPIV3Parser#getExtensions() not finding extensions on OSGi #1003
Hi, can you place it at swagger-parser module, and test? what do you mean here: Would it be possible to add a ParseOption to allow selecting the class loader?
In order to the new version to work with OSGi you need to install a bundle providing an OSGi ServiceLoader Mediator implementation. The one that I know is Aries SPI Fly.
The unit test is not great but at least it verifies that both classloaders are given a chance to provide extensions. This was separately tested in an OSGi environment.
Humm, definitely looks like the same issue. I was not aware OpenAPIParser was upward compatible with V3 (which I find a little bit confusing I have to say)
Activity
gracekarina commentedon Jan 25, 2019
Hi, please provide us with a PR and a failing test where we can see what you mean. Thanks
fmoussallam commentedon Jan 25, 2019
This test would fail for a v2 swagger.json spec:
Problem is where to place that test. OpenAPIV3ParserTest does not have any loadable extension on its classpath anyway.
Are there any tests actually loading extensions?
Thanks
gracekarina commentedon Feb 16, 2019
Hi, can you place it at swagger-parser module, and test? what do you mean here:
Would it be possible to add a ParseOption to allow selecting the class loader?cvgaviao commentedon Mar 30, 2019
In order to the new version to work with OSGi you need to install a bundle providing an OSGi ServiceLoader Mediator implementation. The one that I know is Aries SPI Fly.
OpenAPIV3Parser#getExtensions() not finding extensions on OSGi swagge…
OpenAPIV3Parser#getExtensions() not finding extensions on OSGi swagge…
fmoussallam commentedon Mar 30, 2019
I propose #1068 for your review.
The unit test is not great but at least it verifies that both classloaders are given a chance to provide extensions. This was separately tested in an OSGi environment.
Merge pull request #1068 from Talend/master
gracekarina commentedon Apr 13, 2019
closed by #1068.
jmini commentedon Apr 24, 2019
@fmoussallam: I have the feeling there is the exact same issue with
OpenAPIParser:swagger-parser/modules/swagger-parser/src/main/java/io/swagger/parser/OpenAPIParser.java
Lines 41 to 51 in 0a4ed0b
Can you confirm this?
fmoussallam commentedon Apr 24, 2019
Humm, definitely looks like the same issue. I was not aware OpenAPIParser was upward compatible with V3 (which I find a little bit confusing I have to say)
jmini commentedon Apr 25, 2019
@fmoussallam: is this also a problem in an OSGi context? Do you want to push a similar patch for that as well?
fmoussallam commentedon Apr 25, 2019
Sure will do. I would also want to submit another PR for #997 which is trivial. Is that ok?
OpenAPIV3Parser#getExtensions() not finding extensions on OSGi swagge…
Merge pull request #1085 from Talend/issue-1003-bis