hstaudacher / osgi-jax-rs-connector

An OSGi - JAX-RS 2.0 Connector, software repository available on the link below
http://hstaudacher.github.io/osgi-jax-rs-connector
Other
191 stars 98 forks source link

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

Open madhugarimilla opened 7 years ago

madhugarimilla commented 7 years ago

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 commented 6 years ago

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.