Skip to content
This repository has been archived by the owner on Nov 18, 2022. It is now read-only.

swagger.basePath is not listed in swagger.json #183

Open
madhugarimilla opened this issue Feb 23, 2017 · 1 comment
Open

swagger.basePath is not listed in swagger.json #183

madhugarimilla opened this issue Feb 23, 2017 · 1 comment

Comments

@madhugarimilla
Copy link

madhugarimilla commented Feb 23, 2017

I am trying to add the basepath to swagger.json so that it gets listed as part of the json and can be used in swagger ui to try out the apis. I have been using the below code inside my Activator class, but the basePath is not listed as part of the swagger.json

ServiceReference<?> reference = context.getServiceReference( ConfigurationAdmin.class.getName() ); ConfigurationAdmin configAdmin = ( ConfigurationAdmin )context.getService( reference ); Configuration configuration = configAdmin.getConfiguration( "com.eclipsesource.jaxrs.swagger.config", null ); Dictionary<String, Object> properties = new Hashtable<String, Object>(); properties.put( "swagger.basePath", "/rest/v1" ); configuration.update( properties ); context.ungetService( reference );

@ghareeb-falazi
Copy link

ghareeb-falazi commented Dec 21, 2017

Well, in my case using the OSGi config admin to configure swagger does not work at all, not only for swagger.basePath but also for all other properties listed in:
https://github.com/hstaudacher/osgi-jax-rs-connector/wiki/Swagger-Integration#configuration
The resulting swagger.json does not change at all by updating the configuration.

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

No branches or pull requests

2 participants