Open madhugarimilla opened 7 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.
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 );